moo/stix/lib/Makefile.am

105 lines
2.7 KiB
Makefile
Raw Normal View History

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) \
2015-10-14 09:06:44 +00:00
-I$(includedir)
2015-10-14 13:25:36 +00:00
LDFLAGS_ALL_COMMON = -L$(abs_builddir) -L$(libdir)
2015-10-14 09:06:44 +00:00
##################################################
# MAIN LIBRARY
##################################################
CPPFLAGS_LIB_COMMON = $(CPPFLAGS_ALL_COMMON) $(LTDLINCL)
2015-10-14 13:25:36 +00:00
LDFLAGS_LIB_COMMON = $(LDFLAGS_ALL_COMMON) -version-info 1:0:0 -no-undefined
2015-10-14 09:06:44 +00:00
LIBADD_LIB_COMMON = $(LIBM) $(LIBLTDL)
if WIN32
# you must adjust the value of DEFAULT_MODPOSTFIX according
# to the first number in -version-info above
CPPFLAGS_LIB_COMMON += -DSTIX_DEFAULT_MODPREFIX=\"libstix-\" -DSTIX_DEFAULT_MODPOSTFIX=\"-1\"
else
CPPFLAGS_LIB_COMMON += -DSTIX_DEFAULT_MODPREFIX=\"$(libdir)/libstix-\" -DSTIX_DEFAULT_MODPOSTFIX=\"\"
endif
pkgincludedir = $(includedir)
pkglibdir = $(libdir)
pkgbindir = $(bindir)
pkginclude_HEADERS = \
stix-cfg.h \
stix-cmn.h \
stix-rbt.h \
2015-10-14 13:25:36 +00:00
stix-utl.h \
2015-10-14 09:06:44 +00:00
stix.h
pkglib_LTLIBRARIES = libstix.la
libstix_la_SOURCES = \
stix-prv.h \
stix-rbt.c \
2015-10-14 13:25:36 +00:00
stix-utl.c \
2015-10-14 09:06:44 +00:00
stix.c \
heap.c \
gc.c \
obj.c \
sym.c \
dic.c \
proc.c \
2015-10-29 15:24:46 +00:00
bigint.c \
2015-10-14 09:06:44 +00:00
ignite.c \
utf8.c \
comp.c \
exec.c \
debug.c
libstix_la_CPPFLAGS = $(CPPFLAGS_LIB_COMMON)
libstix_la_LDFLAGS = $(LDFLAGS_LIB_COMMON)
libstix_la_LIBADD = $(LIBADD_LIB_COMMON)
pkgbin_PROGRAMS = stix
stix_SOURCES = main.c
stix_CPPFLAGS = $(CPPFLAGS_LIB_COMMON)
stix_LDFLAGS = $(LDFLAGS_LIB_COMMON)
stix_LDADD = $(LIBADD_LIB_COMMON) -lstix -ldyncall_s
if ENABLE_STATIC_MODULE
##################################################
# STATIC MODULES BUILT INTO MAIN LIBRARY
##################################################
#libstix_la_SOURCES += \
# mod-dir.c mod-dir.h \
#libstix_la_LIBADD +=
else
##################################################
# DYNAMIC MODULES
##################################################
2015-10-14 13:25:36 +00:00
CPPFLAGS_MOD_COMMON = $(CPPFLAGS_LIB_COMMON)
LDFLAGS_MOD_COMMON = $(LDFLAGS_LIB_COMMON)
LIBADD_MOD_COMMON = -lstix
2015-10-14 09:06:44 +00:00
2015-10-14 13:25:36 +00:00
pkgmodexecdir = $(libdir)
2015-10-14 09:06:44 +00:00
2015-10-14 13:25:36 +00:00
pkgmodexec_LTLIBRARIES = libstix-snd.la
libstix_snd_la_SOURCES = mod-snd.c mod-snd.h
libstix_snd_la_CPPFLAGS = $(CPPFLAGS_MOD_COMMON)
libstix_snd_la_LDFLAGS = $(LDFLAGS_MOD_COMMON)
libstix_snd_la_LIBADD = $(LIBADD_MOD_COMMON)
2015-10-14 09:06:44 +00:00
endif
install-data-hook:
@echo "#ifndef _STIX_CFG_H_" > "$(DESTDIR)$(pkgincludedir)/stix-cfg.h"
@echo "#define _STIX_CFG_H_" >> "$(DESTDIR)$(pkgincludedir)/stix-cfg.h"
@$(EGREP) "#define[ ]+STIX_" "$(abs_builddir)/stix-cfg.h" >> "$(DESTDIR)$(pkgincludedir)/stix-cfg.h"
@echo "#endif" >> "$(DESTDIR)$(pkgincludedir)/stix-cfg.h"
@$(RM) "$(DESTDIR)$(pkgincludedir)/stix-cfg.h.in"
@$(SED) 's|/\*#define STIX_HAVE_CFG_H\*/|#define STIX_HAVE_CFG_H|' "$(srcdir)/stix-cmn.h" > "$(DESTDIR)$(pkgincludedir)/stix-cmn.h"
uninstall-hook:
@$(RM) "$(DESTDIR)$(pkgincludedir)/stix-cfg.h"