-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
35 lines (28 loc) · 855 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
ACC_INC_DIR := ../survivalism-tools
ifeq ($(OS), Windows_NT)
ACC := ../survivalism-tools/acc.exe
ZIP := ../survivalism-tools/7za.exe
ZANDRO := "C:\Program Files (x86)\Zandronum\zandronum.exe"
RM := del /S /Q
else
ACC := acc
ZIP := 7za
RM := rm -rf
ZANDRO := "../../Torr_Samaho/zandronum-stable/zandronum"
endif
OBJ_DIR := src/acs
OUTPUT_PK3 := doomz.pk3
all: $(patsubst src/%.acs, src/acs/%.o, $(wildcard src/*.acs)) pk3
#foo: $(OBJ_FILES)
# acc.exe -o $@ $^
src/acs/%.o: src/%.acs Makefile
$(ACC) -i $(ACC_INC_DIR) $< $@
pk3:
$(ZIP) a -tzip -r -xr!*.bat -xr!.git -xr!*.backup* -xr!*.bak -xr!doomz.pk3 -xr!*.pro -- $(OUTPUT_PK3) ./src/*
# -mx 9 saves like 5% archive size but is slower
echo "Created $(OUTPUT_PK3)"
play: pk3
$(ZANDRO) -iwad doom2.wad -file doomz.pk3 +map doomz2
clean:
$(RM) -rf $(OBJ_DIR)/*
$(RM) $(OUTPUT_PK3)