diff options
author | /dev/humancontroller <devhc@example.com> | 2015-06-18 14:19:03 +0200 |
---|---|---|
committer | /dev/humancontroller <devhc@example.com> | 2017-02-07 17:34:59 +0100 |
commit | 73958663ddcf77cfc939ca5536203f1e0b05aa00 (patch) | |
tree | ef8fa9b8549f7d702ca0c050037e24147db454e3 | |
parent | 815b743ebf3dba8b3d78cc2f4f1f59ed4220031a (diff) |
add a makefile option to build only the game module or only the cgame and ui modules
new effective defines are BUILD_ONLY_GAME=1 and BUILD_ONLY_CGUI=1. the former overrides the latter.
-rw-r--r-- | GNUmakefile | 44 |
1 files changed, 36 insertions, 8 deletions
diff --git a/GNUmakefile b/GNUmakefile index 8db21a6e..88ac6d0b 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -32,6 +32,12 @@ endif ifndef BUILD_GAME_QVM BUILD_GAME_QVM = endif +ifndef BUILD_ONLY_GAME + BUILD_ONLY_GAME = +endif +ifndef BUILD_ONLY_CGUI + BUILD_ONLY_CGUI = +endif ifndef BUILD_RENDERER_OPENGL2 BUILD_RENDERER_OPENGL2= endif @@ -913,17 +919,39 @@ ifneq ($(BUILD_CLIENT),0) endif ifneq ($(BUILD_GAME_SO),0) - TARGETS += \ - $(B)/$(OUT)/$(BASEGAME)/cgame$(SHLIBNAME) \ - $(B)/$(OUT)/$(BASEGAME)/game$(SHLIBNAME) \ - $(B)/$(OUT)/$(BASEGAME)/ui$(SHLIBNAME) + ifeq ($(BUILD_ONLY_GAME),1) + TARGETS += \ + $(B)/$(OUT)/$(BASEGAME)/game$(SHLIBNAME) + else + ifeq ($(BUILD_ONLY_CGUI),1) + TARGETS += \ + $(B)/$(OUT)/$(BASEGAME)/cgame$(SHLIBNAME) \ + $(B)/$(OUT)/$(BASEGAME)/ui$(SHLIBNAME) + else + TARGETS += \ + $(B)/$(OUT)/$(BASEGAME)/cgame$(SHLIBNAME) \ + $(B)/$(OUT)/$(BASEGAME)/game$(SHLIBNAME) \ + $(B)/$(OUT)/$(BASEGAME)/ui$(SHLIBNAME) + endif + endif endif ifneq ($(BUILD_GAME_QVM),0) - TARGETS += \ - $(B)/$(OUT)/$(BASEGAME)/vm/cgame.qvm \ - $(B)/$(OUT)/$(BASEGAME)/vm/game.qvm \ - $(B)/$(OUT)/$(BASEGAME)/vm/ui.qvm + ifeq ($(BUILD_ONLY_GAME),1) + TARGETS += \ + $(B)/$(OUT)/$(BASEGAME)/vm/game.qvm + else + ifeq ($(BUILD_ONLY_CGUI),1) + TARGETS += \ + $(B)/$(OUT)/$(BASEGAME)/vm/cgame.qvm \ + $(B)/$(OUT)/$(BASEGAME)/vm/ui.qvm + else + TARGETS += \ + $(B)/$(OUT)/$(BASEGAME)/vm/cgame.qvm \ + $(B)/$(OUT)/$(BASEGAME)/vm/game.qvm \ + $(B)/$(OUT)/$(BASEGAME)/vm/ui.qvm + endif + endif endif ifeq ($(USE_OPENAL),1) |