2048/Makefile

16 lines
309 B
Makefile
Raw Normal View History

2022-07-27 01:16:32 +05:30
OBJ = $(patsubst src/%.c,%.o,$(wildcard src/*.c))
HEADERS = $(wildcard src/*.h)
FLAGS = -std=c17 -pthread -O2
LIB = -lncurses -lnotcurses-core
%.o: src/%.c $(HEADERS)
$(CC) $(FLAGS) $(CFLAGS) -c $< -o $@
2048: $(OBJ)
$(CC) $(LIB) $(FLAGS) $(CFLAGS) $^ -o $@
.PHONY: clean
clean:
$(RM) $(OBJ)