2017-06-25 15:57:53 +00:00
|
|
|
MSDEV = vs2012
|
2018-04-09 12:02:05 +00:00
|
|
|
CONFIG = release
|
|
|
|
PLATFORM = x86
|
2017-06-25 15:57:53 +00:00
|
|
|
LUA_DIR = contrib/lua/src
|
|
|
|
LUASHIM_DIR = contrib/luashim
|
2015-06-06 01:56:39 +00:00
|
|
|
|
2016-02-26 16:23:27 +00:00
|
|
|
SRC = src/host/*.c \
|
|
|
|
$(LUA_DIR)/lapi.c \
|
|
|
|
$(LUA_DIR)/lbaselib.c \
|
2016-03-02 00:09:40 +00:00
|
|
|
$(LUA_DIR)/lbitlib.c \
|
|
|
|
$(LUA_DIR)/lcode.c \
|
|
|
|
$(LUA_DIR)/lcorolib.c \
|
|
|
|
$(LUA_DIR)/lctype.c \
|
2016-02-26 16:23:27 +00:00
|
|
|
$(LUA_DIR)/ldblib.c \
|
2016-03-02 00:09:40 +00:00
|
|
|
$(LUA_DIR)/ldebug.c \
|
2016-02-26 16:23:27 +00:00
|
|
|
$(LUA_DIR)/ldo.c \
|
2016-03-02 00:09:40 +00:00
|
|
|
$(LUA_DIR)/ldump.c \
|
2016-02-26 16:23:27 +00:00
|
|
|
$(LUA_DIR)/lfunc.c \
|
2016-03-02 00:09:40 +00:00
|
|
|
$(LUA_DIR)/lgc.c \
|
2016-02-26 16:23:27 +00:00
|
|
|
$(LUA_DIR)/linit.c \
|
2016-03-02 00:09:40 +00:00
|
|
|
$(LUA_DIR)/liolib.c \
|
2016-02-26 16:23:27 +00:00
|
|
|
$(LUA_DIR)/llex.c \
|
2016-03-02 00:09:40 +00:00
|
|
|
$(LUA_DIR)/lmathlib.c \
|
2016-02-26 16:23:27 +00:00
|
|
|
$(LUA_DIR)/lmem.c \
|
2016-03-02 00:09:40 +00:00
|
|
|
$(LUA_DIR)/loadlib.c \
|
2016-02-26 16:23:27 +00:00
|
|
|
$(LUA_DIR)/lobject.c \
|
2016-03-02 00:09:40 +00:00
|
|
|
$(LUA_DIR)/lopcodes.c \
|
2016-02-26 16:23:27 +00:00
|
|
|
$(LUA_DIR)/loslib.c \
|
2016-03-02 00:09:40 +00:00
|
|
|
$(LUA_DIR)/lparser.c \
|
2016-02-26 16:23:27 +00:00
|
|
|
$(LUA_DIR)/lstate.c \
|
2016-03-02 00:09:40 +00:00
|
|
|
$(LUA_DIR)/lstring.c \
|
2016-02-26 16:23:27 +00:00
|
|
|
$(LUA_DIR)/lstrlib.c \
|
2016-03-02 00:09:40 +00:00
|
|
|
$(LUA_DIR)/ltable.c \
|
2016-02-26 16:23:27 +00:00
|
|
|
$(LUA_DIR)/ltablib.c \
|
2016-03-02 00:09:40 +00:00
|
|
|
$(LUA_DIR)/ltm.c \
|
2016-02-26 16:23:27 +00:00
|
|
|
$(LUA_DIR)/lundump.c \
|
2016-03-02 00:09:40 +00:00
|
|
|
$(LUA_DIR)/lutf8lib.c \
|
|
|
|
$(LUA_DIR)/lvm.c \
|
|
|
|
$(LUA_DIR)/lzio.c \
|
2015-06-06 01:56:39 +00:00
|
|
|
|
2018-04-09 12:02:05 +00:00
|
|
|
HOST_PLATFORM= none
|
|
|
|
default: $(HOST_PLATFORM)
|
2015-06-06 01:56:39 +00:00
|
|
|
|
|
|
|
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:"
|
2017-07-03 10:54:51 +00:00
|
|
|
@echo " osx linux bsd"
|
2015-06-06 01:56:39 +00:00
|
|
|
|
2015-06-11 18:11:50 +00:00
|
|
|
mingw: $(SRC)
|
2017-04-19 15:04:10 +00:00
|
|
|
$(SILENT) rm -rf ./bin
|
|
|
|
$(SILENT) rm -rf ./build
|
|
|
|
$(SILENT) rm -rf ./obj
|
2015-06-11 18:11:50 +00:00
|
|
|
mkdir -p build/bootstrap
|
2017-06-25 15:57:53 +00:00
|
|
|
$(CC) -o build/bootstrap/premake_bootstrap -DPREMAKE_NO_BUILTIN_SCRIPTS -I"$(LUA_DIR)" -I"$(LUASHIM_DIR)" $? -lole32
|
2015-06-11 18:11:50 +00:00
|
|
|
./build/bootstrap/premake_bootstrap embed
|
2019-05-04 15:17:19 +00:00
|
|
|
./build/bootstrap/premake_bootstrap --os=windows --to=build/bootstrap gmake2
|
2018-04-09 12:02:05 +00:00
|
|
|
$(MAKE) -C build/bootstrap config=$(CONFIG)_$(PLATFORM)
|
2015-06-11 18:11:50 +00:00
|
|
|
|
2019-05-03 15:35:04 +00:00
|
|
|
macosx: osx
|
|
|
|
|
2015-06-06 01:56:39 +00:00
|
|
|
osx: $(SRC)
|
2017-04-19 15:04:10 +00:00
|
|
|
$(SILENT) rm -rf ./bin
|
|
|
|
$(SILENT) rm -rf ./build
|
|
|
|
$(SILENT) rm -rf ./obj
|
2015-06-06 01:56:39 +00:00
|
|
|
mkdir -p build/bootstrap
|
2017-06-25 15:57:53 +00:00
|
|
|
$(CC) -o build/bootstrap/premake_bootstrap -DPREMAKE_NO_BUILTIN_SCRIPTS -DLUA_USE_MACOSX -I"$(LUA_DIR)" -I"$(LUASHIM_DIR)" -framework CoreServices -framework Foundation -framework Security -lreadline $?
|
2015-06-06 01:56:39 +00:00
|
|
|
./build/bootstrap/premake_bootstrap embed
|
2019-05-04 15:17:19 +00:00
|
|
|
./build/bootstrap/premake_bootstrap --to=build/bootstrap gmake2
|
2018-04-09 12:02:05 +00:00
|
|
|
$(MAKE) -C build/bootstrap -j`getconf _NPROCESSORS_ONLN` config=$(CONFIG)
|
2015-06-06 01:56:39 +00:00
|
|
|
|
|
|
|
linux: $(SRC)
|
2017-04-19 15:04:10 +00:00
|
|
|
$(SILENT) rm -rf ./bin
|
|
|
|
$(SILENT) rm -rf ./build
|
|
|
|
$(SILENT) rm -rf ./obj
|
2015-06-06 01:56:39 +00:00
|
|
|
mkdir -p build/bootstrap
|
2017-06-25 15:57:53 +00:00
|
|
|
$(CC) -o build/bootstrap/premake_bootstrap -DPREMAKE_NO_BUILTIN_SCRIPTS -DLUA_USE_POSIX -DLUA_USE_DLOPEN -I"$(LUA_DIR)" -I"$(LUASHIM_DIR)" $? -lm -ldl -lrt
|
2015-06-06 01:56:39 +00:00
|
|
|
./build/bootstrap/premake_bootstrap embed
|
2019-05-04 15:17:19 +00:00
|
|
|
./build/bootstrap/premake_bootstrap --to=build/bootstrap gmake2
|
2018-04-09 12:02:05 +00:00
|
|
|
$(MAKE) -C build/bootstrap -j`getconf _NPROCESSORS_ONLN` config=$(CONFIG)
|
2015-06-06 01:56:39 +00:00
|
|
|
|
2017-04-13 17:07:20 +00:00
|
|
|
bsd: $(SRC)
|
2017-04-19 15:04:10 +00:00
|
|
|
$(SILENT) rm -rf ./bin
|
|
|
|
$(SILENT) rm -rf ./build
|
|
|
|
$(SILENT) rm -rf ./obj
|
2017-04-13 17:07:20 +00:00
|
|
|
mkdir -p build/bootstrap
|
2017-06-25 15:57:53 +00:00
|
|
|
$(CC) -o build/bootstrap/premake_bootstrap -DPREMAKE_NO_BUILTIN_SCRIPTS -DLUA_USE_POSIX -DLUA_USE_DLOPEN -I"$(LUA_DIR)" -I"$(LUASHIM_DIR)" $? -lm
|
2017-04-13 17:07:20 +00:00
|
|
|
./build/bootstrap/premake_bootstrap embed
|
2019-05-04 15:17:19 +00:00
|
|
|
./build/bootstrap/premake_bootstrap --to=build/bootstrap gmake2
|
2018-04-26 16:00:46 +00:00
|
|
|
$(MAKE) -C build/bootstrap -j`getconf NPROCESSORS_ONLN` config=$(CONFIG)
|
2017-04-13 17:07:20 +00:00
|
|
|
|
2018-04-25 13:07:22 +00:00
|
|
|
solaris: $(SRC)
|
|
|
|
$(SILENT) rm -rf ./bin
|
|
|
|
$(SILENT) rm -rf ./build
|
|
|
|
$(SILENT) rm -rf ./obj
|
|
|
|
mkdir -p build/bootstrap
|
|
|
|
$(CC) -o build/bootstrap/premake_bootstrap -DPREMAKE_NO_BUILTIN_SCRIPTS -DLUA_USE_POSIX -DLUA_USE_DLOPEN -I"$(LUA_DIR)" -I"$(LUASHIM_DIR)" $? -lm
|
2017-04-13 17:07:20 +00:00
|
|
|
./build/bootstrap/premake_bootstrap embed
|
2019-05-04 15:17:19 +00:00
|
|
|
./build/bootstrap/premake_bootstrap --to=build/bootstrap gmake2
|
2018-04-25 20:35:58 +00:00
|
|
|
$(MAKE) -C build/bootstrap -j`getconf NPROCESSORS_ONLN` config=$(CONFIG)
|
2017-04-13 17:07:20 +00:00
|
|
|
|
2019-05-18 17:11:35 +00:00
|
|
|
haiku: $(SRC)
|
|
|
|
$(SILENT) rm -rf ./bin
|
|
|
|
$(SILENT) rm -rf ./build
|
|
|
|
$(SILENT) rm -rf ./obj
|
|
|
|
mkdir -p build/bootstrap
|
|
|
|
$(CC) -o build/bootstrap/premake_bootstrap -DPREMAKE_NO_BUILTIN_SCRIPTS -DLUA_USE_POSIX -DLUA_USE_DLOPEN -D_BSD_SOURCE -I"$(LUA_DIR)" -I"$(LUASHIM_DIR)" $? -lbsd
|
|
|
|
./build/bootstrap/premake_bootstrap embed
|
|
|
|
./build/bootstrap/premake_bootstrap --to=build/bootstrap gmake2
|
|
|
|
$(MAKE) -C build/bootstrap -j`getconf _NPROCESSORS_ONLN` config=$(CONFIG)
|
|
|
|
|
2016-11-28 02:42:31 +00:00
|
|
|
windows-base: $(SRC)
|
2017-04-19 15:04:10 +00:00
|
|
|
$(SILENT) if exist .\bin rmdir /s /q .\bin
|
|
|
|
$(SILENT) if exist .\build rmdir /s /q .\build
|
|
|
|
$(SILENT) if exist .\obj rmdir /s /q .\obj
|
2015-06-06 01:56:39 +00:00
|
|
|
if not exist build\bootstrap (mkdir build\bootstrap)
|
2017-06-25 15:57:53 +00:00
|
|
|
cl /Fo.\build\bootstrap\ /Fe.\build\bootstrap\premake_bootstrap.exe /DPREMAKE_NO_BUILTIN_SCRIPTS /I"$(LUA_DIR)" /I"$(LUASHIM_DIR)" user32.lib ole32.lib advapi32.lib $**
|
2015-06-06 01:56:39 +00:00
|
|
|
.\build\bootstrap\premake_bootstrap.exe embed
|
2016-01-17 21:39:48 +00:00
|
|
|
.\build\bootstrap\premake_bootstrap --to=build/bootstrap $(MSDEV)
|
2016-11-28 02:42:31 +00:00
|
|
|
|
|
|
|
windows: windows-base
|
2015-06-06 01:56:39 +00:00
|
|
|
devenv .\build\bootstrap\Premake5.sln /Upgrade
|
2018-04-09 12:02:05 +00:00
|
|
|
devenv .\build\bootstrap\Premake5.sln /Build "$(CONFIG)|$(PLATFORM:x86=win32)"
|
2016-11-28 02:42:31 +00:00
|
|
|
|
|
|
|
windows-msbuild: windows-base
|
2018-04-09 12:02:05 +00:00
|
|
|
msbuild /p:Configuration=$(CONFIG) /p:Platform=$(PLATFORM:x86=win32) .\build\bootstrap\Premake5.sln
|