|
|
|
@ -1,8 +1,7 @@
|
|
|
|
|
# TEXLIVE_SRC must be a precompiled TEXLIVE build with dynamic libraries
|
|
|
|
|
TEXLIVE_SRC = $(HOME)/texlive-source
|
|
|
|
|
LUAMETATEX_SRC = $(HOME)/luametatex
|
|
|
|
|
# We expect to find a precompiled static library compiled with -fpic here
|
|
|
|
|
LUA_DIR = $(LUAMETATEX_SRC)/source/luacore/lua54/src
|
|
|
|
|
LUA_DIR = $(HOME)/lua/
|
|
|
|
|
# HarfBuzz also should be compiled static, position independent in a build_meson subdirectory
|
|
|
|
|
HARFBUZZ_DIR = $(TEXLIVE_SRC)/Work/libs/harfbuzz
|
|
|
|
|
# Graphite also should be compiled static, position independent in a build subdirectory
|
|
|
|
@ -11,7 +10,6 @@ GRAPHITE_DIR = $(TEXLIVE_SRC)/Work/libs/graphite2
|
|
|
|
|
HB_INCLUDE_DIRS = $(HARFBUZZ_DIR)/include
|
|
|
|
|
TL_INCLUDE_DIRS = $(TEXLIVE_SRC)/Work/texk $(TEXLIVE_SRC)/texk
|
|
|
|
|
LUA_INCLUDE_DIRS = $(LUA_DIR)
|
|
|
|
|
LINK.o = $(CXX) $(LDFLAGS) $(TARGET_ARCH)
|
|
|
|
|
LINK.so = $(LINK.o) -shared
|
|
|
|
|
|
|
|
|
|
LUAHARFBUZZ_SRCS = $(wildcard luaharfbuzz/src/luaharfbuzz/*.c)
|
|
|
|
@ -19,12 +17,11 @@ LUAHARFBUZZ_OBJS = $(patsubst %.c,%.o,$(LUAHARFBUZZ_SRCS))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
override CFLAGS += -fpic -DHAVE_DECL_ISASCII=1 $(patsubst %,-I%,$(INCLUDE_DIRS))
|
|
|
|
|
override LDFLAGS += -static-libgcc -static-libstdc++ -Wl,--gc-sections
|
|
|
|
|
# For Linux
|
|
|
|
|
override LDFLAGS += -Wl,linkscript.ld -Wl,--gc-sections
|
|
|
|
|
override LDFLAGS += -Wl,linkscript.ld
|
|
|
|
|
SO_EXT = so
|
|
|
|
|
# For Windows instead:
|
|
|
|
|
# override LDFLAGS += -Wl,-version-script=versionscript -Wl,--gc-sections
|
|
|
|
|
# override LDFLAGS += -Wl,-version-script=versionscript
|
|
|
|
|
# SO_EXT = dll
|
|
|
|
|
# For MacOS instead:
|
|
|
|
|
# override LDFLAGS += -Wl,-exported_symbols_list,symbols_list,-alias_list,alias_list -lc++abi
|
|
|
|
@ -33,9 +30,7 @@ SO_EXT = so
|
|
|
|
|
luaharfbuzz/src/luaharfbuzz/%.o: INCLUDE_DIRS = $(HB_INCLUDE_DIRS) $(LUA_INCLUDE_DIRS)
|
|
|
|
|
luametalatex-kpse/lkpselib.o: INCLUDE_DIRS = $(TL_INCLUDE_DIRS) $(LUA_INCLUDE_DIRS)
|
|
|
|
|
|
|
|
|
|
# luametalatex.$(SO_EXT): luametalatex-kpse/lkpselib.o $(TEXLIVE_SRC)/Work/texk/kpathsea/.libs/libkpathsea.a # $(LUA_DIR)/liblua.a
|
|
|
|
|
luametalatex.$(SO_EXT): luametalatex-kpse/lkpselib.o $(LUAHARFBUZZ_OBJS) $(TEXLIVE_SRC)/Work/texk/kpathsea/.libs/libkpathsea.a $(HARFBUZZ_DIR)/libharfbuzz.a $(GRAPHITE_DIR)/libgraphite2.a # $(LUA_DIR)/liblua.a
|
|
|
|
|
# luametalatex.$(SO_EXT): luametalatex-kpse/lkpselib.o $(LUAHARFBUZZ_OBJS) $(TEXLIVE_SRC)/Work/texk/kpathsea/.libs/libkpathsea.a $(HARFBUZZ_DIR)/libharfbuzz.a $(GRAPHITE_DIR)/libgraphite2.a ../luametatex/build/mingw-64/libluametatex.dll.a # $(LUA_DIR)/liblua.a
|
|
|
|
|
luametalatex.$(SO_EXT): luametalatex-kpse/lkpselib.o $(LUAHARFBUZZ_OBJS) $(TEXLIVE_SRC)/Work/texk/kpathsea/.libs/libkpathsea.a $(HARFBUZZ_DIR)/libharfbuzz.a $(GRAPHITE_DIR)/libgraphite2.a $(LUA_DIR)/liblua.a
|
|
|
|
|
|
|
|
|
|
%.$(SO_EXT):
|
|
|
|
|
$(LINK.so) $^ $(LOADLIBES) $(LDLIBS) -o $@
|
|
|
|
|