patch-Makefile 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. --- ipset-4.1.orig/Makefile 2009-11-11 20:22:42.000000000 +0100
  2. +++ ipset-4.1/Makefile 2011-01-21 13:30:47.148658311 +0100
  3. @@ -64,9 +64,13 @@ ifndef NO_EXTRA_WARN_FLAGS
  4. endif
  5. ABI_FLAGS:=
  6. -CFLAGS:=$(ABI_FLAGS) $(COPT_FLAGS) $(WARN_FLAGS) -Ikernel/include -I. # -g -DIPSET_DEBUG
  7. +CPPFLAGS?=
  8. +CPPFLAGS+=-Ikernel/include -I.
  9. +CFLAGS?=$(ABI_FLAGS) $(COPT_FLAGS) $(WARN_FLAGS)
  10. SH_CFLAGS:=$(CFLAGS) -fPIC
  11. -LDFLAGS:=$(ABI_FLAGS)
  12. +LDFLAGS?=$(ABI_FLAGS)
  13. +LIBS?=
  14. +LIBS+=-ldl
  15. SETTYPES:=ipmap portmap macipmap
  16. SETTYPES+=iptree iptreemap
  17. SETTYPES+=iphash nethash ipporthash ipportiphash ipportnethash
  18. @@ -114,14 +118,14 @@ release: clean
  19. #The ipset(8) self
  20. ipset.o: ipset.c ipset.h
  21. - $(CC) $(CFLAGS) -DIPSET_VERSION=\"$(IPSET_VERSION)\" -DIPSET_LIB_DIR=\"$(IPSET_LIB_DIR)\" -c -o $@ $<
  22. + $(CC) $(CPPFLAGS) $(CFLAGS) -DIPSET_VERSION=\"$(IPSET_VERSION)\" -DIPSET_LIB_DIR=\"$(IPSET_LIB_DIR)\" -c -o $@ $<
  23. ipset: ipset.o
  24. - $(CC) $(CFLAGS) $(LDFLAGS) -rdynamic -o $@ $^ -ldl
  25. + $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
  26. #Pooltypes
  27. ipset_%.o: ipset_%.c ipset.h
  28. - $(CC) $(SH_CFLAGS) -o $@ -c $<
  29. + $(CC) $(CPPFLAGS) $(SH_CFLAGS) -o $@ -c $<
  30. libipset_%.so: ipset_%.o
  31. $(CC) -shared $(LDFLAGS) -o $@ $<