Skip to content

Instantly share code, notes, and snippets.

@sbseltzer
Last active March 23, 2017 14:28
Show Gist options
  • Save sbseltzer/ba0476f89c893bc712dbcbb166b0ce7f to your computer and use it in GitHub Desktop.
Save sbseltzer/ba0476f89c893bc712dbcbb166b0ce7f to your computer and use it in GitHub Desktop.
Root Makefile for use with Orx
# Requires MSBuild.exe and CL.exe for your respective Visual Studio version to be in your System Environment Path variable.
ifeq ($(OS),Windows_NT)
VS_VERSION = vs2013
endif
# Tutorials
tsbuild:
ifeq ($(OS),Windows_NT)
tutorial/build/premake4 --file=tutorial/build/premake4.lua $(VS_VERSION)
else
tutorial/build/premake4 --file=tutorial/build/premake4.lua gmake
endif
tsclean:
ifeq ($(OS),Windows_NT)
cd tutorial/build; rm -rf windows;
else
cd tutorial/build; rm -rf linux;
endif
tbuild: tsbuild build tclean
ifeq ($(OS),Windows_NT)
MSBuild.exe tutorial/build/windows/$(VS_VERSION)/Tutorial.sln -p:Configuration=Debug -p:Platform=x64
else
$(MAKE) --no-print-directory -C tutorial/build/linux/gmake -f Makefile
endif
tclean:
ifeq ($(OS),Windows_NT)
MSBuild.exe tutorial/build/windows/$(VS_VERSION)/Tutorial.sln -t:Clean
else
$(MAKE) --no-print-directory -C tutorial/build/linux/gmake -f Makefile clean
endif
# Orx
sbuild:
ifeq ($(OS),Windows_NT)
code/build/premake4 --file=code/build/premake4.lua $(VS_VERSION)
else
code/build/premake4 --file=code/build/premake4.lua gmake
endif
sclean:
ifeq ($(OS),Windows_NT)
cd code/build; rm -rf windows;
else
cd coded/build; rm -rf linux;
endif
build:
ifeq ($(OS),Windows_NT)
MSBuild.exe code/build/windows/$(VS_VERSION)/orx.sln -p:Configuration=Debug -p:Platform=x64
else
$(MAKE) --no-print-directory -C code/build/linux/gmake -f Makefile
endif
clean:
ifeq ($(OS),Windows_NT)
MSBuild.exe code/build/windows/$(VS_VERSION)/orx.sln -t:Clean
else
$(MAKE) --no-print-directory -C code/build/linux/gmake -f Makefile clean
endif
dox:
doxygen
.PHONY: sbuild sclean build clean dox tsbuild tsclean tbuild tclean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment