Makefile 1.52 KB
Newer Older
dylan grafmyre's avatar
dylan grafmyre committed
1
2
3
4
5
6
#

PYTHON_BIN?=./env/scripts/python
GARYSMOD_DIR?=D:\\Steam\\steamapps\\common\\GarrysMod\\
VBIN_DIR?=$(GARYSMOD_DIR)bin\\
MOD_DIR?=$(GARYSMOD_DIR)garrysmod\\
dylan grafmyre's avatar
dylan grafmyre committed
7
MOUNT_DIR?=.\\
dylan grafmyre's avatar
dylan grafmyre committed
8
9
VBIN_FLAGS?=-game $(MOD_DIR)

dylan grafmyre's avatar
dylan grafmyre committed
10
SUPERVISE_V_BIN?=./contrib/supervise-v
dylan grafmyre's avatar
dylan grafmyre committed
11
12
13
14
15
16
17
18
19
20
21
BSP_BIN?=$(VBIN_DIR)vbsp.exe
BSP_FLAGS?=$(VBIN_FLAGS)
VIS_BIN?=$(VBIN_DIR)vvis.exe
VIS_FLAGS?=$(VBIN_FLAGS) -fast
RAD_BIN?=$(VBIN_DIR)vrad.exe
RAD_FLAGS?=$(VBIN_FLAGS) -StaticPropLighting -bounce 2 -noextra
# -StaticPropSampleScale 0.25 
BSPZIP_BIN?=$(VBIN_DIR)bspzip.exe
BSPZIP_FLAGS?=

%.bsp: %.vmf
dylan grafmyre's avatar
dylan grafmyre committed
22
23
24
25
26
27
28
	# vbsp: writes bsp
	# vvis: depends on .prt, r/w bsp
	# vrad: reads lights.rad, r/w bsp
	$(SUPERVISE_V_BIN) $(BSP_BIN) $(BSP_FLAGS) $(basename $^)
	$(SUPERVISE_V_BIN) $(VIS_BIN) $(VIS_FLAGS) $(basename $^)
	$(SUPERVISE_V_BIN) $(RAD_BIN) $(RAD_FLAGS) $(basename $^)
	cp $@ $(MOUNT_DIR)maps\\$(notdir $@)
dylan grafmyre's avatar
dylan grafmyre committed
29
30
31
32
33
34
35
36
37
38
39

%.prt: %.bsp
	@test -f $@ || rm -f $(basename $@).bsp
	@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) $(basename $@).bsp
%.log: %.bsp
	@test -f $@ || rm -f $(basename $@).bsp
	@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) $(basename $@).bsp

%_p.bsp: %.bsp
	$(BSPZIP_BIN) $(BSPZIP_FLAGS) -addlist $^ $(basename $^).bspzip-addlist $@

dylan grafmyre's avatar
snap    
dylan grafmyre committed
40
41
ttt_terrorcon_v2.bsp:

dylan grafmyre's avatar
dylan grafmyre committed
42
43
44
45
46
47
48
game: install ttt_terrorcon_v2_p.bsp
	$(GARYSMOD_DIR)hl2.exe -allowdebug $(VBIN_FLAGS) +map $(notdir $(basename $(word 2,$^))) +gamemode terrortown +ttt_debug_preventwin 1 +ttt_preptime_seconds 10 +ttt_minimum_players 1

install: ttt_terrorcon_v2_p.bsp
	cp -v $^ $(MOD_DIR)maps\\

%.lint: %.bspzip-addlist
49
	$(PYTHON_BIN) ./contrib/bspzip-lint $^ 2> $@
dylan grafmyre's avatar
dylan grafmyre committed
50
51

.PHONY: lint