summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 1a1bd94..c98517a 100644
--- a/Makefile
+++ b/Makefile
@@ -18,6 +18,7 @@ CINST_ROOT := $(DESTDIR)$(INST_BASE)/lib/lua/$(LUA_VER)
BINST_ROOT := $(DESTDIR)$(INST_BASE)/lib
LMOD_FILES := $(patsubst %,%.lua,$(subst .,/,$(LMODULES)))
CMOD_FILES := $(patsubst %,%.so,$(subst .,/,$(CMODULES)))
+LIB_LUA := -llua$(LUA_VER)
CMOD_TARGETS := $(patsubst %,lib/%.so,$(subst .,/,$(CMODULES)))
CMOD_OBJECTS := $(patsubst %,lib/%.o,$(subst .,/,$(CMODULES)))
@@ -45,10 +46,10 @@ LFLAGS := -O1 -g $(LFLAGS)
build: $(CMOD_TARGETS) wrapper
wrapper: src/wrapper.c
- $(CC) $(LFLAGS) $(CFLAGS) -o $@ $< -llua$(LUA_VER)
+ $(CC) $(LFLAGS) $(CFLAGS) -o $@ $< $(LIB_LUA)
testwrapper: src/wrapper.c
- $(CC) $(LFLAGS) $(CFLAGS) -DTESTING_SUPPLE -o $@ $< -llua$(LUA_VER)
+ $(CC) $(LFLAGS) $(CFLAGS) -DTESTING_SUPPLE -o $@ $< $(LIB_LUA)
-chown root:root $@ && chmod u+s $@
ls -l $@