From 72b1edb75f24f046325f375df6d15f16df81bfe7 Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Sun, 28 Jan 2018 15:34:44 +0100 Subject: Add FAST=2 for builds without light. --- Makefile | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 674f52a..3c5b763 100644 --- a/Makefile +++ b/Makefile @@ -10,15 +10,27 @@ TREMULOUS ?= tremulous Q3MAP ?= q3map2 Q3MAP_FLAGS += -fs_basepath $(FS_BASEPATH) -fs_homebase $(FS_HOMEBASE) \ -fs_game base -threads 4 -Q3MAP_BSP += -leaktest -meta -custinfoparms -Q3MAP_VIS += -vis -Q3MAP_LIGHT += -light -bounce 1 -dirty -bouncegrid -dirtscale 0.3 \ - -dirtdepth 32 -fastbounce -patchshadows -samples 3 \ - -samplesize 8 -cpma FAST ?= 0 + +ifeq ($(FAST), 0) + Q3MAP_BSP += -leaktest -meta -custinfoparms + Q3MAP_VIS += -vis + Q3MAP_LIGHT += -light -bounce 1 -dirty -bouncegrid -dirtscale 0.3 \ + -dirtdepth 32 -fastbounce -patchshadows -samples 3 \ + -samplesize 8 -cpma +endif + ifeq ($(FAST), 1) - Q3MAP_LIGHT = -light -fast -patchshadows + Q3MAP_BSP += -leaktest -meta -custinfoparms + Q3MAP_VIS += -vis + Q3MAP_LIGHT += -light -fast -patchshadows +endif + +ifeq ($(FAST), 2) + Q3MAP_BSP += -leaktest -meta -custinfoparms + Q3MAP_VIS += -vis + # Skip lighting entirely. endif MAPCAT ?= mapcat @@ -67,10 +79,16 @@ $(WHOLE).map: $(PARTS) # Compiling .map files into .bsp files # + + maps/%.bsp: maps/%.map $(Q3MAP) $(Q3MAP_FLAGS) $(Q3MAP_BSP) $< +ifdef Q3MAP_VIS $(Q3MAP) $(Q3MAP_FLAGS) $(Q3MAP_VIS) $< +endif +ifdef Q3MAP_LIGHT $(Q3MAP) $(Q3MAP_FLAGS) $(Q3MAP_LIGHT) $< +endif # # Miscellaneous Make stuff -- cgit