Makefile (692B)
1 include config.mk 2 3 OBJ = \ 4 attack.o\ 5 fw.o\ 6 ip.o\ 7 main.o\ 8 parser.o\ 9 range.o\ 10 11 BIN = sdog 12 MAN = sdog.1 13 14 all: options $(BIN) 15 16 options: 17 @echo gods build options: 18 @echo "CFLAGS = ${CFLAGS}" 19 @echo "LDFLAGS = ${LDFLAGS}" 20 @echo "CC = ${CC}" 21 22 clean: 23 rm -f $(BIN) $(OBJ) 24 25 install: all 26 mkdir -p $(DESTDIR)$(PREFIX)/bin 27 cp -f $(BIN) $(DESTDIR)$(PREFIX)/bin 28 mkdir -p $(DESTDIR)$(MANPREFIX)/man1 29 cp -f $(MAN) $(DESTDIR)$(MANPREFIX)/man1 30 31 uninstall: 32 cd $(DESTDIR)$(PREFIX)/bin && rm -f $(BIN) 33 cd $(DESTDIR)$(MANPREFIX)/man1 && rm -f $(MAN) 34 35 .PHONY: all clean install uninstall 36 37 $(BIN): $(OBJ) 38 $(CC) -o $@ $(OBJ) $(LDFLAGS) 39 40 $(OBJ): config.h 41 42 .SUFFIXES: .c .o 43 44 .c.o: 45 $(CC) $(CFLAGS) -c $<