From 73958663ddcf77cfc939ca5536203f1e0b05aa00 Mon Sep 17 00:00:00 2001 From: /dev/humancontroller Date: Thu, 18 Jun 2015 14:19:03 +0200 Subject: 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. --- GNUmakefile | 44 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 8 deletions(-) (limited to 'GNUmakefile') 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) -- cgit