summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2008-03-07 17:43:30 +0100
committerSebastien Helleu <flashcode@flashtux.org>2008-03-07 17:43:30 +0100
commitb361066e696f620e04303eaaa705dd6dbb3266e4 (patch)
tree2d371acaf5b3e7a011caab7426257fbf7a074d3a
parent468422e130aadd7c77d06c11d01ecee657593f8a (diff)
downloadweechat-b361066e696f620e04303eaaa705dd6dbb3266e4.zip
Cleanup of Curses and Gtk makefiles
-rw-r--r--src/gui/curses/CMakeLists.txt2
-rw-r--r--src/gui/curses/Makefile.am18
-rw-r--r--src/gui/gtk/CMakeLists.txt2
-rw-r--r--src/gui/gtk/Makefile.am18
4 files changed, 12 insertions, 28 deletions
diff --git a/src/gui/curses/CMakeLists.txt b/src/gui/curses/CMakeLists.txt
index 09d731795..3b97bf1bb 100644
--- a/src/gui/curses/CMakeLists.txt
+++ b/src/gui/curses/CMakeLists.txt
@@ -42,6 +42,8 @@ ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
ADD_EXECUTABLE(${EXECUTABLE} ${WEECHAT_CURSES_SRC})
INCLUDE_DIRECTORIES(.. ../../core ../../plugins)
+
+# Because of a linker bug, we have to link 2 times with libweechat_core.a
TARGET_LINK_LIBRARIES(${EXECUTABLE} -lweechat_core ${STATIC_LIBS} ${EXTRA_LIBS})
INSTALL(TARGETS ${EXECUTABLE} RUNTIME DESTINATION bin)
diff --git a/src/gui/curses/Makefile.am b/src/gui/curses/Makefile.am
index b936c6c07..afaa1227c 100644
--- a/src/gui/curses/Makefile.am
+++ b/src/gui/curses/Makefile.am
@@ -18,22 +18,12 @@ INCLUDES = -DLOCALEDIR=\"$(datadir)/locale\" $(NCURSES_CFLAGS)
bin_PROGRAMS = weechat-curses
-weechat_curses_LDADD = ../../core/weechat.o \
- ../../core/wee-backtrace.o \
- ../../core/wee-command.o \
- ../../core/wee-config.o \
- ../../core/wee-config-file.o \
- ../../core/wee-debug.o \
- ../../core/wee-hook.o \
- ../../core/wee-input.o \
- ../../core/wee-list.o \
- ../../core/wee-log.o \
- ../../core/wee-upgrade.o \
- ../../core/wee-string.o \
- ../../core/wee-utf8.o \
- ../../core/wee-util.o \
+# Because of a linker bug, we have to link 2 times with lib_weechat_core.a
+# (and it must be 2 different path/names to be keeped by linker)
+weechat_curses_LDADD = ./../../core/lib_weechat_core.a \
../../plugins/lib_weechat_plugins.a \
../lib_weechat_gui_common.a \
+ ../../core/lib_weechat_core.a \
$(PLUGINS_LFLAGS) \
$(NCURSES_LFLAGS)
diff --git a/src/gui/gtk/CMakeLists.txt b/src/gui/gtk/CMakeLists.txt
index ca7ae90bb..121f4ae19 100644
--- a/src/gui/gtk/CMakeLists.txt
+++ b/src/gui/gtk/CMakeLists.txt
@@ -34,6 +34,8 @@ ENDIF(PKG_CONFIG_FOUND)
ADD_EXECUTABLE(${EXECUTABLE} ${WEECHAT_GTK_SRC})
INCLUDE_DIRECTORIES(.. ../../core ../../plugins)
+
+# Because of a linker bug, we have to link 2 times with libweechat_core.a
TARGET_LINK_LIBRARIES(${EXECUTABLE} -lweechat_core ${STATIC_LIBS} ${EXTRA_LIBS})
INSTALL(TARGETS ${EXECUTABLE} RUNTIME DESTINATION bin)
diff --git a/src/gui/gtk/Makefile.am b/src/gui/gtk/Makefile.am
index 4fcc6424c..03192e8cc 100644
--- a/src/gui/gtk/Makefile.am
+++ b/src/gui/gtk/Makefile.am
@@ -18,22 +18,12 @@ INCLUDES = -DLOCALEDIR=\"$(datadir)/locale\" $(GTK_CFLAGS)
bin_PROGRAMS = weechat-gtk
-weechat_gtk_LDADD = ../../core/weechat.o \
- ../../core/wee-backtrace.o \
- ../../core/wee-command.o \
- ../../core/wee-config.o \
- ../../core/wee-config-file.o \
- ../../core/wee-debug.o \
- ../../core/wee-hook.o \
- ../../core/wee-input.o \
- ../../core/wee-list.o \
- ../../core/wee-log.o \
- ../../core/wee-upgrade.o \
- ../../core/wee-string.o \
- ../../core/wee-utf8.o \
- ../../core/wee-util.o \
+# Because of a linker bug, we have to link 2 times with lib_weechat_core.a
+# (and it must be 2 different path/names to be keeped by linker)
+weechat_gtk_LDADD = ./../../core/lib_weechat_core.a \
../../plugins/lib_weechat_plugins.a \
../lib_weechat_gui_common.a \
+ ../../core/lib_weechat_core.a \
$(PLUGINS_LFLAGS) \
$(GTK_LFLAGS)