2015-02-21 02:36:15 +00:00
|
|
|
CC := clang
|
|
|
|
CFLAGS += -O2 -Wall -Wextra
|
|
|
|
LFLAGS +=
|
|
|
|
DEFINES := -DVT100
|
2014-04-17 20:20:40 +00:00
|
|
|
|
2015-02-21 02:36:15 +00:00
|
|
|
PROGRAM := 2048
|
|
|
|
C_FILES := $(wildcard src/*.c)
|
|
|
|
O_FILES := $(addprefix obj/,$(notdir $(C_FILES:.c=.o)))
|
|
|
|
|
|
|
|
all: curses
|
|
|
|
|
|
|
|
curses: $(O_FILES)
|
|
|
|
$(CC) $(filter-out obj/gfx%.o, $(O_FILES)) obj/gfx_curses.o -o $(PROGRAM) -lcurses
|
|
|
|
|
|
|
|
vt100: $(O_FILES)
|
|
|
|
$(CC) $(filter-out obj/gfx%.o, $(O_FILES)) obj/gfx_terminal.o -o $(PROGRAM)
|
|
|
|
|
|
|
|
obj/%.o: src/%.c
|
|
|
|
$(CC) $(DEFINES) $(CFLAGS) -c -o $@ $<
|
|
|
|
|
|
|
|
remake: clean all
|
2014-04-17 20:20:40 +00:00
|
|
|
|
2014-09-08 20:26:41 +00:00
|
|
|
clean:
|
2015-02-21 02:36:15 +00:00
|
|
|
rm -f obj/*
|
2014-12-10 18:49:42 +00:00
|
|
|
rm -f 2048
|
|
|
|
|
2015-02-21 02:36:15 +00:00
|
|
|
.PHONY: clean remake
|