patch-Makefile 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. --- ipvsadm-1.26.orig/Makefile 2011-02-08 01:24:23.000000000 +0100
  2. +++ ipvsadm-1.26/Makefile 2012-07-20 14:46:15.000000000 +0200
  3. @@ -35,20 +35,20 @@ ARCH = $(shell uname -m)
  4. RPMSOURCEDIR = $(shell rpm --eval '%_sourcedir')
  5. RPMSPECDIR = $(shell rpm --eval '%_specdir')
  6. -CC = gcc
  7. +CC ?= gcc
  8. INCLUDE =
  9. -SBIN = $(BUILD_ROOT)/sbin
  10. +SBIN = $(DESTDIR)/sbin
  11. MANDIR = usr/man
  12. -MAN = $(BUILD_ROOT)/$(MANDIR)/man8
  13. -INIT = $(BUILD_ROOT)/etc/rc.d/init.d
  14. +MAN = $(DESTDIR)/$(MANDIR)/man8
  15. +INIT = $(DESTDIR)/etc/rc.d/init.d
  16. MKDIR = mkdir
  17. INSTALL = install
  18. STATIC_LIBS = libipvs/libipvs.a
  19. ifeq "${ARCH}" "sparc64"
  20. - CFLAGS = -Wall -Wunused -Wstrict-prototypes -g -m64 -pipe -mcpu=ultrasparc -mcmodel=medlow
  21. + CFLAGS ?= -Wall -Wunused -Wstrict-prototypes -g -m64 -pipe -mcpu=ultrasparc -mcmodel=medlow
  22. else
  23. - CFLAGS = -Wall -Wunused -Wstrict-prototypes -g
  24. + CFLAGS ?= -Wall -Wunused -Wstrict-prototypes -g
  25. endif
  26. @@ -81,7 +81,7 @@ endif
  27. OBJS = ipvsadm.o config_stream.o dynamic_array.o
  28. LIBS = $(POPT_LIB)
  29. ifneq (0,$(HAVE_NL))
  30. -LIBS += -lnl
  31. +LIBS += -lnl-3
  32. endif
  33. DEFINES = -DVERSION=\"$(VERSION)\" -DSCHEDULERS=\"$(SCHEDULERS)\" \
  34. -DPE_LIST=\"$(PE_LIST)\" $(POPT_DEFINE)
  35. @@ -96,8 +96,8 @@ all: libs ipvsadm
  36. libs:
  37. make -C libipvs
  38. -ipvsadm: $(OBJS) $(STATIC_LIBS)
  39. - $(CC) $(CFLAGS) -o $@ $^ $(LIBS)
  40. +ipvsadm: $(OBJS)
  41. + $(CC) $(CFLAGS) -o $@ $^ $(LIBS) -lpopt -lipvs -L./libipvs
  42. install: all
  43. if [ ! -d $(SBIN) ]; then $(MKDIR) -p $(SBIN); fi