Adjustments mostly for Windows
This commit is contained in:
parent
e82610344c
commit
4772879575
14
Makefile
14
Makefile
@ -1,7 +1,8 @@
|
||||
# TEXLIVE_SRC must be a precompiled TEXLIVE build with dynamic libraries
|
||||
TEXLIVE_SRC = $(HOME)/texlive-source
|
||||
TEXLIVE_SRC = $(HOME)/texlive-mingw
|
||||
LUAMETATEX_SRC = $(HOME)/luametatex
|
||||
# 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_DIR = $(TEXLIVE_SRC)/Work/libs/harfbuzz
|
||||
# Graphite also should be compiled static, position independent in a build subdirectory
|
||||
@ -10,6 +11,7 @@ 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)
|
||||
@ -18,11 +20,11 @@ LUAHARFBUZZ_OBJS = $(patsubst %.c,%.o,$(LUAHARFBUZZ_SRCS))
|
||||
|
||||
override CFLAGS += -fpic -DHAVE_DECL_ISASCII=1 $(patsubst %,-I%,$(INCLUDE_DIRS))
|
||||
# For Linux
|
||||
override LDFLAGS += -Wl,linkscript.ld
|
||||
SO_EXT = so
|
||||
# override LDFLAGS += -Wl,linkscript.ld -Wl,--gc-sections
|
||||
# SO_EXT = so
|
||||
# For Windows instead:
|
||||
# override LDFLAGS += -Wl,-version-script=versionscript
|
||||
# SO_EXT = dll
|
||||
# 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
|
||||
|
@ -863,6 +863,11 @@ static const struct luaL_Reg kpselib_l[] = {
|
||||
{NULL, NULL} /* sentinel */
|
||||
};
|
||||
|
||||
#ifdef _WIN32
|
||||
__declspec(dllexport)
|
||||
#else
|
||||
__attribute__ ((visibility ("default")))
|
||||
#endif
|
||||
int luaopen_kpse(lua_State * L)
|
||||
{
|
||||
luaL_newmetatable(L, KPATHSEA_METATABLE);
|
||||
|
Loading…
Reference in New Issue
Block a user