2018-03-15 20:43:46 +00:00
|
|
|
TARGET := ion
|
|
|
|
OBJS := $(TARGET).o
|
2018-03-28 05:47:45 +00:00
|
|
|
CFLAGS ?= -g -std=c99 -Wall -Werror
|
2018-03-15 20:43:46 +00:00
|
|
|
|
2018-03-26 18:33:32 +00:00
|
|
|
.PHONY: all run
|
|
|
|
all: run
|
|
|
|
|
2018-03-27 22:59:34 +00:00
|
|
|
run: $(TARGET)
|
|
|
|
@echo "running $(TARGET)"
|
2018-03-26 18:33:32 +00:00
|
|
|
./$(TARGET)
|
2018-03-15 20:43:46 +00:00
|
|
|
|
|
|
|
$(TARGET): $(OBJS)
|
|
|
|
$(CC) $(CFLAGS) -o $@ $(OBJS)
|
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
2018-03-26 18:33:32 +00:00
|
|
|
rm -f $(OBJS) $(TARGET)
|
2018-03-28 05:47:45 +00:00
|
|
|
|
|
|
|
.PHONY: release
|
|
|
|
release: clean
|
2018-03-28 13:59:23 +00:00
|
|
|
CFLAGS="$(CFLAGS) -DRELEASE" make $(TARGET)
|