2015-10-14 09:06:44 +00:00
|
|
|
AUTOMAKE_OPTIONS = nostdinc
|
|
|
|
|
|
|
|
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
|
|
|
|
2017-02-03 06:28:12 +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)
|
2017-02-03 06:28:12 +00:00
|
|
|
endif
|
2015-10-14 09:06:44 +00:00
|
|
|
|
|
|
|
##################################################
|
|
|
|
# MAIN LIBRARY
|
|
|
|
##################################################
|
|
|
|
|
2017-02-09 16:30:28 +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
|
2017-02-09 16:30:28 +00:00
|
|
|
LIBADD_LIB_COMMON = $(LIBM)
|
|
|
|
|
|
|
|
if ENABLE_LIBLTDL
|
|
|
|
CPPFLAGS_LIB_COMMON += $(LTDLINCL)
|
|
|
|
LIBADD_LIB_COMMON += $(LIBLTDL)
|
|
|
|
endif
|
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
|
2017-01-09 09:54:49 +00:00
|
|
|
CPPFLAGS_LIB_COMMON += -DMOO_DEFAULT_MODPREFIX=\"libmoo-\" -DMOO_DEFAULT_MODPOSTFIX=\"-1\"
|
2015-10-14 09:06:44 +00:00
|
|
|
else
|
2017-01-09 09:54:49 +00:00
|
|
|
CPPFLAGS_LIB_COMMON += -DMOO_DEFAULT_MODPREFIX=\"$(libdir)/libmoo-\" -DMOO_DEFAULT_MODPOSTFIX=\"\"
|
2015-10-14 09:06:44 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
pkgincludedir = $(includedir)
|
|
|
|
pkglibdir = $(libdir)
|
|
|
|
|
|
|
|
pkginclude_HEADERS = \
|
2017-01-09 09:54:49 +00:00
|
|
|
moo-cmn.h \
|
|
|
|
moo-rbt.h \
|
|
|
|
moo-utl.h \
|
|
|
|
moo.h
|
2015-10-14 09:06:44 +00:00
|
|
|
|
2017-01-09 09:54:49 +00:00
|
|
|
noinst_HEADERS = moo-prv.h
|
2016-05-15 16:01:43 +00:00
|
|
|
|
2017-01-09 09:54:49 +00:00
|
|
|
pkglib_LTLIBRARIES = libmoo.la
|
|
|
|
libmoo_la_SOURCES = \
|
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 \
|
2016-12-27 18:15:35 +00:00
|
|
|
err.c \
|
2016-05-15 16:01:43 +00:00
|
|
|
exec.c \
|
2016-06-03 15:46:01 +00:00
|
|
|
logfmtv.h \
|
|
|
|
logfmt.c \
|
2015-10-14 09:06:44 +00:00
|
|
|
gc.c \
|
2016-05-15 16:01:43 +00:00
|
|
|
heap.c \
|
2017-01-09 14:52:15 +00:00
|
|
|
moo.c \
|
2015-10-14 09:06:44 +00:00
|
|
|
obj.c \
|
2016-05-15 16:01:43 +00:00
|
|
|
rbt.c \
|
|
|
|
sym.c \
|
2015-10-14 09:06:44 +00:00
|
|
|
utf8.c \
|
2016-05-15 16:01:43 +00:00
|
|
|
utl.c
|
2017-01-09 09:54:49 +00:00
|
|
|
libmoo_la_CPPFLAGS = $(CPPFLAGS_LIB_COMMON)
|
|
|
|
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
|
2017-04-28 04:03:52 +00:00
|
|
|
libmoo_la_LIBADD += -lmoo-console -lmoo-stdio
|
2017-02-03 06:28:12 +00:00
|
|
|
libmoo_la_DEPENDENCIES = \
|
|
|
|
$(abs_builddir)/../mod/libmoo-console.la \
|
2017-04-28 04:03:52 +00:00
|
|
|
$(abs_builddir)/../mod/libmoo-stdio.la
|
|
|
|
|
|
|
|
if ENABLE_MOD_FFI
|
|
|
|
libmoo_la_LIBADD += -lmoo-ffi
|
|
|
|
libmoo_la_DEPENDENCIES += $(abs_builddir)/../mod/libmoo-ffi.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
|
|
|
|
|
2017-01-09 09:54:49 +00:00
|
|
|
bin_PROGRAMS = moo
|
|
|
|
moo_SOURCES = main.c
|
|
|
|
moo_CPPFLAGS = $(CPPFLAGS_LIB_COMMON)
|
|
|
|
moo_LDFLAGS = $(LDFLAGS_LIB_COMMON)
|
2017-02-21 19:20:27 +00:00
|
|
|
moo_LDADD = $(LIBADD_LIB_COMMON) -lmoo -lpthread
|
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"
|