diff options
author | Emil Renner Berthing <esmil@mailme.dk> | 2011-06-20 17:40:43 +0200 |
---|---|---|
committer | Emil Renner Berthing <esmil@mailme.dk> | 2011-06-20 17:45:12 +0200 |
commit | 2b706e899806ee3ae7f7eebe085fbbf7837362c0 (patch) | |
tree | 656477ba045854dfab71ad5f58e197c98f2c86c5 /Makefile | |
parent | 7a3a23541014f18edd45f02458ee55b472d52671 (diff) | |
download | lem-2b706e899806ee3ae7f7eebe085fbbf7837362c0.tar.gz lem-2b706e899806ee3ae7f7eebe085fbbf7837362c0.tar.xz lem-2b706e899806ee3ae7f7eebe085fbbf7837362c0.zip |
Makefile: fix linking against LuaJIT on Debian
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -28,14 +28,14 @@ else SHARED = -shared endif -ifeq ($(LUA),embedded) -CFLAGS += -Ilua -DLUA_USE_LINUX -DLUA_ROOT='"$(PREFIX)/"' LIBRARIES = -lm - ifeq ($(OS), Linux) LIBRARIES += -ldl endif +ifeq ($(LUA),embedded) +CFLAGS += -Ilua -DLUA_USE_LINUX -DLUA_ROOT='"$(PREFIX)/"' + headers += lua/luaconf.h lua/lua.h lua/lauxlib.h # From lua/Makefile CORE_O = lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \ @@ -53,12 +53,12 @@ LUA_PATH = $(shell $(LUA) -e 'print(package.path:match("([^;]*/lua/$(LUA_VER LUA_CPATH = $(shell $(LUA) -e 'print(package.cpath:match("([^;]*/lua/$(LUA_VERSION))"))') ifeq ($(findstring LuaJIT, $(shell $(LUA) -v 2>&1)),) -LIBRARIES = -llua +LIBRARIES += -llua LUA_INCDIR = $(INCDIR) LIB_INCLUDES = -I$(LUA_INCDIR) else CFLAGS += $(shell $(PKGCONFIG) --cflags luajit) -LIBRARIES = $(shell $(PKGCONFIG) --libs luajit) +LIBRARIES += $(shell $(PKGCONFIG) --libs luajit) LIB_INCLUDES = -I$(INCDIR) $(shell $(PKGCONFIG) --cflags-only-I luajit) endif endif @@ -100,7 +100,7 @@ event.o: CFLAGS += -w lem: $(objects) $Mecho ' LD $@' - $O$(CC) -rdynamic $(LIBRARIES) $(LDFLAGS) $^ -o $@ + $O$(CC) $^ -rdynamic $(LDFLAGS) $(LIBRARIES) -o $@ utils.so: utils.pic.o $Mecho ' LD $@' |