patch-src_Makefile 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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 2009-05-22 00:43:30.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,22 +101,13 @@ 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. LDFLAGS += -lm
  31. -ifeq ($(STATIC_STDCXX),no)
  32. - LDFLAGS += -lstdc++
  33. -else
  34. - LDFLAGS += `$(CXX) -print-file-name=libstdc++.a`
  35. -endif
  36. -
  37. TEST_OBJECTS = $(addprefix $(OBJ_DIR)/,$(TEST_SOURCES:.cpp=.o))
  38. MRD_OBJECTS = $(addprefix $(OBJ_DIR)/,$(MRD_SOURCES:.cpp=.o))
  39. @@ -151,7 +142,7 @@ $(foreach test,$(TESTS),$(eval $(call un
  40. $(TARGET): $(MRD_OBJECTS)
  41. @echo "Linking $(TARGET)"
  42. - @$(CXX) $(LDCMD) $(CXXFLAGS) -o $@ $(MRD_OBJECTS) $(LDFLAGS)
  43. + $(CXX) $(LDCMD) $(CXXFLAGS) -o $@ $(MRD_OBJECTS) $(LDFLAGS)
  44. install: $(TARGET) $(EXTERNAL_MODULES)
  45. install -D $(TARGET) $(DEST_PREFIX)/sbin/$(TARGET)
  46. @@ -162,12 +153,12 @@ ifneq (,$(EXTERNAL_MODULES))
  47. endif
  48. $(MRD_VERSION_CPP): $(SOURCES) Makefile Makefile.options
  49. - @set -e; mkdir -p $(dir $@); \
  50. + mkdir -p $(dir $@); \
  51. echo '/* This file is automatically generated */' > $(MRD_VERSION_CPP); \
  52. echo 'const char *BuildDate = "$(NOW)";' >> $(MRD_VERSION_CPP)
  53. $(MODULES_CPP): Makefile Makefile.options
  54. - @set -e; mkdir -p $(dir $@); \
  55. + mkdir -p $(dir $@); \
  56. echo "Generating modules.cpp"; \
  57. scripts/generate-modules-cpp.pl $(STATIC_MODULES) > $(MODULES_CPP)
  58. @@ -181,7 +172,7 @@ $(OPTIONS):
  59. $(DEPS_DIR)/%.d: %.cpp $(OPTIONS)
  60. @echo "Deps $<"
  61. - @set -e; mkdir -p $(dir $@); \
  62. + mkdir -p $(dir $@); \
  63. $(CXX) -MM -MT $@ -MT $(addprefix $(OBJ_DIR)/,$(<:.cpp=.o)) \
  64. $(CXXFLAGS) $< > $@
  65. @@ -195,7 +186,7 @@ endif
  66. $(OBJ_DIR)/%.o: %.cpp $(OPTIONS)
  67. @echo "C++ $<"
  68. - @set -e; mkdir -p $(dir $@); \
  69. + mkdir -p $(dir $@); \
  70. $(CXX) -c $(CXXFLAGS) $< -o $@
  71. clean: