2016-09-28 14:40:37 +00:00
|
|
|
AUTOMAKE_OPTIONS = nostdinc
|
|
|
|
|
2018-03-13 10:20:33 +00:00
|
|
|
AM_CFLAGS = $(PTHREAD_CFLAGS)
|
|
|
|
|
2016-09-28 14:40:37 +00:00
|
|
|
CPPFLAGS_ALL_COMMON = \
|
|
|
|
-I$(abs_builddir) \
|
|
|
|
-I$(abs_srcdir) \
|
|
|
|
-I$(includedir)
|
|
|
|
|
2018-02-15 15:36:15 +00:00
|
|
|
if ENABLE_STATIC_MODULE
|
|
|
|
LDFLAGS_ALL_COMMON = -L$(abs_builddir)/../mod -L$(abs_builddir) -L$(libdir)
|
|
|
|
else
|
2016-09-28 14:40:37 +00:00
|
|
|
LDFLAGS_ALL_COMMON = -L$(abs_builddir) -L$(libdir)
|
2018-02-15 15:36:15 +00:00
|
|
|
endif
|
|
|
|
|
2016-09-28 14:40:37 +00:00
|
|
|
|
|
|
|
##################################################
|
|
|
|
# MAIN LIBRARY
|
|
|
|
##################################################
|
|
|
|
|
|
|
|
CPPFLAGS_LIB_COMMON = $(CPPFLAGS_ALL_COMMON)
|
|
|
|
LDFLAGS_LIB_COMMON = $(LDFLAGS_ALL_COMMON) -version-info 1:0:0 -no-undefined
|
|
|
|
LIBADD_LIB_COMMON = $(LIBM)
|
|
|
|
|
2018-03-07 07:50:28 +00:00
|
|
|
if ENABLE_LIBLTDL
|
|
|
|
LIBADD_LIB_COMMON += $(LTDL_LIBS)
|
|
|
|
else
|
2018-02-09 03:48:30 +00:00
|
|
|
LIBADD_LIB_COMMON += $(DL_LIBS)
|
2018-03-07 07:50:28 +00:00
|
|
|
endif
|
|
|
|
|
2018-02-09 03:48:30 +00:00
|
|
|
|
2016-09-28 14:40:37 +00:00
|
|
|
pkgincludedir = $(includedir)
|
|
|
|
pkglibdir = $(libdir)
|
|
|
|
|
|
|
|
pkginclude_HEADERS = \
|
2018-04-09 06:11:57 +00:00
|
|
|
hcl.h \
|
2016-09-28 14:40:37 +00:00
|
|
|
hcl-cmn.h \
|
2018-04-09 06:11:57 +00:00
|
|
|
hcl-opt.h \
|
2016-09-28 14:40:37 +00:00
|
|
|
hcl-rbt.h \
|
2018-04-09 06:11:57 +00:00
|
|
|
hcl-utl.h
|
2016-09-28 14:40:37 +00:00
|
|
|
|
|
|
|
pkglib_LTLIBRARIES = libhcl.la
|
|
|
|
libhcl_la_SOURCES = \
|
2018-04-09 06:11:57 +00:00
|
|
|
hcl.h \
|
|
|
|
hcl-cmn.h \
|
|
|
|
hcl-opt.h \
|
|
|
|
hcl-rbt.h \
|
|
|
|
hcl-utl.h \
|
2016-09-28 14:40:37 +00:00
|
|
|
hcl-prv.h \
|
|
|
|
bigint.c \
|
|
|
|
comp.c \
|
|
|
|
debug.c \
|
|
|
|
decode.c \
|
|
|
|
dic.c \
|
2018-02-05 10:43:25 +00:00
|
|
|
err.c \
|
2016-09-28 14:40:37 +00:00
|
|
|
exec.c \
|
|
|
|
gc.c \
|
|
|
|
hcl.c \
|
|
|
|
heap.c \
|
2018-04-09 06:11:57 +00:00
|
|
|
logfmtv.h \
|
2016-09-28 14:40:37 +00:00
|
|
|
logfmt.c \
|
2018-03-28 16:40:42 +00:00
|
|
|
number.c \
|
2016-09-28 14:40:37 +00:00
|
|
|
obj.c \
|
2018-04-09 05:36:32 +00:00
|
|
|
opt-impl.h \
|
2018-02-05 10:43:25 +00:00
|
|
|
opt.c \
|
2016-10-06 17:49:47 +00:00
|
|
|
prim.c \
|
2016-09-28 14:40:37 +00:00
|
|
|
print.c \
|
|
|
|
rbt.c \
|
|
|
|
read.c \
|
|
|
|
sym.c \
|
|
|
|
utf8.c \
|
|
|
|
utl.c
|
|
|
|
libhcl_la_CPPFLAGS = $(CPPFLAGS_LIB_COMMON)
|
|
|
|
libhcl_la_LDFLAGS = $(LDFLAGS_LIB_COMMON)
|
|
|
|
libhcl_la_LIBADD = $(LIBADD_LIB_COMMON)
|
2018-02-15 15:36:15 +00:00
|
|
|
libhcl_la_DEPENDENCIES =
|
|
|
|
|
2018-03-13 10:20:33 +00:00
|
|
|
if ENABLE_STATIC_MODULE
|
2018-02-15 15:36:15 +00:00
|
|
|
libhcl_la_LIBADD += -lhcl-arr
|
|
|
|
libhcl_la_DEPENDENCIES += $(abs_builddir)/../mod/libhcl-arr.la
|
|
|
|
libhcl_la_LIBADD += -lhcl-dic
|
|
|
|
libhcl_la_DEPENDENCIES += $(abs_builddir)/../mod/libhcl-dic.la
|
|
|
|
libhcl_la_LIBADD += -lhcl-str
|
|
|
|
libhcl_la_DEPENDENCIES += $(abs_builddir)/../mod/libhcl-str.la
|
|
|
|
endif
|
|
|
|
|
2016-09-28 14:40:37 +00:00
|
|
|
bin_PROGRAMS = hcl
|
2018-03-13 10:20:33 +00:00
|
|
|
hcl_SOURCES = main.c
|
2016-09-28 14:40:37 +00:00
|
|
|
hcl_CPPFLAGS = $(CPPFLAGS_LIB_COMMON)
|
|
|
|
hcl_LDFLAGS = $(LDFLAGS_LIB_COMMON)
|
2018-04-09 06:11:57 +00:00
|
|
|
hcl_LDADD = $(LIBADD_LIB_COMMON) -lhcl
|
2018-02-06 10:16:01 +00:00
|
|
|
hcl_DEPENDENCIES = libhcl.la
|
2018-02-15 15:36:15 +00:00
|
|
|
|
2018-04-10 13:57:17 +00:00
|
|
|
if ENABLE_HCLEX
|
|
|
|
pkglib_LTLIBRARIES += libhclex.la
|
2018-04-21 02:13:53 +00:00
|
|
|
pkginclude_HEADERS += hcl-c.h hcl-s.h hcl-tmr.h hcl-xutl.h hcl-json.h
|
2018-04-10 13:57:17 +00:00
|
|
|
libhclex_la_SOURCES = \
|
|
|
|
tmr.c hcl-tmr.h \
|
|
|
|
xutl.c xutl-sa.h hcl-xutl.h \
|
2018-04-21 02:13:53 +00:00
|
|
|
json.c hcl-json.h \
|
2018-04-10 13:57:17 +00:00
|
|
|
hcl-s.c hcl-s.h \
|
|
|
|
hcl-c.c hcl-c.h
|
|
|
|
libhclex_la_CPPFLAGS = $(CPPFLAGS_LIB_COMMON)
|
|
|
|
libhclex_la_LDFLAGS = $(LDFLAGS_LIB_COMMON)
|
|
|
|
libhclex_la_LIBADD = $(LIBADD_LIB_COMMON) $(PTHREAD_LIBS) -lhcl
|
|
|
|
libhclex_la_DEPENDENCIES = libhcl.la
|
|
|
|
|
2018-03-13 10:20:33 +00:00
|
|
|
bin_PROGRAMS += hcls
|
2018-03-17 16:07:51 +00:00
|
|
|
hcls_SOURCES = main-s.c
|
2018-03-13 10:20:33 +00:00
|
|
|
hcls_CPPFLAGS = $(CPPFLAGS_LIB_COMMON)
|
|
|
|
hcls_LDFLAGS = $(LDFLAGS_LIB_COMMON)
|
2018-04-10 13:57:17 +00:00
|
|
|
hcls_LDADD = $(LIBADD_LIB_COMMON) $(PTHREAD_LIBS) -lhcl -lhclex
|
|
|
|
hcls_DEPENDENCIES = libhclex.la
|
2016-09-28 14:40:37 +00:00
|
|
|
|
2018-03-17 16:07:51 +00:00
|
|
|
bin_PROGRAMS += hclc
|
|
|
|
hclc_SOURCES = main-c.c
|
|
|
|
hclc_CPPFLAGS = $(CPPFLAGS_LIB_COMMON)
|
|
|
|
hclc_LDFLAGS = $(LDFLAGS_LIB_COMMON)
|
2018-04-10 13:57:17 +00:00
|
|
|
hclc_LDADD = $(LIBADD_LIB_COMMON) $(PTHREAD_LIBS) -lhcl -lhclex
|
|
|
|
hclc_DEPENDENCIES = libhclex.la
|
2018-03-17 16:07:51 +00:00
|
|
|
endif
|
|
|
|
|
2018-04-10 13:57:17 +00:00
|
|
|
|
2016-09-28 14:40:37 +00:00
|
|
|
install-data-hook:
|
|
|
|
@echo "#ifndef _HCL_CFG_H_" > "$(DESTDIR)$(pkgincludedir)/hcl-cfg.h"
|
|
|
|
@echo "#define _HCL_CFG_H_" >> "$(DESTDIR)$(pkgincludedir)/hcl-cfg.h"
|
|
|
|
@$(EGREP) "#define[ ]+HCL_" "$(abs_builddir)/hcl-cfg.h" >> "$(DESTDIR)$(pkgincludedir)/hcl-cfg.h"
|
|
|
|
@echo "#endif" >> "$(DESTDIR)$(pkgincludedir)/hcl-cfg.h"
|
|
|
|
@rm -f "$(DESTDIR)$(pkgincludedir)/hcl-cfg.h.in"
|
|
|
|
@$(SED) 's|/\*#define HCL_HAVE_CFG_H\*/|#define HCL_HAVE_CFG_H|' "$(srcdir)/hcl-cmn.h" > "$(DESTDIR)$(pkgincludedir)/hcl-cmn.h"
|
|
|
|
|
|
|
|
uninstall-hook:
|
|
|
|
@rm -f "$(DESTDIR)$(pkgincludedir)/hcl-cfg.h"
|
|
|
|
|