16 lines
309 B
Makefile
16 lines
309 B
Makefile
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)
|