commit 8c6e408c9be983c4004c47ee4661b6eedc720a21 parent b7c91c18c9fe0fbf235d3a6956a0b590715acdb1 Author: Naveen Narayanan <zerous@nocebo.space> Date: Mon, 11 Oct 2021 22:29:42 +0200 Fix Makefile Remove superfluous header dependencies Add target: options Diffstat:
M | Makefile | | | 33 | ++++++++++++++++----------------- |
1 file changed, 16 insertions(+), 17 deletions(-)
diff --git a/Makefile b/Makefile @@ -1,25 +1,22 @@ include config.mk -H = \ - attack.h\ - config.h\ - fw.h\ - ip.h\ - parser.h\ - queue.h\ - util.h\ - OBJ = \ attack.o\ fw.o\ ip.o\ - main.o \ - parser.o \ - range.o \ + main.o\ + parser.o\ + range.o\ BIN = sdog -all: $(BIN) +all: options $(BIN) + +options: + @echo gods build options: + @echo "CFLAGS = ${CFLAGS}" + @echo "LDFLAGS = ${LDFLAGS}" + @echo "CC = ${CC}" clean: rm -f $(BIN) $(OBJ) @@ -36,10 +33,12 @@ uninstall: .PHONY: all clean install uninstall +$(BIN): $(OBJ) + $(CC) -o $@ $(OBJ) $(LDFLAGS) + +$(OBJ): config.h + .SUFFIXES: .c .o -.c.o: $(H) +.c.o: $(CC) $(CFLAGS) -c $< - -sdog: $(OBJ) - $(CC) -o $@ $(OBJ) $(LDFLAGS)