|
|
ltm.h lzio.h lmem.h lopcodes.h lundump.h | ltm.h lzio.h lmem.h lopcodes.h lundump.h |
| |
# (end of Makefile) | # (end of Makefile) |
|
|
|
export LIBTOOL = libtool --quiet --tag=CC |
|
export LIB_VERSION = 6:3:1 |
|
|
|
# The following rules use libtool for compiling and linking in order to |
|
# provide shared library support. |
|
|
|
LIB_NAME = liblua.la |
|
LIB_OBJS = $(CORE_O:.o=.lo) $(LIB_O:.o=.lo) |
|
|
|
%.lo %.o: %.c |
|
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $< |
|
|
|
$(LIB_NAME): $(LIB_OBJS) |
|
$(LIBTOOL) --mode=link $(CC) -version-info $(LIB_VERSION) \ |
|
-rpath $(RPATH) -o $(LIB_NAME) $(LIB_OBJS) $(LIB_LIBS) |
|
|
|
$(LIB_NAME:.la=.a): $(LIB_OBJS) |
|
$(LIBTOOL) --mode=link $(CC) -static -o $(LIB_NAME:.la=.a) $(LIB_OBJS) |
|
|
|
$(LUA_T): $(LUA_O) $(LIB_NAME) |
|
$(LIBTOOL) --mode=link $(CC) -Wl,-E -o $@ $(LUA_O) $(LUA_LIBS) -llua |
|
|
|
lua_test: $(LUA_O) $(LIB_NAME) |
|
$(LIBTOOL) --mode=link $(CC) -static -Wl,-E -o $@ $(LUA_O) $(LIB_NAME) $(LUA_LIBS) |
|
|
|
$(LUAC_T): $(LUAC_O) $(LIB_NAME) |
|
$(LIBTOOL) --mode=link $(CC) -static -o $@ $(LUAC_O) $(LIB_NAME) |
|
|
|
gentoo_clean: |
|
$(LIBTOOL) --mode=clean $(RM) $(ALL_O:.o=.lo) $(LIB_NAME) lua luac |
|
|
|
gentoo_all: $(LIB_NAME) $(LIB_NAME:.la=.a) $(LUA_T) lua_test $(LUAC_T) |
|
|