diff options
Diffstat (limited to 'src/Makefile')
-rw-r--r-- | src/Makefile | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/Makefile b/src/Makefile index e0d4c9f..05f4b2a 100644 --- a/src/Makefile +++ b/src/Makefile @@ -180,3 +180,24 @@ print.o: print.c ldebug.h lstate.h lua.h luaconf.h lobject.h llimits.h \ ltm.h lzio.h lmem.h lopcodes.h lundump.h # (end of Makefile) + +LIB_NAME = liblua$(V).la +LIB_OBJS = $(CORE_O:.o=.lo) $(LIB_O:.o=.lo) + +%.lo %.o: %.c + $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $< + +$(LIB_NAME) $(LIB_NAME:.la=.a): $(LIB_OBJS) + $(LIBTOOL) --mode=link $(CC) -version-info $(LIB_VERSION) \ + -o $(LIB_NAME) $(LIB_OBJS) $(LIB_LIBS) + +lua$(V): $(LUA_O) $(LIB_NAME) + $(LIBTOOL) --mode=link $(CC) -static -Wl,-E -o $@ $(LUA_O) $(LIB_NAME) $(LUA_LIBS) $(LDFLAGS) + +luac$(V): $(LUAC_O) $(LIB_NAME) + $(LIBTOOL) --mode=link $(CC) -static -o $@ $(LUAC_O) $(LIB_NAME) + +debian_clean: + $(LIBTOOL) --mode=clean $(RM) $(ALL_O:.o=.lo) $(LIB_NAME) lua$(V) luac$(V) + +debian_all: $(LIB_NAME) lua$(V) luac$(V) |