summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile30
1 files changed, 24 insertions, 6 deletions
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