Makefile 599 B

12345678910111213141516171819202122
  1. CFLAGS+=-I../../lib/ -I../../forge_socket -Wall
  2. LDFLAGS+=-lpcap -levent -levent_extra -lm
  3. VPATH=../../lib/
  4. # from dpkg-buildflags --get CFLAGS, but use stack-protector-all and fPIC
  5. GCCHARDENING=-g -O2 -fstack-protector-all --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -fPIC
  6. # from gpkg-buildflags --get LDFLAGS, + -z,now
  7. LDHARDENING=-Wl,-Bsymbolic-functions -Wl,-z,relro,-z,now
  8. CFLAGS+=$(GCCHARDENING)
  9. LDFLAGS+=$(LDHARDENING)
  10. all: forge-socket
  11. forge-socket: forge-socket.o xalloc.o logger.o
  12. $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
  13. clean:
  14. rm -f forge-socket *.o