sandbox/Makefile

29 lines
481 B
Makefile
Raw Permalink Normal View History

2018-03-03 01:03:32 +00:00
PLATFORM ?= default
CSTD := c99
CFLAGS ?= -std=$(CSTD) -Wall -Werror -O0 -g -DPLATFORM_$(PLATFORM)
2018-03-02 16:47:56 +00:00
LDFLAGS := -static
2018-03-03 01:03:32 +00:00
OBJS := stack.o \
eval.o \
2018-03-02 16:47:56 +00:00
word.o \
2018-03-03 01:03:32 +00:00
kf.o
TARGET := kf-$(PLATFORM)
2018-03-02 16:47:56 +00:00
all: $(TARGET)
$(TARGET): $(OBJS)
2018-03-03 01:03:32 +00:00
$(CC) $(LDFLAGS) -o $@ $(OBJS)
2018-03-02 16:47:56 +00:00
2018-03-03 01:03:32 +00:00
clean-objs:
rm -f $(OBJS)
clean: clean-objs
rm -f kf-pc kf-default
2018-03-02 16:47:56 +00:00
install: $(TARGET)
cp $(TARGET) ~/bin
chmod 0755 ~/bin/$(TARGET)
2018-03-03 01:03:32 +00:00
cross:
make PLATFORM=default clean-objs all
make PLATFORM=pc clean-objs all