16 lines
296 B
Makefile
16 lines
296 B
Makefile
OBJ = $(patsubst src/%.c,%.o,$(wildcard src/*.c))
|
|
HEADERS = $(wildcard src/*.h)
|
|
CFLAGS += -std=c17 -pthread -O2
|
|
LIB = -lncurses -lnotcurses-core -lm
|
|
|
|
%.o: src/%.c $(HEADERS)
|
|
$(CC) $(CFLAGS) -c $< -o $@
|
|
|
|
2048: $(OBJ)
|
|
$(CC) $(LIB) $(CFLAGS) $^ -o $@
|
|
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
$(RM) $(OBJ)
|