2019-08-17 04:06:25 +08:00
|
|
|
MYSRCPATHS =
|
|
|
|
MYINCLUDES = -I.
|
2020-04-20 04:55:28 +08:00
|
|
|
# Lua lib requires GNU extensions (implicit declarations of functions): -std=gnu99 or -std=gnu11
|
2020-05-04 01:25:14 +08:00
|
|
|
MYCFLAGS = -Wno-cast-align -Wno-bad-function-cast
|
2019-08-17 04:06:25 +08:00
|
|
|
MYDEFS = -DLUA_COMPAT_ALL $(SYSCFLAGS)
|
|
|
|
MYSRCS = lapi.c lcode.c lctype.c ldebug.c ldo.c ldump.c lfunc.c lgc.c llex.c \
|
|
|
|
lmem.c lobject.c lopcodes.c lparser.c lstate.c lstring.c ltable.c \
|
|
|
|
ltm.c lundump.c lvm.c lzio.c \
|
|
|
|
lauxlib.c lbaselib.c lbitlib.c lcorolib.c ldblib.c liolib.c \
|
|
|
|
lmathlib.c loslib.c lstrlib.c ltablib.c loadlib.c linit.c
|
2013-05-22 02:23:42 +08:00
|
|
|
|
2019-08-17 04:06:25 +08:00
|
|
|
SYSCFLAGS=
|
2013-05-22 02:23:42 +08:00
|
|
|
|
2019-08-17 04:06:25 +08:00
|
|
|
LIB_A= liblua.a
|
2019-06-02 06:25:25 +08:00
|
|
|
|
2020-04-21 07:44:31 +08:00
|
|
|
# Transition: remove old directories and objects
|
|
|
|
MYCLEANOLDPATH = ../../liblua
|
|
|
|
|
2013-05-22 02:23:42 +08:00
|
|
|
# Your platform. See PLATS for possible values.
|
|
|
|
PLAT= none
|
|
|
|
|
|
|
|
PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
|
|
|
|
|
|
|
|
default: $(PLAT)
|
|
|
|
|
2020-04-16 16:25:29 +08:00
|
|
|
include ../../../Makefile.host
|
2013-05-22 02:23:42 +08:00
|
|
|
|
|
|
|
# Convenience targets for popular platforms
|
|
|
|
ALL= all
|
|
|
|
|
|
|
|
none:
|
|
|
|
@echo "Please do 'make PLATFORM' where PLATFORM is one of these:"
|
|
|
|
@echo " $(PLATS)"
|
|
|
|
|
|
|
|
aix:
|
2019-08-17 04:06:25 +08:00
|
|
|
$(Q)$(MAKE) $(ALL) CC="xlc" CFLAGS="-O2 -DLUA_USE_POSIX -DLUA_USE_DLOPEN"
|
2013-05-22 02:23:42 +08:00
|
|
|
|
|
|
|
ansi:
|
2019-06-02 06:25:25 +08:00
|
|
|
$(Q)$(MAKE) $(ALL) SYSCFLAGS="-DLUA_ANSI"
|
2013-05-22 02:23:42 +08:00
|
|
|
|
|
|
|
bsd:
|
2019-08-17 04:06:25 +08:00
|
|
|
$(Q)$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN"
|
2013-05-22 02:23:42 +08:00
|
|
|
|
|
|
|
freebsd:
|
2019-08-17 04:06:25 +08:00
|
|
|
$(Q)$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX"
|
2013-05-22 02:23:42 +08:00
|
|
|
|
|
|
|
generic: $(ALL)
|
|
|
|
|
|
|
|
linux:
|
2019-08-17 04:06:25 +08:00
|
|
|
$(Q)$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX"
|
2013-05-22 02:23:42 +08:00
|
|
|
|
|
|
|
macosx:
|
2019-08-17 04:06:25 +08:00
|
|
|
$(Q)$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX"
|
2013-05-22 02:23:42 +08:00
|
|
|
|
|
|
|
mingw:
|
2019-08-17 04:06:25 +08:00
|
|
|
$(Q)$(MAKE) $(ALL)
|
2013-05-22 02:23:42 +08:00
|
|
|
|
|
|
|
posix:
|
2019-06-02 06:25:25 +08:00
|
|
|
$(Q)$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_POSIX"
|
2013-05-22 02:23:42 +08:00
|
|
|
|
|
|
|
solaris:
|
2019-08-17 04:06:25 +08:00
|
|
|
$(Q)$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN"
|
2013-05-22 02:23:42 +08:00
|
|
|
|
2019-08-17 04:06:25 +08:00
|
|
|
.PHONY: all $(PLATS) default clean depend none
|