2048-cli/Makefile

25 lines
691 B
Makefile
Raw Normal View History

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
PROGRAM := 2048
C_FILES := $(wildcard src/*.c)
MERGE_FILE := src/merge_std.c
FILTERED_C_FILES := $(filter-out src/gfx%.c src/merge%.c, $(C_FILES))
all: terminal
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
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)
remake: clean all
2014-04-17 20:20:40 +00:00
2014-09-08 20:26:41 +00:00
clean:
rm -f $(PROGRAM)
.PHONY: clean remake