2016-01-17 21:39:48 +00:00
|
|
|
MSDEV=vs2012
|
2015-10-05 17:11:15 +00:00
|
|
|
LUA_DIR=src/host/lua/src
|
2015-06-06 01:56:39 +00:00
|
|
|
|
2015-10-05 17:11:15 +00:00
|
|
|
SRC= src/host/*.c \
|
2015-06-06 01:56:39 +00:00
|
|
|
$(LUA_DIR)/lapi.c \
|
|
|
|
$(LUA_DIR)/lcode.c \
|
|
|
|
$(LUA_DIR)/ldebug.c \
|
|
|
|
$(LUA_DIR)/ldump.c \
|
2015-10-05 17:11:15 +00:00
|
|
|
$(LUA_DIR)/lgc.c \
|
2015-06-06 01:56:39 +00:00
|
|
|
$(LUA_DIR)/liolib.c \
|
2015-10-05 17:11:15 +00:00
|
|
|
$(LUA_DIR)/lmathlib.c \
|
2015-06-06 01:56:39 +00:00
|
|
|
$(LUA_DIR)/loadlib.c \
|
2015-10-05 17:11:15 +00:00
|
|
|
$(LUA_DIR)/lopcodes.c \
|
2015-06-06 01:56:39 +00:00
|
|
|
$(LUA_DIR)/lparser.c \
|
|
|
|
$(LUA_DIR)/lstring.c \
|
|
|
|
$(LUA_DIR)/ltable.c \
|
2015-10-05 17:11:15 +00:00
|
|
|
$(LUA_DIR)/ltm.c \
|
|
|
|
$(LUA_DIR)/lvm.c \
|
|
|
|
$(LUA_DIR)/lbaselib.c \
|
2015-06-06 01:56:39 +00:00
|
|
|
$(LUA_DIR)/ldblib.c \
|
2015-10-05 17:11:15 +00:00
|
|
|
$(LUA_DIR)/ldo.c \
|
2015-06-06 01:56:39 +00:00
|
|
|
$(LUA_DIR)/lfunc.c \
|
|
|
|
$(LUA_DIR)/linit.c \
|
|
|
|
$(LUA_DIR)/llex.c \
|
|
|
|
$(LUA_DIR)/lmem.c \
|
|
|
|
$(LUA_DIR)/lobject.c \
|
|
|
|
$(LUA_DIR)/loslib.c \
|
|
|
|
$(LUA_DIR)/lstate.c \
|
|
|
|
$(LUA_DIR)/lstrlib.c \
|
|
|
|
$(LUA_DIR)/ltablib.c \
|
|
|
|
$(LUA_DIR)/lundump.c \
|
|
|
|
$(LUA_DIR)/lzio.c
|
|
|
|
|
|
|
|
PLATFORM= none
|
|
|
|
default: $(PLATFORM)
|
|
|
|
|
|
|
|
none:
|
|
|
|
@echo "Please do"
|
|
|
|
@echo " nmake -f Bootstrap.mak windows"
|
|
|
|
@echo "or"
|
2015-06-11 18:11:50 +00:00
|
|
|
@echo " CC=mingw32-gcc mingw32-make -f Bootstrap.mak mingw"
|
|
|
|
@echo "or"
|
|
|
|
@echo " make -f Bootstrap.mak HOST_PLATFORM"
|
|
|
|
@echo "where HOST_PLATFORM is one of these:"
|
2015-06-06 01:56:39 +00:00
|
|
|
@echo " osx linux"
|
|
|
|
|
2015-06-11 18:11:50 +00:00
|
|
|
mingw: $(SRC)
|
|
|
|
mkdir -p build/bootstrap
|
|
|
|
$(CC) -o build/bootstrap/premake_bootstrap -DPREMAKE_NO_BUILTIN_SCRIPTS -I"$(LUA_DIR)" $? -lole32
|
|
|
|
./build/bootstrap/premake_bootstrap embed
|
|
|
|
./build/bootstrap/premake_bootstrap --os=windows --to=build/bootstrap gmake
|
|
|
|
$(MAKE) -C build/bootstrap
|
|
|
|
|
2015-06-06 01:56:39 +00:00
|
|
|
osx: $(SRC)
|
|
|
|
mkdir -p build/bootstrap
|
2015-10-07 19:02:58 +00:00
|
|
|
$(CC) -o build/bootstrap/premake_bootstrap -DPREMAKE_NO_BUILTIN_SCRIPTS -DLUA_USE_MACOSX -I"$(LUA_DIR)" -framework CoreServices $?
|
2015-06-06 01:56:39 +00:00
|
|
|
./build/bootstrap/premake_bootstrap embed
|
|
|
|
./build/bootstrap/premake_bootstrap --to=build/bootstrap gmake
|
|
|
|
$(MAKE) -C build/bootstrap -j`getconf _NPROCESSORS_ONLN`
|
|
|
|
|
|
|
|
linux: $(SRC)
|
|
|
|
mkdir -p build/bootstrap
|
2015-10-07 19:10:53 +00:00
|
|
|
$(CC) -o build/bootstrap/premake_bootstrap -DPREMAKE_NO_BUILTIN_SCRIPTS -DLUA_USE_POSIX -DLUA_USE_DLOPEN -I"$(LUA_DIR)" $? -lm -ldl -lrt
|
2015-06-06 01:56:39 +00:00
|
|
|
./build/bootstrap/premake_bootstrap embed
|
|
|
|
./build/bootstrap/premake_bootstrap --to=build/bootstrap gmake
|
|
|
|
$(MAKE) -C build/bootstrap -j`getconf _NPROCESSORS_ONLN`
|
|
|
|
|
|
|
|
windows: $(SRC)
|
|
|
|
if not exist build\bootstrap (mkdir build\bootstrap)
|
|
|
|
cl /Fo.\build\bootstrap\ /Fe.\build\bootstrap\premake_bootstrap.exe /DPREMAKE_NO_BUILTIN_SCRIPTS /I"$(LUA_DIR)" user32.lib ole32.lib $**
|
|
|
|
.\build\bootstrap\premake_bootstrap.exe embed
|
2016-01-17 21:39:48 +00:00
|
|
|
.\build\bootstrap\premake_bootstrap --to=build/bootstrap $(MSDEV)
|
2015-06-06 01:56:39 +00:00
|
|
|
devenv .\build\bootstrap\Premake5.sln /Upgrade
|
|
|
|
devenv .\build\bootstrap\Premake5.sln /Build Release
|