summaryrefslogtreecommitdiff
path: root/pkg/win32/GNUmakefile
blob: c64baaed94c3c23b39d410cec8e2322c2428ddad (plain)
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
include ../config.make

TOPLEVEL=../..

DOOM_ZIP=$(PROGRAM_PREFIX)doom-$(PACKAGE_VERSION)-win32.zip
HERETIC_ZIP=$(PROGRAM_PREFIX)heretic-$(PACKAGE_VERSION)-win32.zip
HEXEN_ZIP=$(PROGRAM_PREFIX)hexen-$(PACKAGE_VERSION)-win32.zip
STRIFE_ZIP=$(PROGRAM_PREFIX)strife-$(PACKAGE_VERSION)-win32.zip
ZIPS=$(DOOM_ZIP) $(HERETIC_ZIP) $(HEXEN_ZIP) $(STRIFE_ZIP)

DLL_FILES=$(TOPLEVEL)/src/SDL.dll                      \
          $(TOPLEVEL)/src/SDL_mixer.dll                \
          $(TOPLEVEL)/src/SDL_net.dll

all: $(ZIPS)

$(ZIPS):
	unix2dos $</*.txt
	zip -j -r $@ $</*

$(DOOM_ZIP): staging-doom hook-doom
$(HERETIC_ZIP): staging-heretic
$(HEXEN_ZIP): staging-hexen
$(STRIFE_ZIP): staging-strife hook-strife

# Special hooks to custom modify files for particular games.

hook-doom: staging-doom
	cp $(TOPLEVEL)/NOT-BUGS $</NOT-BUGS.txt

# Chocolate Strife has its own custom README file:

hook-strife: staging-strife
	cp $(TOPLEVEL)/README.Strife $</README.txt

# Build up a staging dir for a particular game.

staging-%:
	mkdir $@
	cp $(TOPLEVEL)/src/$(PROGRAM_PREFIX)$*.exe    \
	   $(DLL_FILES)                               \
	   $@/
	cp $(TOPLEVEL)/src/$(PROGRAM_PREFIX)setup.exe \
	   $@/$(PROGRAM_PREFIX)$*-setup.exe
	$(STRIP) $@/*.exe
	
	for f in $(DOC_FILES); do                    \
		cp $(TOPLEVEL)/$$f $@/$$f.txt;       \
	done
	cp $(TOPLEVEL)/man/CMDLINE.$* $@/CMDLINE.txt
	
	$(TOPLEVEL)/man/simplecpp -D_WIN32 -DPRECOMPILED  \
	             -D$(shell echo $* | tr a-z A-Z)      \
	         < $(TOPLEVEL)/man/INSTALL.template       \
	         > $@/INSTALL.txt

clean:
	rm -f $(ZIPS)
	rm -rf staging-*