moo/moo/lib/Makefile.am

157 lines
3.8 KiB
Makefile
Raw Normal View History

2015-10-14 09:06:44 +00:00
AUTOMAKE_OPTIONS = nostdinc
AM_CFLAGS = $(PTHREAD_CFLAGS)
2015-10-14 09:06:44 +00:00
CPPFLAGS_ALL_COMMON = \
2015-10-14 13:25:36 +00:00
-I$(abs_builddir) \
-I$(abs_srcdir) \
2016-12-31 15:20:52 +00:00
-I$(includedir)
2015-10-14 09:06:44 +00:00
if ENABLE_STATIC_MODULE
LDFLAGS_ALL_COMMON = -L$(abs_builddir)/../mod -L$(abs_builddir) -L$(libdir)
else
2015-10-14 13:25:36 +00:00
LDFLAGS_ALL_COMMON = -L$(abs_builddir) -L$(libdir)
endif
2015-10-14 09:06:44 +00:00
CPPFLAGS_LIB_COMMON = $(CPPFLAGS_ALL_COMMON)
2015-10-14 13:25:36 +00:00
LDFLAGS_LIB_COMMON = $(LDFLAGS_ALL_COMMON) -version-info 1:0:0 -no-undefined
LIBADD_LIB_COMMON =
2018-04-26 03:17:54 +00:00
2015-10-14 09:06:44 +00:00
if WIN32
# you must adjust the value of DEFAULT_MODPOSTFIX according
# to the first number in -version-info above
2018-10-14 10:14:48 +00:00
CPPFLAGS_PFMOD = -DMOO_DEFAULT_PFMODPREFIX=\"libmoo-\" -DMOO_DEFAULT_PFMODPOSTFIX=\"-1.dll\"
2015-10-14 09:06:44 +00:00
else
2018-10-14 10:14:48 +00:00
CPPFLAGS_PFMOD = -DMOO_DEFAULT_PFMODPREFIX=\"$(libdir)/libmoo-\"
if MACOSX
2018-10-14 10:14:48 +00:00
CPPFLAGS_PFMOD += -DMOO_DEFAULT_PFMODPOSTFIX=\".dylib\"
else
2018-10-14 10:14:48 +00:00
CPPFLAGS_PFMOD += -DMOO_DEFAULT_PFMODPOSTFIX=\".so\"
endif
2015-10-14 09:06:44 +00:00
endif
##################################################
# include files to deploy
##################################################
2015-10-14 09:06:44 +00:00
pkgincludedir = $(includedir)
pkginclude_HEADERS = \
2018-04-09 06:21:59 +00:00
moo.h \
moo-bct.h \
2017-01-09 09:54:49 +00:00
moo-cmn.h \
moo-opt.h \
2017-01-09 09:54:49 +00:00
moo-rbt.h \
2018-11-07 15:26:30 +00:00
moo-utl.h \
moo-std.h
2016-05-15 16:01:43 +00:00
##################################################
# libraries to deploy
##################################################
pkglibdir = $(libdir)
pkglib_LTLIBRARIES = libmoo.la libmoox.la
##################################################
# libmoo
##################################################
2017-01-09 09:54:49 +00:00
libmoo_la_SOURCES = \
2018-04-09 06:21:59 +00:00
moo.h \
moo-bct.h \
moo-cmn.h \
moo-rbt.h \
moo-utl.h \
moo-prv.h \
pack1.h \
unpack.h \
2016-05-15 16:01:43 +00:00
bigint.c \
comp.c \
debug.c \
2016-05-27 15:01:54 +00:00
decode.c \
2016-05-15 16:01:43 +00:00
dic.c \
err.c \
2016-05-15 16:01:43 +00:00
exec.c \
fmtout.c \
fmtoutv.h \
2015-10-14 09:06:44 +00:00
gc.c \
2016-05-15 16:01:43 +00:00
heap.c \
2019-05-07 17:29:48 +00:00
mb8.c \
2017-01-09 14:52:15 +00:00
moo.c \
number.c \
2015-10-14 09:06:44 +00:00
obj.c \
pf-basic.c \
pf-sys.c \
pf-utf8.c \
2016-05-15 16:01:43 +00:00
rbt.c \
sym.c \
2015-10-14 09:06:44 +00:00
utf8.c \
utf16.c \
utl.c
libmoo_la_CPPFLAGS = $(CPPFLAGS_LIB_COMMON)
2017-01-09 09:54:49 +00:00
libmoo_la_LDFLAGS = $(LDFLAGS_LIB_COMMON)
libmoo_la_LIBADD = $(LIBADD_LIB_COMMON)
2015-10-14 09:06:44 +00:00
2016-12-31 15:20:52 +00:00
if ENABLE_STATIC_MODULE
libmoo_la_LIBADD += -lmoo-stdio
libmoo_la_DEPENDENCIES = $(abs_builddir)/../mod/libmoo-stdio.la
if ENABLE_MOD_CON
libmoo_la_LIBADD += -lmoo-con
libmoo_la_DEPENDENCIES += $(abs_builddir)/../mod/libmoo-con.la
endif
if ENABLE_MOD_FFI
libmoo_la_LIBADD += -lmoo-ffi
libmoo_la_DEPENDENCIES += $(abs_builddir)/../mod/libmoo-ffi.la
endif
if ENABLE_MOD_SCK
libmoo_la_LIBADD += -lmoo-sck
libmoo_la_DEPENDENCIES += $(abs_builddir)/../mod/libmoo-sck.la
endif
if ENABLE_MOD_X11
libmoo_la_LIBADD += -lmoo-x11
libmoo_la_DEPENDENCIES += $(abs_builddir)/../mod/libmoo-x11.la
endif
2016-12-31 15:20:52 +00:00
endif
##############################################################
# libmoox
##############################################################
libmoox_la_SOURCES = \
moo-opt.h \
moo-std.h \
opt-impl.h \
opt.c \
std.c
if WIN32
libmoox_la_SOURCES += poll-msw.c poll-msw.h
endif
libmoox_la_CPPFLAGS = $(CPPFLAGS_LIB_COMMON) $(CPPFLAGS_PFMOD)
libmoox_la_LDFLAGS = $(LDFLAGS_LIB_COMMON)
libmoox_la_LIBADD = $(LIBADD_LIB_COMMON) -lmoo $(LIBM) $(PTHREAD_LIBS)
if ENABLE_LIBLTDL
libmoox_la_LIBADD += $(LTDL_LIBS)
else
libmoox_la_LIBADD += $(DL_LIBS)
endif
if ENABLE_LIBUNWIND
libmoox_la_LIBADD += $(UNWIND_LIBS)
endif
if WIN32
libmoox_la_LIBADD += -lpsapi
endif
libmoox_la_DEPENDENCIES = libmoo.la
##############################################################
# installation
##############################################################
2015-10-14 09:06:44 +00:00
install-data-hook:
2017-01-09 09:54:49 +00:00
@echo "#ifndef _MOO_CFG_H_" > "$(DESTDIR)$(pkgincludedir)/moo-cfg.h"
@echo "#define _MOO_CFG_H_" >> "$(DESTDIR)$(pkgincludedir)/moo-cfg.h"
@$(EGREP) "#define[ ]+MOO_" "$(abs_builddir)/moo-cfg.h" >> "$(DESTDIR)$(pkgincludedir)/moo-cfg.h"
@echo "#endif" >> "$(DESTDIR)$(pkgincludedir)/moo-cfg.h"
@rm -f "$(DESTDIR)$(pkgincludedir)/moo-cfg.h.in"
@$(SED) 's|/\*#define MOO_HAVE_CFG_H\*/|#define MOO_HAVE_CFG_H|' "$(srcdir)/moo-cmn.h" > "$(DESTDIR)$(pkgincludedir)/moo-cmn.h"
2015-10-14 09:06:44 +00:00
uninstall-hook:
2017-01-09 09:54:49 +00:00
@rm -f "$(DESTDIR)$(pkgincludedir)/moo-cfg.h"