Compare commits
4 Commits
80fc5864a2
...
trunk
Author | SHA1 | Date | |
---|---|---|---|
|
38076b1e7e | ||
|
4772879575 | ||
|
e82610344c | ||
|
9a8574e788 |
30
Makefile
30
Makefile
@ -1,35 +1,47 @@
|
|||||||
# TEXLIVE_SRC must be a precompiled TEXLIVE build with dynamic libraries
|
# TEXLIVE_SRC must be a precompiled TEXLIVE build with dynamic libraries
|
||||||
TEXLIVE_SRC = $(HOME)/texlive-source
|
TEXLIVE_SRC = $(HOME)/texlive-source
|
||||||
|
LUAMETATEX_SRC = $(HOME)/luametatex
|
||||||
# We expect to find a precompiled static library compiled with -fpic here
|
# We expect to find a precompiled static library compiled with -fpic here
|
||||||
LUA_DIR = $(HOME)/lua/
|
LUA_DIR = $(LUAMETATEX_SRC)/source/luacore/lua54/src
|
||||||
# HarfBuzz also should be compiled static, position independent in a build_meson subdirectory
|
# HarfBuzz also should be compiled static, position independent in a build_meson subdirectory
|
||||||
HARFBUZZ_DIR = $(HOME)/harfbuzz
|
HARFBUZZ_DIR = $(TEXLIVE_SRC)/Work/libs/harfbuzz
|
||||||
# Graphite also should be compiled static, position independent in a build subdirectory
|
# Graphite also should be compiled static, position independent in a build subdirectory
|
||||||
GRAPHITE_DIR = $(HOME)/graphite
|
GRAPHITE_DIR = $(TEXLIVE_SRC)/Work/libs/graphite2
|
||||||
|
|
||||||
HB_INCLUDE_DIRS = $(HARFBUZZ_DIR)/src
|
HB_INCLUDE_DIRS = $(HARFBUZZ_DIR)/include
|
||||||
TL_INCLUDE_DIRS = $(TEXLIVE_SRC)/Work/texk $(TEXLIVE_SRC)/texk
|
TL_INCLUDE_DIRS = $(TEXLIVE_SRC)/Work/texk $(TEXLIVE_SRC)/texk
|
||||||
LUA_INCLUDE_DIRS = $(LUA_DIR)
|
LUA_INCLUDE_DIRS = $(LUA_DIR)
|
||||||
|
LINK.o = $(CXX) $(LDFLAGS) $(TARGET_ARCH)
|
||||||
LINK.so = $(LINK.o) -shared
|
LINK.so = $(LINK.o) -shared
|
||||||
|
|
||||||
LUAHARFBUZZ_SRCS = $(wildcard luaharfbuzz/src/luaharfbuzz/*.c)
|
LUAHARFBUZZ_SRCS = $(wildcard luaharfbuzz/src/luaharfbuzz/*.c)
|
||||||
LUAHARFBUZZ_OBJS = $(patsubst %.c,%.o,$(LUAHARFBUZZ_SRCS))
|
LUAHARFBUZZ_OBJS = $(patsubst %.c,%.o,$(LUAHARFBUZZ_SRCS))
|
||||||
|
|
||||||
|
|
||||||
override CFLAGS += -fpic -DHAVE_DECL_ISASCII=1 $(patsubst %,-I%,$(INCLUDE_DIRS))
|
override CFLAGS += -fpic -DHAVE_DECL_ISASCII=1 $(patsubst %,-I%,$(INCLUDE_DIRS))
|
||||||
override LDFLAGS += -Wl,linkscript.ld
|
override LDFLAGS += -static-libgcc -static-libstdc++ -Wl,--gc-sections
|
||||||
|
# For Linux
|
||||||
|
override LDFLAGS += -Wl,linkscript.ld -Wl,--gc-sections
|
||||||
|
SO_EXT = so
|
||||||
# For Windows instead:
|
# For Windows instead:
|
||||||
# override LDFLAGS += -Wl,-version-script=versionscript
|
# override LDFLAGS += -Wl,-version-script=versionscript -Wl,--gc-sections
|
||||||
|
# SO_EXT = dll
|
||||||
|
# For MacOS instead:
|
||||||
|
# override LDFLAGS += -Wl,-exported_symbols_list,symbols_list,-alias_list,alias_list -lc++abi
|
||||||
|
# SO_EXT = dylib
|
||||||
|
|
||||||
luaharfbuzz/src/luaharfbuzz/%.o: INCLUDE_DIRS = $(HB_INCLUDE_DIRS) $(LUA_INCLUDE_DIRS)
|
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-kpse/lkpselib.o: INCLUDE_DIRS = $(TL_INCLUDE_DIRS) $(LUA_INCLUDE_DIRS)
|
||||||
|
|
||||||
luametalatex.so: luametalatex-kpse/lkpselib.o $(LUAHARFBUZZ_OBJS) $(TEXLIVE_SRC)/Work/texk/kpathsea/.libs/libkpathsea.a $(HARFBUZZ_DIR)/build_meson/src/libharfbuzz.a $(GRAPHITE_DIR)/build/src/libgraphite2.a $(LUA_DIR)/liblua.a
|
# 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
|
||||||
|
|
||||||
%.so:
|
%.$(SO_EXT):
|
||||||
$(LINK.so) $^ $(LOADLIBES) $(LDLIBS) -o $@
|
$(LINK.so) $^ $(LOADLIBES) $(LDLIBS) -o $@
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
rm $(LUAHARFBUZZ_OBJS) luametalatex-kpse/lkpselib.o luametalatex.so
|
rm $(LUAHARFBUZZ_OBJS) luametalatex-kpse/lkpselib.o luametalatex.$(SO_EXT)
|
||||||
|
|
||||||
# lkpselib.o: lkpselib.c
|
# lkpselib.o: lkpselib.c
|
||||||
|
2
alias_list
Normal file
2
alias_list
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
_luaopen_kpse _luaopen_luametalatex_kpse
|
||||||
|
_luaopen_luaharfbuzz _luaopen_luametalatex_harfbuzz
|
@ -59,6 +59,11 @@ static const struct luaL_Reg lib_table [] = {
|
|||||||
{NULL, NULL}
|
{NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
__declspec(dllexport)
|
||||||
|
#else
|
||||||
|
__attribute__ ((visibility ("default")))
|
||||||
|
#endif
|
||||||
int luaopen_luaharfbuzz (lua_State *L) {
|
int luaopen_luaharfbuzz (lua_State *L) {
|
||||||
lua_newtable(L);
|
lua_newtable(L);
|
||||||
|
|
||||||
|
@ -863,6 +863,11 @@ static const struct luaL_Reg kpselib_l[] = {
|
|||||||
{NULL, NULL} /* sentinel */
|
{NULL, NULL} /* sentinel */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
__declspec(dllexport)
|
||||||
|
#else
|
||||||
|
__attribute__ ((visibility ("default")))
|
||||||
|
#endif
|
||||||
int luaopen_kpse(lua_State * L)
|
int luaopen_kpse(lua_State * L)
|
||||||
{
|
{
|
||||||
luaL_newmetatable(L, KPATHSEA_METATABLE);
|
luaL_newmetatable(L, KPATHSEA_METATABLE);
|
||||||
|
2
symbols_list
Normal file
2
symbols_list
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
_luaopen_luametalatex_kpse
|
||||||
|
_luaopen_luametalatex_harfbuzz
|
Loading…
Reference in New Issue
Block a user