diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2016-12-23 14:24:37 +0100 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2016-12-23 14:25:43 +0100 |
commit | 077d6f4178031d508210cab669c366e938e52e7f (patch) | |
tree | a98ab32d1ff1b87f9bd01c16b666171adb89b1b0 /Makefile | |
parent | 39e88cf15daad6660756cd9c433b5aa930245774 (diff) |
Improve the Makefile.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 60 |
1 files changed, 55 insertions, 5 deletions
@@ -1,11 +1,61 @@ +# +# Settings +# Use Makefile.local for local settings +# + +FS_BASEPATH ?= $(HOME)/tremulous +FS_HOMEPATH ?= $(HOME)/.tremulous + +Q3MAP ?= q3map2 +Q3MAP_FLAGS += -fs_basepath $(FS_BASEPATH) -fs_homebase $(FS_HOMEPATH) \ + -fs_game base -threads 4 +Q3MAP_BSP += -leaktest -meta +Q3MAP_VIS += -vis +Q3MAP_LIGHT += -light -bounce 1 -dirty -bouncegrid -dirtscale 0.3 \ + -dirtdepth 32 -fastbounce -patchshadows -samples 8 \ + -samplesize 8 -cpma + +MAPCAT ?= mapcat +MAPCAT_FLAGS += + PARTS := maps/p1_bases.map \ maps/p2_clockroom.map -OUT := maps/analmango +WHOLE := maps/analmango + +.DEFAULT_GOAL := $(WHOLE).bsp + +-include Makefile.local + +# +# Creating a .pk3 with all the assets +# + +analmango.pk3: $(WHOLE).bsp + zip -r9 $@ maps/analmango.bsp scripts sound textures + +# +# Assembling the complete .map from parts +# + +$(WHOLE).map: $(PARTS) + $(MAPCAT) $(MAPCAT_FLAGS) $^ -o $@ + +# +# Compiling .map files into .bsp files +# + +maps/%.bsp: maps/%.map + $(Q3MAP) $(Q3MAP_FLAGS) $(Q3MAP_BSP) $< + $(Q3MAP) $(Q3MAP_FLAGS) $(Q3MAP_VIS) $< + $(Q3MAP) $(Q3MAP_FLAGS) $(Q3MAP_LIGHT) $< -$(OUT).map: $(PARTS) - mapcat $^ -o $@ +# +# Miscellaneous Make stuff +# clean: - rm $(OUT) + rm -f *.pk3 + rm -f maps/*.bsp + rm -f $(WHOLE).* -.PHONY: clean +.PHONY: clean default |