patch-src_Makefile 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
  2. --- mrd6-0.9.6.orig/src/Makefile 2007-06-25 01:58:28.000000000 +0200
  3. +++ mrd6-0.9.6/src/Makefile 2008-10-21 11:27:38.000000000 +0200
  4. @@ -26,7 +26,7 @@ ifeq ($(SUPPORT_MODULES),yes)
  5. MODULES ?= BGP
  6. LDCMD = -rdynamic
  7. else
  8. - MODULE_OPTIONS += -DMRD_NO_DYNAMIC_MODULE_LOADING
  9. + MODULE_OPTIONS += MRD_NO_DYNAMIC_MODULE_LOADING
  10. endif
  11. INCLUDES = -I../include
  12. @@ -92,7 +92,7 @@ TESTS = tests/address_unittest tests/ptr
  13. DEST_PREFIX = $(DESTDIR)$(PREFIX)
  14. CXXFLAGS = $(INCLUDES) -ansi -Wall -Wno-multichar -fno-exceptions -fPIC \
  15. - -D$(PLATFORM) $(addprefix -D,$(MODULE_OPTIONS))
  16. + -D$(PLATFORM) $(addprefix -D,$(MODULE_OPTIONS)) $(EXTRA_FLAGS)
  17. ifeq ($(OPTIMIZE),yes)
  18. ifeq ($(SPACE_OPTIMIZE),yes)
  19. @@ -101,11 +101,8 @@ ifeq ($(OPTIMIZE),yes)
  20. CXXFLAGS += -O3
  21. endif
  22. else
  23. - CXXFLAGS += -g
  24. ifeq ($(NO_INLINE),yes)
  25. CXXFLAGS += -O0 -fno-inline
  26. - else
  27. - CXXFLAGS += -O2
  28. endif
  29. endif
  30. @@ -151,7 +148,7 @@ $(foreach test,$(TESTS),$(eval $(call un
  31. $(TARGET): $(MRD_OBJECTS)
  32. @echo "Linking $(TARGET)"
  33. - @$(CXX) $(LDCMD) $(CXXFLAGS) -o $@ $(MRD_OBJECTS) $(LDFLAGS)
  34. + $(CXX) $(LDCMD) $(CXXFLAGS) -o $@ $(MRD_OBJECTS) $(LDFLAGS)
  35. install: $(TARGET) $(EXTERNAL_MODULES)
  36. install -D $(TARGET) $(DEST_PREFIX)/sbin/$(TARGET)
  37. @@ -162,12 +159,12 @@ ifneq (,$(EXTERNAL_MODULES))
  38. endif
  39. $(MRD_VERSION_CPP): $(SOURCES) Makefile Makefile.options
  40. - @set -e; mkdir -p $(dir $@); \
  41. + mkdir -p $(dir $@); \
  42. echo '/* This file is automatically generated */' > $(MRD_VERSION_CPP); \
  43. echo 'const char *BuildDate = "$(NOW)";' >> $(MRD_VERSION_CPP)
  44. $(MODULES_CPP): Makefile Makefile.options
  45. - @set -e; mkdir -p $(dir $@); \
  46. + mkdir -p $(dir $@); \
  47. echo "Generating modules.cpp"; \
  48. scripts/generate-modules-cpp.pl $(STATIC_MODULES) > $(MODULES_CPP)
  49. @@ -181,7 +178,7 @@ $(OPTIONS):
  50. $(DEPS_DIR)/%.d: %.cpp $(OPTIONS)
  51. @echo "Deps $<"
  52. - @set -e; mkdir -p $(dir $@); \
  53. + mkdir -p $(dir $@); \
  54. $(CXX) -MM -MT $@ -MT $(addprefix $(OBJ_DIR)/,$(<:.cpp=.o)) \
  55. $(CXXFLAGS) $< > $@
  56. @@ -195,7 +192,7 @@ endif
  57. $(OBJ_DIR)/%.o: %.cpp $(OPTIONS)
  58. @echo "C++ $<"
  59. - @set -e; mkdir -p $(dir $@); \
  60. + mkdir -p $(dir $@); \
  61. $(CXX) -c $(CXXFLAGS) $< -o $@
  62. clean: