summaryrefslogtreecommitdiff
path: root/src/Makefile.am
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2020-11-08 10:59:08 +0100
committerJörg Frings-Fürst <debian@jff.email>2020-11-08 10:59:08 +0100
commit22bb4b319b3d722ac7bf041a6374cd40afdc4d53 (patch)
treea07d7d0764a8488f4b5ebef1561e2f3d8caacc05 /src/Makefile.am
parent0f259c3073f341c48468e80e93731daa31698030 (diff)
parentb4158caf13bc715096c1df7c040c9d25995d76f2 (diff)
Merge branch 'feature/upstream' into develop
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)