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-06-13 13:39:39.000000000 +0200
4 @@ -26,7 +26,7 @@ ifeq ($(SUPPORT_MODULES),yes)
8 - MODULE_OPTIONS += -DMRD_NO_DYNAMIC_MODULE_LOADING
9 + MODULE_OPTIONS += MRD_NO_DYNAMIC_MODULE_LOADING
12 INCLUDES = -I../include
13 @@ -92,7 +92,7 @@ TESTS = tests/address_unittest tests/ptr
14 DEST_PREFIX = $(DESTDIR)$(PREFIX)
16 CXXFLAGS = $(INCLUDES) -ansi -Wall -Wno-multichar -fno-exceptions -fPIC \
17 - -D$(PLATFORM) $(addprefix -D,$(MODULE_OPTIONS))
18 + -D$(PLATFORM) $(addprefix -D,$(MODULE_OPTIONS)) $(EXTRA_FLAGS)
20 ifeq ($(OPTIMIZE),yes)
21 ifeq ($(SPACE_OPTIMIZE),yes)
22 @@ -101,22 +101,13 @@ ifeq ($(OPTIMIZE),yes)
27 ifeq ($(NO_INLINE),yes)
28 CXXFLAGS += -O0 -fno-inline
36 -ifeq ($(STATIC_STDCXX),no)
39 - LDFLAGS += `$(CXX) -print-file-name=libstdc++.a`
42 TEST_OBJECTS = $(addprefix $(OBJ_DIR)/,$(TEST_SOURCES:.cpp=.o))
43 MRD_OBJECTS = $(addprefix $(OBJ_DIR)/,$(MRD_SOURCES:.cpp=.o))
45 @@ -151,23 +142,25 @@ $(foreach test,$(TESTS),$(eval $(call un
47 $(TARGET): $(MRD_OBJECTS)
48 @echo "Linking $(TARGET)"
49 - @$(CXX) $(LDCMD) $(CXXFLAGS) -o $@ $(MRD_OBJECTS) $(LDFLAGS)
50 + $(CXX) $(LDCMD) $(CXXFLAGS) -o $@ $(MRD_OBJECTS) $(LDFLAGS)
52 install: $(TARGET) $(EXTERNAL_MODULES)
53 - install -D $(TARGET) $(DEST_PREFIX)/sbin/$(TARGET)
54 - install -D ../tools/mrd6sh $(DEST_PREFIX)/bin/mrd6sh
55 + install -d $(DEST_PREFIX)/sbin
56 + install -d $(DEST_PREFIX)/bin
57 + install $(TARGET) $(DEST_PREFIX)/sbin/$(TARGET)
58 + install ../tools/mrd6sh $(DEST_PREFIX)/bin/mrd6sh
59 ifneq (,$(EXTERNAL_MODULES))
60 mkdir -p $(DEST_PREFIX)/lib/mrd6/
61 - install -D $(EXTERNAL_MODULES) $(DEST_PREFIX)/lib/mrd6/
62 + install $(EXTERNAL_MODULES) $(DEST_PREFIX)/lib/mrd6/
65 $(MRD_VERSION_CPP): $(SOURCES) Makefile Makefile.options
66 - @set -e; mkdir -p $(dir $@); \
67 + mkdir -p $(dir $@); \
68 echo '/* This file is automatically generated */' > $(MRD_VERSION_CPP); \
69 echo 'const char *BuildDate = "$(NOW)";' >> $(MRD_VERSION_CPP)
71 $(MODULES_CPP): Makefile Makefile.options
72 - @set -e; mkdir -p $(dir $@); \
73 + mkdir -p $(dir $@); \
74 echo "Generating modules.cpp"; \
75 scripts/generate-modules-cpp.pl $(STATIC_MODULES) > $(MODULES_CPP)
77 @@ -181,7 +174,7 @@ $(OPTIONS):
79 $(DEPS_DIR)/%.d: %.cpp $(OPTIONS)
81 - @set -e; mkdir -p $(dir $@); \
82 + mkdir -p $(dir $@); \
83 $(CXX) -MM -MT $@ -MT $(addprefix $(OBJ_DIR)/,$(<:.cpp=.o)) \
86 @@ -195,7 +188,7 @@ endif
88 $(OBJ_DIR)/%.o: %.cpp $(OPTIONS)
90 - @set -e; mkdir -p $(dir $@); \
91 + mkdir -p $(dir $@); \
92 $(CXX) -c $(CXXFLAGS) $< -o $@