## Process this file with automake to produce Makefile.in -*- makefile -*-
-
-
bin_PROGRAMS += src/ui/gui/psppire
src_ui_gui_psppire_CFLAGS = $(GTK_CFLAGS) $(GLADE_CFLAGS) -Wall \
src_ui_gui_psppire_LDFLAGS = \
- $(PG_LDFLAGS) \
- -export-dynamic
+ $(PG_LDFLAGS)
+
if RELOCATABLE_VIA_LD
endif
-pkglib_LTLIBRARIES = src/ui/gui/libpsppire.la
+# The library libpsppire contains a single function to register our custom widgets with libglade.
+# This library is dynamically loaded by libglade. On w32 platforms, dynamic libraries simply
+# can't be created unless all of the symbols can be resolved at link time. Thus, all the custom
+# widgets have to be available.
+# But they can't appear in the library AND the binary, otherwise glib complains about them already
+# existing (and its a waste of space). So we have a seperate shared library (statically loaded)
+# libpsppwidgets which contains our custom widgets.
+
+pkglib_LTLIBRARIES = src/ui/gui/libpsppwidgets.la src/ui/gui/libpsppire.la
+
+src_ui_gui_libpsppwidgets_la_CFLAGS = $(GTK_CFLAGS)
+src_ui_gui_libpsppwidgets_la_LDFLAGS = -no-undefined
+src_ui_gui_libpsppwidgets_la_LIBADD = $(GTK_LIBS)
+
+src_ui_gui_libpsppwidgets_la_SOURCES = \
+ src/ui/gui/psppire-dialog.c \
+ src/ui/gui/psppire-keypad.c \
+ src/ui/gui/psppire-selector.c \
+ src/ui/gui/psppire-buttonbox.c \
+ src/ui/gui/psppire-hbuttonbox.c \
+ src/ui/gui/psppire-vbuttonbox.c \
+ src/ui/gui/psppire-acr.c
+
src_ui_gui_libpsppire_la_CFLAGS = $(GLADE_CFLAGS)
+src_ui_gui_libpsppire_la_LDFLAGS = -no-undefined
+src_ui_gui_libpsppire_la_LIBADD = $(GLADE_LIBS) src/ui/gui/libpsppwidgets.la
src_ui_gui_libpsppire_la_SOURCES = \
src/ui/gui/glade-register.c
src_ui_gui_psppire_LDADD = \
-dlopen src/ui/gui/libpsppire.la \
+ src/ui/gui/libpsppwidgets.la \
lib/gtksheet/libgtksheet.a \
src/language/liblanguage.a \
src/ui/libuicommon.a \
src/ui/gui/oneway-anova-dialog.h \
src/ui/gui/output-viewer.c \
src/ui/gui/output-viewer.h \
- src/ui/gui/psppire-acr.c \
src/ui/gui/psppire-acr.h \
- src/ui/gui/psppire-buttonbox.c \
src/ui/gui/psppire-buttonbox.h \
- src/ui/gui/psppire-hbuttonbox.c \
src/ui/gui/psppire-hbuttonbox.h \
- src/ui/gui/psppire-vbuttonbox.c \
src/ui/gui/psppire-vbuttonbox.h \
src/ui/gui/psppire-case-file.c \
src/ui/gui/psppire-case-file.h \
src/ui/gui/psppire-data-editor.h \
src/ui/gui/psppire-data-store.c \
src/ui/gui/psppire-data-store.h \
- src/ui/gui/psppire-dialog.c \
src/ui/gui/psppire-dialog.h \
src/ui/gui/psppire-dict.c \
src/ui/gui/psppire-dict.h \
- src/ui/gui/psppire-keypad.c \
src/ui/gui/psppire-keypad.h \
- src/ui/gui/psppire-selector.c \
src/ui/gui/psppire-selector.h \
src/ui/gui/psppire-var-ptr.c \
src/ui/gui/psppire-var-ptr.h \