diff options
author | /dev/humancontroller <devhc@example.com> | 2017-04-15 14:27:16 +0200 |
---|---|---|
committer | /dev/humancontroller <devhc@example.com> | 2017-04-15 14:27:16 +0200 |
commit | 7fcb9c627282884b23440309e53971a90a3d6286 (patch) | |
tree | fdd0d44906f82982f8615631a5de3317b0379d66 | |
parent | 9a2071a218c27735eded1a20848b6709b1339215 (diff) |
add a makefile option to build only the game module or only the cgame and ui modules
new effective defines r 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 aca9145..b8884d6 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 @@ -935,17 +941,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) |