2015-10-14 09:06:44 +00:00
|
|
|
AUTOMAKE_OPTIONS = nostdinc
|
|
|
|
|
2020-11-15 09:06:57 +00:00
|
|
|
CPPFLAGS_COMMON = \
|
2015-10-14 13:25:36 +00:00
|
|
|
-I$(abs_builddir) \
|
|
|
|
-I$(abs_srcdir) \
|
2020-11-15 09:06:57 +00:00
|
|
|
-I$(includedir)
|
|
|
|
|
|
|
|
CFLAGS_COMMON =
|
2015-10-14 09:06:44 +00:00
|
|
|
|
2017-02-03 06:28:12 +00:00
|
|
|
if ENABLE_STATIC_MODULE
|
2020-11-15 09:06:57 +00:00
|
|
|
LDFLAGS_COMMON = -L$(abs_builddir)/../mod -L$(abs_builddir) -L$(libdir)
|
2017-02-03 06:28:12 +00:00
|
|
|
else
|
2020-11-15 09:06:57 +00:00
|
|
|
LDFLAGS_COMMON = -L$(abs_builddir) -L$(libdir)
|
2017-02-03 06:28:12 +00:00
|
|
|
endif
|
2015-10-14 09:06:44 +00:00
|
|
|
|
2020-11-15 09:06:57 +00:00
|
|
|
LDFLAGS_COMMON += -version-info 1:0:0 -no-undefined
|
|
|
|
LIBADD_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-\"
|
2018-10-14 07:31:44 +00:00
|
|
|
if MACOSX
|
2018-10-14 10:14:48 +00:00
|
|
|
CPPFLAGS_PFMOD += -DMOO_DEFAULT_PFMODPOSTFIX=\".dylib\"
|
2018-10-14 07:31:44 +00:00
|
|
|
else
|
2018-10-14 10:14:48 +00:00
|
|
|
CPPFLAGS_PFMOD += -DMOO_DEFAULT_PFMODPOSTFIX=\".so\"
|
2018-10-14 07:31:44 +00:00
|
|
|
endif
|
2015-10-14 09:06:44 +00:00
|
|
|
endif
|
|
|
|
|
2019-05-21 17:24:27 +00:00
|
|
|
##################################################
|
|
|
|
# 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 \
|
2019-11-19 09:40:26 +00:00
|
|
|
moo-chr.h \
|
2017-01-09 09:54:49 +00:00
|
|
|
moo-cmn.h \
|
2019-11-21 09:04:53 +00:00
|
|
|
moo-fmt.h \
|
2017-11-22 04:52:45 +00:00
|
|
|
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 \
|
2020-11-01 19:57:41 +00:00
|
|
|
moo-xma.h \
|
2018-11-07 15:26:30 +00:00
|
|
|
moo-std.h
|
2016-05-15 16:01:43 +00:00
|
|
|
|
2019-05-21 17:24:27 +00:00
|
|
|
##################################################
|
|
|
|
# libraries to deploy
|
|
|
|
##################################################
|
|
|
|
pkglibdir = $(libdir)
|
2020-11-15 09:06:57 +00:00
|
|
|
pkglib_LTLIBRARIES = libmoo.la
|
2019-05-19 17:16:23 +00:00
|
|
|
|
2019-05-21 17:24:27 +00:00
|
|
|
##################################################
|
|
|
|
# libmoo
|
|
|
|
##################################################
|
2020-11-15 09:06:57 +00:00
|
|
|
## core source code
|
2017-01-09 09:54:49 +00:00
|
|
|
libmoo_la_SOURCES = \
|
2019-11-15 09:39:12 +00:00
|
|
|
bct-lab.h \
|
2018-04-09 06:21:59 +00:00
|
|
|
moo.h \
|
2019-11-21 09:04:53 +00:00
|
|
|
moo-chr.h \
|
2018-04-09 06:21:59 +00:00
|
|
|
moo-cmn.h \
|
2019-11-21 09:04:53 +00:00
|
|
|
moo-fmt.h \
|
2018-04-09 06:21:59 +00:00
|
|
|
moo-rbt.h \
|
|
|
|
moo-utl.h \
|
|
|
|
moo-prv.h \
|
|
|
|
pack1.h \
|
|
|
|
unpack.h \
|
2016-05-15 16:01:43 +00:00
|
|
|
bigint.c \
|
2019-11-22 08:23:33 +00:00
|
|
|
chr.c \
|
2016-05-15 16:01:43 +00:00
|
|
|
comp.c \
|
|
|
|
debug.c \
|
2016-05-27 15:01:54 +00:00
|
|
|
decode.c \
|
2016-05-15 16:01:43 +00:00
|
|
|
dic.c \
|
2016-12-27 18:15:35 +00:00
|
|
|
err.c \
|
2016-05-15 16:01:43 +00:00
|
|
|
exec.c \
|
2019-11-21 09:04:53 +00:00
|
|
|
fmt-imp.h \
|
2019-05-27 17:50:24 +00:00
|
|
|
fmt.c \
|
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 \
|
2018-12-20 16:33:23 +00:00
|
|
|
number.c \
|
2015-10-14 09:06:44 +00:00
|
|
|
obj.c \
|
2017-12-05 16:51:20 +00:00
|
|
|
pf-basic.c \
|
2017-12-08 15:28:51 +00:00
|
|
|
pf-sys.c \
|
2018-06-17 17:41:04 +00:00
|
|
|
pf-utf8.c \
|
2016-05-15 16:01:43 +00:00
|
|
|
rbt.c \
|
|
|
|
sym.c \
|
2019-11-19 09:40:26 +00:00
|
|
|
uch-case.h \
|
|
|
|
uch-prop.h \
|
2015-10-14 09:06:44 +00:00
|
|
|
utf8.c \
|
2018-11-14 04:25:27 +00:00
|
|
|
utf16.c \
|
2020-10-31 04:39:32 +00:00
|
|
|
utl.c \
|
|
|
|
xma.c
|
2020-11-15 09:06:57 +00:00
|
|
|
|
|
|
|
# non-core/helper source code
|
|
|
|
libmoo_la_SOURCES += \
|
|
|
|
moo-opt.h \
|
|
|
|
moo-std.h \
|
|
|
|
opt-imp.h \
|
|
|
|
opt.c \
|
|
|
|
std.c
|
|
|
|
if WIN32
|
|
|
|
libmoo_la_SOURCES += poll-msw.c poll-msw.h
|
|
|
|
endif
|
|
|
|
|
|
|
|
libmoo_la_CPPFLAGS = $(CPPFLAGS_COMMON)
|
|
|
|
libmoo_la_CFLAGS = $(CFLAGS_COMMON)
|
|
|
|
libmoo_la_LDFLAGS = $(LDFLAGS_COMMON)
|
|
|
|
libmoo_la_LIBADD = $(LIBADD_COMMON) $(LIBM)
|
|
|
|
|
|
|
|
if ENABLE_LIBLTDL
|
|
|
|
libmoo_la_LIBADD += $(LTDL_LIBS)
|
|
|
|
else
|
|
|
|
libmoo_la_LIBADD += $(DL_LIBS)
|
|
|
|
endif
|
|
|
|
if ENABLE_LIBUNWIND
|
|
|
|
libmoo_la_LIBADD += $(UNWIND_LIBS)
|
|
|
|
endif
|
|
|
|
if WIN32
|
|
|
|
libmoo_la_LIBADD += -lpsapi $(SOCKET_LIBS)
|
|
|
|
endif
|
|
|
|
|
2016-12-31 15:20:52 +00:00
|
|
|
if ENABLE_STATIC_MODULE
|
2017-04-28 04:03:52 +00:00
|
|
|
|
2017-12-13 10:57:31 +00:00
|
|
|
if ENABLE_MOD_CON
|
2020-11-16 13:02:52 +00:00
|
|
|
libmoo_la_LIBADD += ../mod/libmoo-con.la
|
2017-12-13 10:57:31 +00:00
|
|
|
endif
|
2019-10-24 09:37:47 +00:00
|
|
|
|
2017-04-28 04:03:52 +00:00
|
|
|
if ENABLE_MOD_FFI
|
2020-11-16 13:02:52 +00:00
|
|
|
libmoo_la_LIBADD += ../mod/libmoo-ffi.la
|
2017-04-28 04:03:52 +00:00
|
|
|
endif
|
2019-10-24 09:37:47 +00:00
|
|
|
|
2020-11-16 13:02:52 +00:00
|
|
|
libmoo_la_LIBADD += ../mod/libmoo-io.la
|
2019-10-24 09:37:47 +00:00
|
|
|
|
2017-10-18 16:15:51 +00:00
|
|
|
if ENABLE_MOD_SCK
|
2020-11-16 13:02:52 +00:00
|
|
|
libmoo_la_LIBADD += ../mod/libmoo-sck.la
|
2017-10-18 16:15:51 +00:00
|
|
|
endif
|
2019-10-24 09:37:47 +00:00
|
|
|
|
2020-11-16 13:02:52 +00:00
|
|
|
libmoo_la_LIBADD += ../mod/libmoo-stdio.la
|
2019-10-24 09:37:47 +00:00
|
|
|
|
2017-04-28 04:03:52 +00:00
|
|
|
if ENABLE_MOD_X11
|
2020-11-16 13:02:52 +00:00
|
|
|
libmoo_la_LIBADD += ../mod/libmoo-x11.la
|
2017-04-28 04:03:52 +00:00
|
|
|
endif
|
2016-12-31 15:20:52 +00:00
|
|
|
endif
|
|
|
|
|
2019-05-21 17:24:27 +00:00
|
|
|
|
|
|
|
##############################################################
|
|
|
|
# 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"
|