Permalink
Browse files

Fix Ubuntu/gcc compile issues.

- Link with system libs before local libs.
- Linking with more local libs as needed.
- Linking with more system libs as needed.
  • Loading branch information...
davidlehn committed Jan 16, 2012
1 parent a5071ea commit 79c23beeedd4f602489ff0851f4a01de2e01d1eb
Showing with 16 additions and 7 deletions.
  1. +3 −3 cpp/app/Makefile.in
  2. +1 −0 cpp/crypto/Makefile.in
  3. +1 −1 cpp/data/Makefile.in
  4. +1 −0 cpp/net/Makefile.in
  5. +1 −0 cpp/rt/Makefile.in
  6. +9 −3 setup/Makefile.base.in
View
@@ -4,10 +4,10 @@ LIBRARIES = moapp
moapp_HEADERS = $(wildcard *.h)
moapp_SOURCES = $(wildcard *.cpp)
-DYNAMIC_LINK_LIBRARIES = mort mologging moio mocrypto monet modata moutil moconfig mokernel
+DYNAMIC_LINK_LIBRARIES = mort mologging moio mocrypto monet modata moutil moconfig mokernel moevent mofiber
-DYNAMIC_MACOS_LINK_LIBRARIES = crypto ssl momodest mofiber mocompress moevent movalidation
-DYNAMIC_WINDOWS_LINK_LIBRARIES = pthreadGCE2 mgwz libgnurx-0 libeay32 ssleay32 ws2_32 momodest mofiber mocompress moevent movalidation
+DYNAMIC_MACOS_LINK_LIBRARIES = crypto ssl momodest mocompress movalidation
+DYNAMIC_WINDOWS_LINK_LIBRARIES = pthreadGCE2 mgwz libgnurx-0 libeay32 ssleay32 ws2_32 momodest mocompress movalidation
# ----------- Standard Makefile
include @MONARCH_DIR@/setup/Makefile.base
View
@@ -6,6 +6,7 @@ mocrypto_SOURCES = $(wildcard *.cpp)
DYNAMIC_LINK_LIBRARIES = mort moutil moio
+DYNAMIC_LINUX_LINK_LIBRARIES = crypto
DYNAMIC_MACOS_LINK_LIBRARIES = crypto ssl
DYNAMIC_WINDOWS_LINK_LIBRARIES = libeay32
View
@@ -28,7 +28,7 @@ modata_SOURCES = \
$(wildcard riff/*.cpp) \
$(wildcard xml/*.cpp)
-DYNAMIC_LINK_LIBRARIES = moio moutil mort mologging expat
+DYNAMIC_LINK_LIBRARIES = moio moutil mort mologging mocrypto expat
DYNAMIC_MACOS_LINK_LIBRARIES = iconv charset expat mocompress
DYNAMIC_WINDOWS_LINK_LIBRARIES = libexpat iconv2 charset1
View
@@ -6,6 +6,7 @@ monet_SOURCES = $(wildcard *.cpp)
DYNAMIC_LINK_LIBRARIES = mort moutil momodest moio mocrypto mologging
+DYNAMIC_LINUX_LINK_LIBRARIES = ssl
DYNAMIC_MACOS_LINK_LIBRARIES = crypto ssl mocompress
DYNAMIC_WINDOWS_LINK_LIBRARIES = libeay32 ssleay32 ws2_32
View
@@ -4,6 +4,7 @@ LIBRARIES = mort
mort_HEADERS = $(wildcard *.h)
mort_SOURCES = $(wildcard *.cpp)
+DYNAMIC_LINUX_LINK_LIBRARIES = pthread
DYNAMIC_WINDOWS_LINK_LIBRARIES = pthreadGCE2
# ----------- Standard Makefile
View
@@ -53,7 +53,9 @@ ifeq ($(BUILD_FOR_LINUX),yes)
PLATFORM_NAME=LINUX
CXX_FLAGS += -march=@CPU_ARCHITECTURE@ -fPIC -DLINUX $(MODULE_CXX_FLAGS) $(MODULE_LINUX_CXX_FLAGS)
LIBS += -L/usr/lib/mysql
-DYNAMIC_LINK_LIBRARIES += $(DYNAMIC_LINUX_LINK_LIBRARIES)
+DYNAMIC_LINK_LIBRARIES := \
+ $(DYNAMIC_LINUX_LINK_LIBRARIES) \
+ $(DYNAMIC_LINK_LIBRARIES)
DYNAMIC_EXECUTABLE_LIBRARIES += $(DYNAMIC_LINUX_EXECUTABLE_LIBRARIES)
endif
@@ -67,7 +69,9 @@ LIB_LD_FLAGS += \
# Add default location for Fink
INCLUDES += -I/sw/include
LIBS += -L/sw/lib
-DYNAMIC_LINK_LIBRARIES += $(DYNAMIC_MACOS_LINK_LIBRARIES)
+DYNAMIC_LINK_LIBRARIES := \
+ $(DYNAMIC_MACOS_LINK_LIBRARIES) \
+ $(DYNAMIC_LINK_LIBRARIES)
DYNAMIC_EXECUTABLE_LIBRARIES += $(DYNAMIC_MACOS_EXECUTABLE_LIBRARIES)
endif
@@ -84,7 +88,9 @@ INCLUDES += \
-I$(TOP_SRC_DIR)/cpp/3rdparty/sqlite3/include \
-I$(TOP_SRC_DIR)/cpp/3rdparty/zlib/include \
-I$(TOP_SRC_DIR)/cpp/3rdparty/iconv/include
-DYNAMIC_LINK_LIBRARIES += $(DYNAMIC_WINDOWS_LINK_LIBRARIES)
+DYNAMIC_LINK_LIBRARIES := \
+ $(DYNAMIC_WINDOWS_LINK_LIBRARIES) \
+ $(DYNAMIC_LINK_LIBRARIES)
DYNAMIC_EXECUTABLE_LIBRARIES += $(DYNAMIC_WINDOWS_EXECUTABLE_LIBRARIES)
endif

0 comments on commit 79c23be

Please sign in to comment.