From 5e188f1debba546f7d00c252ae0d13fdcf52e536 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20Fabian=20Kr=C3=BCger?= Date: Sun, 5 Jul 2020 20:37:34 +0200 Subject: [PATCH] Add Makefile --- Makefile | 17 +++++++++++++++++ versionscript | 4 ++++ 2 files changed, 21 insertions(+) create mode 100644 Makefile create mode 100644 versionscript diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..c4c3c27 --- /dev/null +++ b/Makefile @@ -0,0 +1,17 @@ +# TEXLIVE_SRC must be a precompiled TEXLIVE build with dynamic libraries +TEXLIVE_SRC = $(HOME)/texlive-src +# We expect to find a precompiled static library compiled with -fpic here +LUA_DIR = $(HOME)/lua54/lua-5.4.0 + +INCLUDE_DIRS = $(TEXLIVE_SRC)/Work/texk $(TEXLIVE_SRC)/texk $(LUA_DIR)/src +LINK.so = $(LINK.o) -shared + +override CFLAGS += -fpic -DHAVE_DECL_ISASCII=1 $(patsubst %,-I%,$(INCLUDE_DIRS)) +override LDFLAGS += -Wl,-version-script=versionscript + +kpse.so: lkpselib.o $(TEXLIVE_SRC)/Work/texk/kpathsea/.libs/libkpathsea.a $(LUA_DIR)/src/liblua.a + +%.so: + $(LINK.so) $^ $(LOADLIBES) $(LDLIBS) -o $@ + +lkpselib.o: lkpselib.c diff --git a/versionscript b/versionscript new file mode 100644 index 0000000..7a0fa05 --- /dev/null +++ b/versionscript @@ -0,0 +1,4 @@ +{ + global: luaopen_kpse; + local: *; +};