165 lines
4.4 KiB
Makefile
165 lines
4.4 KiB
Makefile
AM_CFLAGS = $(MOO_CFLAGS)
|
|
AM_CXXFLAGS = $(MOO_CXXFLAGS)
|
|
|
|
ini_in_files = moopython/pymoo.ini.in
|
|
ini_files = $(ini_in_files:.ini.in=.ini)
|
|
%.ini: %.ini.in $(top_builddir)/config.status
|
|
cd $(top_builddir) && $(SHELL) ./config.status --file=$(subdir)/$@
|
|
CLEANFILES += $(ini_files)
|
|
|
|
scriptsdir = ${MOO_DATA_DIR}/scripts
|
|
scripts_SCRIPTS = \
|
|
xdg-utils/xdg-open \
|
|
xdg-utils/xdg-email \
|
|
moo-open-html-help
|
|
|
|
EXTRA_DIST += \
|
|
$(ini_in_files) \
|
|
$(scripts_SCRIPTS)
|
|
|
|
marshals =
|
|
|
|
subdirs =
|
|
libs =
|
|
sub_marshals_h =
|
|
if MOO_BUILD_LUA
|
|
subdirs += moolua
|
|
libs += moolua/libmoolua.la
|
|
endif
|
|
if MOO_BUILD_UTILS
|
|
subdirs += mooutils
|
|
libs += mooutils/libmooutils.la
|
|
marshals += $(srcdir)/mooutils/marshals.list
|
|
sub_marshals_h += mooutils/marshals.h
|
|
endif
|
|
if MOO_BUILD_EDIT
|
|
if GTK_2_6
|
|
subdirs += moofileview
|
|
libs += moofileview/libmoofileview.la
|
|
marshals += $(srcdir)/moofileview/marshals.list
|
|
sub_marshals_h += moofileview/marshals.h
|
|
endif
|
|
subdirs += mooedit
|
|
libs += mooedit/libmooedit.la
|
|
marshals += $(srcdir)/mooedit/marshals.list
|
|
sub_marshals_h += mooedit/marshals.h
|
|
endif
|
|
if MOO_BUILD_APP
|
|
subdirs += mooapp
|
|
libs += mooapp/libmooapp.la
|
|
marshals += $(srcdir)/mooapp/marshals.list
|
|
sub_marshals_h += mooapp/marshals.h
|
|
endif
|
|
|
|
if MOO_USE_PYTHON
|
|
subdirs += moopython
|
|
endif
|
|
|
|
SUBDIRS = $(subdirs) .
|
|
DIST_SUBDIRS = moolua mooutils mooedit mooapp moopython moofileview
|
|
|
|
lib_LTLIBRARIES =
|
|
noinst_LTLIBRARIES =
|
|
|
|
############################################################################
|
|
# libmoo
|
|
#
|
|
if MOO_INSTALL_LIB
|
|
lib_LTLIBRARIES += libmoo.la
|
|
endif
|
|
|
|
nodist_libmoo_la_SOURCES =
|
|
|
|
libmoo_la_RC_IN_FILE = libmoo.rc.in
|
|
moo_la_RC_IN_FILE = moo.rc.in
|
|
pymoo_la_RC_IN_FILE = pymoo.rc.in
|
|
|
|
if MOO_OS_MINGW
|
|
libs += -lwsock32
|
|
endif
|
|
|
|
if MOO_ENABLE_TESTS
|
|
export_flags = -export-symbols-regex ".*"
|
|
else
|
|
if MOO_DEBUG_ENABLED # && !MOO_ENABLE_TESTS
|
|
export_flags = -export-symbols-regex ".*"
|
|
else # !MOO_DEBUG_ENABLED && !MOO_ENABLE_TESTS
|
|
export_flags = -export-symbols-regex "^(moo_|_moo_|md_).*"
|
|
endif
|
|
endif
|
|
|
|
libmoo_la_LIBADD = $(libs) $(MOO_LIBS)
|
|
libmoo_la_LDFLAGS += -no-undefined -avoid-version $(export_flags)
|
|
libmoo_la_SOURCES =
|
|
|
|
|
|
BUILT_SOURCES += mooutils/marshals.c marshals.list
|
|
CLEANFILES += mooutils/marshals.c marshals.list
|
|
mooutils/marshals.c: marshals.list
|
|
$(GLIB_GENMARSHAL) --prefix=_moo_marshal --header marshals.list > $@.tmp && \
|
|
$(GLIB_GENMARSHAL) --prefix=_moo_marshal --body marshals.list >> $@.tmp && \
|
|
mv $@.tmp $@
|
|
marshals.list: $(marshals)
|
|
( cat $(marshals) | uniq ) > marshals.list.tmp && mv marshals.list.tmp marshals.list
|
|
|
|
BUILT_SOURCES += $(sub_marshals_h)
|
|
CLEANFILES += $(sub_marshals_h)
|
|
EXTRA_DIST += mooutils/marshals.list mooapp/marshals.list moofileview/marshals.list mooedit/marshals.list
|
|
%/marshals.h: $(srcdir)/%/marshals.list
|
|
$(GLIB_GENMARSHAL) --prefix=_moo_marshal --header $(srcdir)/$*/marshals.list > $@.tmp && \
|
|
mv $@.tmp $@
|
|
|
|
|
|
############################################################################
|
|
# python stuff
|
|
#
|
|
if MOO_USE_PYTHON
|
|
|
|
moo_la_ldflags = -no-undefined -module -avoid-version -export-symbols-regex initmoo
|
|
pymoo_la_ldflags = -no-undefined -module -avoid-version -export-symbols-regex moo_module_init
|
|
|
|
############################################################################
|
|
# Unix
|
|
#
|
|
if MOO_OS_UNIX
|
|
|
|
if MOO_BUILD_MOO_MODULE
|
|
pyexec_LTLIBRARIES = moo.la
|
|
moo_la_SOURCES =
|
|
moo_la_LDFLAGS += $(moo_la_ldflags) $(PYTHON_LDFLAGS)
|
|
moo_la_LIBADD = moopython/libmoomod.la libmoo.la $(MOO_LIBS) $(PYTHON_LIBS)
|
|
endif MOO_BUILD_MOO_MODULE
|
|
|
|
if MOO_BUILD_PYTHON_PLUGIN
|
|
plugindir = $(MOO_LIB_DIR)/plugins
|
|
plugin_LTLIBRARIES = pymoo.la
|
|
plugin_DATA = moopython/pymoo.ini
|
|
pymoo_la_SOURCES =
|
|
pymoo_la_LDFLAGS += $(pymoo_la_ldflags) $(PYTHON_LDFLAGS) $(PYTHON_EXTRA_LDFLAGS)
|
|
pymoo_la_LIBADD = moopython/libpymoo.la libmoo.la $(MOO_LIBS) $(PYTHON_LIBS) $(PYTHON_EXTRA_LIBS)
|
|
endif MOO_BUILD_PYTHON_PLUGIN
|
|
|
|
############################################################################
|
|
# Win32
|
|
#
|
|
else !MOO_OS_UNIX
|
|
|
|
moo_la_ldflags += -shrext ".pyd"
|
|
plugindir = $(MOO_LIB_DIR)/plugins
|
|
pluginlibdir = $(plugindir)/lib
|
|
plugin_LTLIBRARIES = pymoo.la
|
|
pluginlib_LTLIBRARIES = moo.la
|
|
|
|
plugin_DATA = moopython/pymoo.ini
|
|
|
|
pymoo_la_SOURCES =
|
|
pymoo_la_LDFLAGS += $(pymoo_la_ldflags) $(PYTHON_LDFLAGS) $(PYTHON_EXTRA_LDFLAGS)
|
|
pymoo_la_LIBADD = moopython/libpymoo.la libmoo.la $(MOO_LIBS) $(PYTHON_LIBS) $(PYTHON_EXTRA_LIBS)
|
|
moo_la_SOURCES =
|
|
moo_la_LDFLAGS += $(moo_la_ldflags) $(PYTHON_LDFLAGS)
|
|
moo_la_LIBADD = moopython/libmoomod.la libmoo.la $(MOO_LIBS) $(PYTHON_LIBS)
|
|
|
|
endif !MOO_OS_UNIX
|
|
|
|
endif MOO_USE_PYTHON
|