2016-03-29 14:52:05 +00:00
|
|
|
CC ?= clang
|
|
|
|
CFLAGS += -Wno-visibility -Wno-incompatible-pointer-types -Wall -Wextra
|
|
|
|
CFLAGS += -DINVERT_COLORS -DVT100 -O2
|
|
|
|
LFLAGS +=
|
2014-04-17 20:20:40 +00:00
|
|
|
|
2015-02-21 02:36:15 +00:00
|
|
|
PROGRAM := 2048
|
|
|
|
C_FILES := $(wildcard src/*.c)
|
2015-08-04 04:42:28 +00:00
|
|
|
MERGE_FILE := src/merge_std.c
|
|
|
|
FILTERED_C_FILES := $(filter-out src/gfx%.c src/merge%.c, $(C_FILES))
|
2015-02-21 02:36:15 +00:00
|
|
|
|
2015-08-04 04:42:28 +00:00
|
|
|
all: terminal
|
2015-02-21 02:36:15 +00:00
|
|
|
|
2015-08-04 04:42:28 +00:00
|
|
|
curses: $(FILTERED_C_FILES) src/gfx_curses.c
|
2016-03-29 14:44:27 +00:00
|
|
|
$(CC) $(CFLAGS) $(FILTERED_C_FILES) $(MERGE_FILE) src/gfx_curses.c -o $(PROGRAM) $(LDFLAGS) -lcurses
|
2015-02-21 02:36:15 +00:00
|
|
|
|
2015-08-04 04:42:28 +00:00
|
|
|
terminal: $(FILTERED_C_FILES) src/gfx_terminal.c
|
2016-03-29 14:44:27 +00:00
|
|
|
$(CC) $(CFLAGS) $(FILTERED_C_FILES) $(MERGE_FILE) src/gfx_terminal.c -o $(PROGRAM) $(LDFLAGS)
|
2015-02-21 02:36:15 +00:00
|
|
|
|
|
|
|
remake: clean all
|
2014-04-17 20:20:40 +00:00
|
|
|
|
2014-09-08 20:26:41 +00:00
|
|
|
clean:
|
2015-08-04 04:42:28 +00:00
|
|
|
rm -f $(PROGRAM)
|
2014-12-10 18:49:42 +00:00
|
|
|
|
2015-02-21 02:36:15 +00:00
|
|
|
.PHONY: clean remake
|