summaryrefslogtreecommitdiff
path: root/src/Makefile.am
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2020-11-08 10:58:30 +0100
committerJörg Frings-Fürst <debian@jff.email>2020-11-08 10:58:30 +0100
commitfc9ba4264eafbb5a6ec0f3cc4cd2e1964c9b8fcf (patch)
tree465568f63d306c1de9bb8b934b08ee4f033050ad /src/Makefile.am
parent6b986090d954dbac91bbb3c43ce7c3328c91a780 (diff)
New upstream version 6.9.6upstream/6.9.6
Diffstat (limited to 'src/Makefile.am')
-rw-r--r--src/Makefile.am25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 36c2222..44a4167 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -11,10 +11,15 @@ posix_headers = onigposix.h
if ENABLE_POSIX_API
posix_sources = regposix.c regposerr.c
include_HEADERS += $(posix_headers)
+AM_CFLAGS += -DUSE_POSIX_API
else
posix_sources =
endif
+if ENABLE_BINARY_COMPATIBLE_POSIX_API
+AM_CFLAGS += -DUSE_BINARY_COMPATIBLE_POSIX_API
+endif
+
lib_LTLIBRARIES = $(libname)
@@ -45,13 +50,29 @@ libonig_la_SOURCES = regint.h regparse.h regenc.h st.h \
gb18030.c koi8_r.c cp1251.c \
onig_init.c
-libonig_la_LDFLAGS = -version-info $(LTVERSION)
-
EXTRA_DIST = koi8.c mktable.c \
unicode_fold_data.c unicode_property_data.c \
unicode_property_data_posix.c \
unicode_egcb_data.c unicode_wb_data.c
+
+libonig_la_LDFLAGS = $(EXTRA_LIBONIG_LDFLAGS) -version-info $(LTVERSION)
+
+if USE_LIBONIG_DEF_FILE
+
+libonig_la_LDFLAGS += -Wl,--output-def,$(LIBONIG_DEF_FILE)
+
+install-data-hook:
+ echo "$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_DATA) $(LIBONIG_DEF_FILE) $(DESTDIR)$(libdir)"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_DATA) $(LIBONIG_DEF_FILE) $(DESTDIR)$(libdir) || exit 1
+
+uninstall-hook:
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$(LIBONIG_DEF_FILE)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$(LIBONIG_DEF_FILE)"
+
+endif
+
+
dll:
$(CXX) -shared -Wl,--output-def,libonig.def -o libonig.dll *.o \
$(LIBS)