forked from Blasphemer/blasphemer
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
95 lines (73 loc) · 2.61 KB
/
Makefile
File metadata and controls
95 lines (73 loc) · 2.61 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# SPDX-License-Identifier: BSD-3-Clause
# Blasphemer build script
VERSION="2024 v0.1.9-fork-008"
WADS=wads
SNDCURVE=scripts/blasphemer_sndcurve.py
CPP=scripts/simplecpp
DEUTEX=deutex
DEUTEX_BASIC_ARGS=-v0 -rate accept
DEUTEX_ARGS=$(DEUTEX_BASIC_ARGS) -heretic bootstrap/
BLASPHEM=$(WADS)/blasphem.wad
BLASPHDM=$(WADS)/blasphdm.wad
OBJS=$(BLASPHEM) $(BLASPHDM)
all: deutex-check $(OBJS)
subdirs:
$(MAKE) VERSION=$(VERSION) -C lumps/titlepic
$(MAKE) -C lumps/genmidi
$(MAKE) -C lumps/dmxgus
$(MAKE) -C lumps/textures
#---------------------------------------------------------
# Build checks
# Make sure deutex supports PNG
deutex-check:
@$(DEUTEX) -h | grep -qw PNG || { \
echo "$(DEUTEX) does not support PNG. Try building deutex with the PNG"; \
echo "libraries (libpng and libpng-devel or similar packages) installed."; \
echo "deutex can be downloaded from https://github.com/Doom-Utils/deutex."; \
echo "The full path to duetex can be specified by passing"; \
echo "DEUTEX=/the/path/to/deutex to make when building Blasphemer."; \
exit 1; }
# Make sure that no PNG files are modified if scripts are to modify them.
pngs-modified-check:
@{ ! git status -s | grep -q \\.png$ ; } || { \
echo "PNG fix targets can not be run if there are modified PNGs." ; \
exit 1; }
#---------------------------------------------------------
# SNDCURVE lump generation
lumps/sndcurve.lmp: scripts/blasphemer_sndcurve.py
python scripts/blasphemer_sndcurve.py
#---------------------------------------------------------
# BlasphDM iwad
wadinfo_blasphdm.txt : buildcfg.txt subdirs lumps/blasphem.lmp lumps/blasphdm.lmp
$(CPP) -P -DBLASPHDM < $< > $@
$(BLASPHDM): wadinfo_blasphdm.txt subdirs
@mkdir -p $(WADS)
$(RM) $@
$(DEUTEX) $(DEUTEX_ARGS) -iwad -build wadinfo_blasphdm.txt $@
#---------------------------------------------------------
# blasphemer (SOTSR) iwad
wadinfo_blasphem.txt: buildcfg.txt subdirs lumps/blasphem.lmp
$(CPP) -P -DBLASPHEM < $< > $@
$(BLASPHEM): wadinfo_blasphem.txt subdirs
@mkdir -p $(WADS)
$(RM) $@
$(DEUTEX) $(DEUTEX_ARGS) -iwad -build wadinfo_blasphem.txt $@
clean:
rm $(BLASPHEM)
rm $(BLASPHDM)
rmdir $(WADS)
rm wadinfo_blasphem.txt
rm wadinfo_blasphdm.txt
$(MAKE) -C lumps/titlepic clean
$(MAKE) -C lumps/genmidi clean
$(MAKE) -C lumps/dmxgus clean
$(MAKE) -C lumps/textures clean
prefix?=/usr/local
docdir?=/share/doc
mandir?=/share/man
waddir?=/share/games/doom
target=$(DESTDIR)$(prefix)
install:
install -Dm 644 $(BLASPHEM) -t "$(target)$(waddir)"
uninstall:
rm "$(target)$(waddir)/blasphem.wad"