ref: c9529c2432e1ee96fb139d7e2b7a650f9ca4c600
parent: 8a2c0daea107649d1545b02a46a7266a4cac66ae
author: mkf <mkf@cloud9p.org>
date: Sat Apr 20 19:04:36 EDT 2024
Makefile: rewrite, no need to clean before recompiles.
--- a/Makefile
+++ b/Makefile
@@ -1,22 +1,24 @@
CC=cc
-CFLAGS=-g -O0
-L=\
- unix.o\
+#CFLAGS=-static
+
+Lib=\
engine.o\
+ unix.o\
+# net.o\
-all: cli
+Cli= cli.o
+Srv= srv.o
+all: cli srv
+
%.o: %.c %.h
$(CC) $(CFLAGS) -c $< -o $@
-cli: ${L}
- $(CC) $(CFLAGS) -o $@ ${L} cli.c
+cli: ${Cli} ${Lib}
+ $(CC) $(CFLAGS) -o $@ ${Cli} ${Lib}
-srv: ${L}
- $(CC) ${CFLAGS} -o $@ ${L} srv.c
+srv: ${Srv} ${Lib}
+ $(CC) $(CFLAGS) -o $@ ${Srv} ${Lib}
-glendy-cli: cli.o ${L}
- $(LD) $(LDFLAGS) -o $@ ${L} cli.o
-
clean:
- rm -f a.out *.8 *.6 *.o cli sdl srv ${L}
+ rm -f *.o *.5 *.6 *.7 *.8 cli srv