File: rules

package info (click to toggle)
wolf4sdl 1.7%2Bsvn262%2Bdfsg1-5
  • links: PTS, VCS
  • area: contrib
  • in suites: bookworm, bullseye, buster
  • size: 4,112 kB
  • sloc: cpp: 34,696; ansic: 1,257; objc: 246; makefile: 159; sh: 44
file content (64 lines) | stat: -rwxr-xr-x 2,165 bytes parent folder | download
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
#!/usr/bin/make -f

DEB_CFLAGS_MAINT_APPEND  += $(shell dpkg-buildflags --get CPPFLAGS)
DEB_CFLAGS_MAINT_APPEND  += -Wall -Wno-sign-compare -Wno-switch
DEB_CFLAGS_MAINT_APPEND  += -DDATADIR=\"/usr/share/games/wolf3d/\"
DEB_CFLAGS_MAINT_APPEND  += -fno-toplevel-reorder
DEB_LDFLAGS_MAINT_APPEND += -Wl,-z,defs -Wl,--as-needed
export DEB_CFLAGS_MAINT_APPEND DEB_LDFLAGS_MAINT_APPEND

export GPL=1
export Q=

define set_defines
	@$(foreach def, $(1), \
		if   [ "$(shell echo $(def) | cut -c1)" = "-" ]; then \
			sed -e "s|^\(//\)\?\(#define $(shell echo $(def) | cut -c2-)\)|//\2|" -i version.h; \
		elif [ "$(shell echo $(def) | cut -c1)" = "+" ]; then \
			sed -e "s|^\(//\)\?\(#define $(shell echo $(def) | cut -c2-)\)|\2|"   -i version.h; \
		fi; \
	)
endef

debian/wolf4sdl.png: debian/wolf4sdl.svg
	inkscape --export-png=$@ $^

%:
	dh $@

override_dh_auto_build:
	# Wolf3d Full v1.4 GT/ID/Activision
	$(MAKE) clean
	$(call set_defines,-SPEAR -SPEARDEMO -UPLOAD +GOODTIMES +CARMACIZED -APOGEE_1_1)
	dh_auto_build -O--parallel -- BINARY=wolf4sdl-wl6

	# Wolf3d Full v1.4 Apogee (with ReadThis)
	$(MAKE) clean
	$(call set_defines,-SPEAR -SPEARDEMO -UPLOAD -GOODTIMES +CARMACIZED -APOGEE_1_1)
	dh_auto_build -O--parallel -- BINARY=wolf4sdl-wl6a

	# Wolf3d Full v1.1 Apogee (with ReadThis)
	$(MAKE) clean
	$(call set_defines,-SPEAR -SPEARDEMO -UPLOAD -GOODTIMES +CARMACIZED +APOGEE_1_1)
	dh_auto_build -O--parallel -- BINARY=wolf4sdl-wl6a1

	# Wolf3d Shareware v1.4
	$(MAKE) clean
	$(call set_defines,-SPEAR -SPEARDEMO +UPLOAD -GOODTIMES +CARMACIZED -APOGEE_1_1)
	dh_auto_build -O--parallel -- BINARY=wolf4sdl-wl1

	# Spear of Destiny Full and Mission Disks (and GOODTIMES for no FormGen quiz)
	$(MAKE) clean
	$(call set_defines,+SPEAR -SPEARDEMO -UPLOAD +GOODTIMES +CARMACIZED -APOGEE_1_1)
	dh_auto_build -O--parallel -- BINARY=wolf4sdl-sod

	# Spear of Destiny Demo
	$(MAKE) clean
	$(call set_defines,+SPEAR +SPEARDEMO -UPLOAD -GOODTIMES +CARMACIZED -APOGEE_1_1)
	dh_auto_build -O--parallel -- BINARY=wolf4sdl-sdm

override_dh_auto_clean:
	$(call set_defines,-SPEAR -SPEARDEMO -UPLOAD +GOODTIMES +CARMACIZED -APOGEE_1_1)
	dh_auto_clean

override_dh_auto_install: