Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Alternative GNU Make workspace makefile autogenerated by Premake
- ifndef config
- config=debug
- endif
- ifndef verbose
- SILENT = @
- endif
- ifeq ($(config),debug)
- ghh_config = debug
- glad_config = debug
- ghhgfx_config = debug
- cJSON_config = debug
- game_config = debug
- else ifeq ($(config),release)
- ghh_config = release
- glad_config = release
- ghhgfx_config = release
- cJSON_config = release
- game_config = release
- else
- $(error "invalid configuration $(config)")
- endif
- PROJECTS := ghh glad ghhgfx cJSON game
- .PHONY: all clean help $(PROJECTS)
- all: $(PROJECTS)
- ghh:
- ifneq (,$(ghh_config))
- @echo "==== Building ghh ($(ghh_config)) ===="
- @${MAKE} --no-print-directory -C ../external/libghhgfx/external/libghh -f Makefile config=$(ghh_config)
- endif
- glad:
- ifneq (,$(glad_config))
- @echo "==== Building glad ($(glad_config)) ===="
- @${MAKE} --no-print-directory -C ../external/libghhgfx/external/glad -f Makefile config=$(glad_config)
- endif
- ghhgfx: ghh glad
- ifneq (,$(ghhgfx_config))
- @echo "==== Building ghhgfx ($(ghhgfx_config)) ===="
- @${MAKE} --no-print-directory -C ../external/libghhgfx -f Makefile config=$(ghhgfx_config)
- endif
- cJSON:
- ifneq (,$(cJSON_config))
- @echo "==== Building cJSON ($(cJSON_config)) ===="
- @${MAKE} --no-print-directory -C ../external/cJSON -f Makefile config=$(cJSON_config)
- endif
- game: ghh ghhgfx glad cJSON
- ifneq (,$(game_config))
- @echo "==== Building game ($(game_config)) ===="
- @${MAKE} --no-print-directory -C . -f game.make config=$(game_config)
- endif
- clean:
- @${MAKE} --no-print-directory -C ../external/libghhgfx/external/libghh -f Makefile clean
- @${MAKE} --no-print-directory -C ../external/libghhgfx/external/glad -f Makefile clean
- @${MAKE} --no-print-directory -C ../external/libghhgfx -f Makefile clean
- @${MAKE} --no-print-directory -C ../external/cJSON -f Makefile clean
- @${MAKE} --no-print-directory -C . -f game.make clean
- help:
- @echo "Usage: make [config=name] [target]"
- @echo ""
- @echo "CONFIGURATIONS:"
- @echo " debug"
- @echo " release"
- @echo ""
- @echo "TARGETS:"
- @echo " all (default)"
- @echo " clean"
- @echo " ghh"
- @echo " glad"
- @echo " ghhgfx"
- @echo " cJSON"
- @echo " game"
- @echo ""
- @echo "For more information, see https://github.com/premake/premake-core/wiki"
Advertisement
Add Comment
Please, Sign In to add comment