This repository has been archived on 2022-12-23. You can view files and clone it, but cannot push or open issues or pull requests.
fuck-premake-old2/Bootstrap.mak

107 lines
3.6 KiB
Makefile
Raw Normal View History

2017-06-25 15:57:53 +00:00
MSDEV = vs2012
LUA_DIR = contrib/lua/src
LUASHIM_DIR = contrib/luashim
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 \
2016-03-02 00:09:40 +00:00
PLATFORM= none
default: $(PLATFORM)
none:
@echo "Please do"
@echo " nmake -f Bootstrap.mak windows"
@echo "or"
@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:"
@echo " osx linux bsd"
mingw: $(SRC)
$(SILENT) rm -rf ./bin
$(SILENT) rm -rf ./build
$(SILENT) rm -rf ./obj
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
./build/bootstrap/premake_bootstrap embed
./build/bootstrap/premake_bootstrap --os=windows --to=build/bootstrap gmake
$(MAKE) -C build/bootstrap
osx: $(SRC)
$(SILENT) rm -rf ./bin
$(SILENT) rm -rf ./build
$(SILENT) rm -rf ./obj
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 $?
./build/bootstrap/premake_bootstrap embed
./build/bootstrap/premake_bootstrap --to=build/bootstrap gmake
$(MAKE) -C build/bootstrap -j`getconf _NPROCESSORS_ONLN`
linux: $(SRC)
$(SILENT) rm -rf ./bin
$(SILENT) rm -rf ./build
$(SILENT) rm -rf ./obj
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
./build/bootstrap/premake_bootstrap embed
./build/bootstrap/premake_bootstrap --to=build/bootstrap gmake
$(MAKE) -C build/bootstrap -j`getconf _NPROCESSORS_ONLN`
2017-04-13 17:07:20 +00:00
bsd: $(SRC)
$(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
./build/bootstrap/premake_bootstrap --to=build/bootstrap gmake
$(MAKE) -C build/bootstrap -j`getconf _NPROCESSORS_ONLN`
2016-11-28 02:42:31 +00:00
windows-base: $(SRC)
$(SILENT) if exist .\bin rmdir /s /q .\bin
$(SILENT) if exist .\build rmdir /s /q .\build
$(SILENT) if exist .\obj rmdir /s /q .\obj
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 $**
.\build\bootstrap\premake_bootstrap.exe embed
.\build\bootstrap\premake_bootstrap --to=build/bootstrap $(MSDEV)
2016-11-28 02:42:31 +00:00
windows: windows-base
devenv .\build\bootstrap\Premake5.sln /Upgrade
devenv .\build\bootstrap\Premake5.sln /Build Release
2016-11-28 02:42:31 +00:00
windows-msbuild: windows-base
msbuild /p:Configuration=Release /p:Platform=Win32 .\build\bootstrap\Premake5.sln