2016-09-28 14:40:37 +00:00
|
|
|
AUTOMAKE_OPTIONS = nostdinc
|
|
|
|
|
|
|
|
CPPFLAGS_ALL_COMMON = \
|
|
|
|
-I$(abs_builddir) \
|
|
|
|
-I$(abs_srcdir) \
|
2020-11-15 09:56:06 +00:00
|
|
|
-I$(includedir)
|
2016-09-28 14:40:37 +00:00
|
|
|
|
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-04-26 04:50:40 +00:00
|
|
|
if ENABLE_LIBUNWIND
|
|
|
|
LIBADD_LIB_COMMON += $(UNWIND_LIBS)
|
|
|
|
endif
|
2018-02-09 03:48:30 +00:00
|
|
|
|
2018-10-14 10:13:24 +00:00
|
|
|
if WIN32
|
|
|
|
# you must adjust the value of DEFAULT_MODPOSTFIX according
|
|
|
|
# to the first number in -version-info above
|
2018-11-03 16:02:38 +00:00
|
|
|
CPPFLAGS_PFMOD = -DHCL_DEFAULT_PFMODPREFIX=\"libhcl-\" -DHCL_DEFAULT_PFMODPOSTFIX=\"-1.dll\"
|
2018-10-14 10:13:24 +00:00
|
|
|
else
|
2018-11-03 16:02:38 +00:00
|
|
|
CPPFLAGS_PFMOD = -DHCL_DEFAULT_PFMODPREFIX=\"$(libdir)/libhcl-\"
|
2018-10-14 10:13:24 +00:00
|
|
|
if MACOSX
|
|
|
|
CPPFLAGS_PFMOD += -DHCL_DEFAULT_PFMODPOSTFIX=\".dylib\"
|
|
|
|
else
|
|
|
|
CPPFLAGS_PFMOD += -DHCL_DEFAULT_PFMODPOSTFIX=\".so\"
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2016-09-28 14:40:37 +00:00
|
|
|
pkgincludedir = $(includedir)
|
|
|
|
pkglibdir = $(libdir)
|
|
|
|
|
|
|
|
pkginclude_HEADERS = \
|
2018-04-09 06:11:57 +00:00
|
|
|
hcl.h \
|
2023-11-21 15:24:57 +00:00
|
|
|
hcl-chr.h \
|
2016-09-28 14:40:37 +00:00
|
|
|
hcl-cmn.h \
|
2020-11-15 10:26:14 +00:00
|
|
|
hcl-fmt.h \
|
2018-04-09 06:11:57 +00:00
|
|
|
hcl-opt.h \
|
2023-12-23 03:43:26 +00:00
|
|
|
hcl-pac1.h \
|
2016-09-28 14:40:37 +00:00
|
|
|
hcl-rbt.h \
|
2023-12-23 03:43:26 +00:00
|
|
|
hcl-upac.h \
|
2020-12-28 17:03:29 +00:00
|
|
|
hcl-utl.h \
|
|
|
|
hcl-xma.h
|
2016-09-28 14:40:37 +00:00
|
|
|
|
|
|
|
pkglib_LTLIBRARIES = libhcl.la
|
|
|
|
libhcl_la_SOURCES = \
|
|
|
|
hcl-prv.h \
|
|
|
|
bigint.c \
|
2023-11-21 15:24:57 +00:00
|
|
|
chr.c \
|
2021-01-09 16:53:35 +00:00
|
|
|
cnode.c \
|
2021-01-29 08:40:10 +00:00
|
|
|
comp.c \
|
2016-09-28 14:40:37 +00:00
|
|
|
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 \
|
2020-11-15 10:26:14 +00:00
|
|
|
fmt-imp.h \
|
2019-05-31 10:54:13 +00:00
|
|
|
fmt.c \
|
2016-09-28 14:40:37 +00:00
|
|
|
gc.c \
|
|
|
|
hcl.c \
|
|
|
|
heap.c \
|
2023-11-21 15:24:57 +00:00
|
|
|
mb8.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 \
|
2021-01-29 08:40:10 +00:00
|
|
|
read.c \
|
2021-02-07 17:57:35 +00:00
|
|
|
std.c \
|
2016-09-28 14:40:37 +00:00
|
|
|
sym.c \
|
2023-11-21 15:24:57 +00:00
|
|
|
uch-case.h \
|
|
|
|
uch-prop.h \
|
|
|
|
utf16.c \
|
2016-09-28 14:40:37 +00:00
|
|
|
utf8.c \
|
2020-12-28 17:03:29 +00:00
|
|
|
utl.c \
|
2023-12-23 03:43:26 +00:00
|
|
|
xchg.c \
|
2020-12-28 17:03:29 +00:00
|
|
|
xma.c
|
2016-09-28 14:40:37 +00:00
|
|
|
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
|
|
|
|
2018-03-13 10:20:33 +00:00
|
|
|
if ENABLE_STATIC_MODULE
|
2024-07-15 15:15:28 +00:00
|
|
|
libhcl_la_LIBADD += ../mod/libhcl-core.la
|
2020-11-16 13:07:15 +00:00
|
|
|
libhcl_la_LIBADD += ../mod/libhcl-dic.la
|
|
|
|
libhcl_la_LIBADD += ../mod/libhcl-str.la
|
|
|
|
libhcl_la_LIBADD += ../mod/libhcl-sys.la
|
2018-02-15 15:36:15 +00:00
|
|
|
endif
|
|
|
|
|
2019-06-02 05:06:08 +00:00
|
|
|
if ENABLE_HCLX
|
2019-05-31 10:54:13 +00:00
|
|
|
pkglib_LTLIBRARIES += libhclx.la
|
2024-05-14 12:14:39 +00:00
|
|
|
pkginclude_HEADERS += hcl-x.h hcl-tmr.h hcl-json.h
|
2019-05-31 10:54:13 +00:00
|
|
|
libhclx_la_SOURCES = \
|
2024-05-06 22:24:08 +00:00
|
|
|
hcl-json.h \
|
|
|
|
hcl-tmr.h \
|
2024-04-21 13:15:04 +00:00
|
|
|
hcl-x.h \
|
2024-05-06 22:24:08 +00:00
|
|
|
hcl-xtul.h \
|
|
|
|
json.c \
|
|
|
|
tmr.c \
|
2024-04-21 13:15:04 +00:00
|
|
|
x-client.c \
|
|
|
|
x-proto.c \
|
2024-05-06 22:24:08 +00:00
|
|
|
x-server.c \
|
2024-05-14 12:14:39 +00:00
|
|
|
x-sys.c \
|
|
|
|
x-utl.c \
|
|
|
|
x-utl-sa.h
|
2019-05-31 10:54:13 +00:00
|
|
|
libhclx_la_CPPFLAGS = $(CPPFLAGS_LIB_COMMON) $(CPPFLAGS_PFMOD)
|
|
|
|
libhclx_la_LDFLAGS = $(LDFLAGS_LIB_COMMON)
|
2020-11-16 13:07:15 +00:00
|
|
|
libhclx_la_LIBADD = libhcl.la $(LIBADD_LIB_COMMON)
|
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"
|
|
|
|
|