2048-cli/Makefile
2023-11-13 01:28:42 +00:00

25 lines
712 B
Makefile

CC ?= clang
CFLAGS += -Wno-visibility -Wno-incompatible-pointer-types -Wall -Wextra
CFLAGS += -DINVERT_COLORS -DVT100 -O2
LFLAGS +=
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
$(CC) $(CFLAGS) -I/usr/share/gettext $(FILTERED_C_FILES) $(MERGE_FILE) src/gfx_curses.c -o $(PROGRAM) $(LDFLAGS) -lcurses
terminal: $(FILTERED_C_FILES) src/gfx_terminal.c
$(CC) $(CFLAGS) $(FILTERED_C_FILES) $(MERGE_FILE) src/gfx_terminal.c -o $(PROGRAM) $(LDFLAGS)
remake: clean all
clean:
rm -f $(PROGRAM)
.PHONY: clean remake