2021-10-16 12:01:29 +02:00
|
|
|
--- a/Makefile
|
|
|
|
+++ b/Makefile
|
2022-01-08 18:00:37 +01:00
|
|
|
@@ -15,23 +15,25 @@
|
2021-10-16 12:01:29 +02:00
|
|
|
CC ?= gcc
|
|
|
|
CFLAGS ?= -Wextra -Wall -O2
|
|
|
|
|
2022-01-08 18:00:37 +01:00
|
|
|
+NCURSES_LIBS ?= -lncursesw
|
|
|
|
+
|
2021-10-16 12:01:29 +02:00
|
|
|
.PHONY: all install uninstall clean
|
|
|
|
|
2022-01-08 18:00:37 +01:00
|
|
|
nms: $(OBJ)/input.o $(OBJ)/error.o $(OBJ)/nmscharset.o $(OBJ)/nmstermio.o $(OBJ)/nmseffect.o $(OBJ)/nms.o | $(BIN)
|
|
|
|
- $(CC) $(CFLAGS) -o $(BIN)/$@ $^
|
|
|
|
+ $(CC) $(CFLAGS) -o $(BIN)/$@ $^ $(LDFLAGS)
|
|
|
|
|
|
|
|
sneakers: $(OBJ)/nmscharset.o $(OBJ)/nmstermio.o $(OBJ)/nmseffect.o $(OBJ)/sneakers.o | $(BIN)
|
|
|
|
- $(CC) $(CFLAGS) -o $(BIN)/$@ $^
|
|
|
|
+ $(CC) $(CFLAGS) -o $(BIN)/$@ $^ $(LDFLAGS)
|
|
|
|
|
|
|
|
all: nms sneakers
|
|
|
|
|
2021-10-16 12:01:29 +02:00
|
|
|
all-ncurses: nms-ncurses sneakers-ncurses
|
|
|
|
|
|
|
|
nms-ncurses: $(OBJ)/input.o $(OBJ)/error.o $(OBJ)/nmscharset.o $(OBJ)/nmstermio_ncurses.o $(OBJ)/nmseffect.o $(OBJ)/nms.o | $(BIN)
|
|
|
|
- $(CC) $(CFLAGS) -o $(BIN)/nms $^ -lncursesw
|
2022-01-08 18:00:37 +01:00
|
|
|
+ $(CC) $(CFLAGS) $(NCURSES_CFLAGS) -o $(BIN)/nms-ncurses $^ $(LDFLAGS) $(NCURSES_LIBS)
|
2021-10-16 12:01:29 +02:00
|
|
|
|
|
|
|
sneakers-ncurses: $(OBJ)/nmscharset.o $(OBJ)/nmstermio_ncurses.o $(OBJ)/nmseffect.o $(OBJ)/sneakers.o | $(BIN)
|
|
|
|
- $(CC) $(CFLAGS) -o $(BIN)/sneakers $^ -lncursesw
|
2022-01-08 18:00:37 +01:00
|
|
|
+ $(CC) $(CFLAGS) $(NCURSES_CFLAGS) -o $(BIN)/sneakers-ncurses $^ $(LDFLAGS) $(NCURSES_LIBS)
|
2021-10-16 12:01:29 +02:00
|
|
|
|
|
|
|
$(OBJ)/%.o: $(SRC)/%.c | $(OBJ)
|
|
|
|
$(CC) $(CFLAGS) -o $@ -c $<
|