aboutsummaryrefslogtreecommitdiff
path: root/makefile
blob: c7cc4dbb79fe826f628edfc58c922ecae597d094 (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
#!/usr/bin/env wmake

subdirs=dos w9x

all: .SYMBOLIC
	for %i in ($(subdirs)) do %make %i/$^@

clean: .SYMBOLIC
	for %i in ($(subdirs)) do %make %i/$^@

# This would be so much easier with a multi-line macro...
sd1=cd $^:
!ifdef debug
sd2=wmake $^. debug=$(debug)
!else
sd2=wmake $^.
!endif
sd3=cd ..

dos/all: .SYMBOLIC
	$(sd1)
	$(sd2)
	$(sd3)
dos/clean: .SYMBOLIC
	$(sd1)
	$(sd2)
	$(sd3)
w9x/all: .SYMBOLIC
	$(sd1)
	$(sd2)
	$(sd3)
w9x/clean: .SYMBOLIC
	$(sd1)
	$(sd2)
	$(sd3)

# Build a zip with the driver binaries
zip: dos/all w9x/all .SYMBOLIC
	zip --DOS-names -fz- chu.zip dos/chudisk.sys dos/chud.exe w9x/chudisk.pdr w9x/chudisk.inf

srczip: .SYMBOLIC
	zip -fz- chusrc.zip COPYING README.md makefile inc/*.h  &
		dos/makefile dos/*.c dos/*.h dos/*.lnk &
		w9x/makefile w9x/*.c w9x/*.h w9x/*.lnk w9x/*.inf w9x/inc/*.h &
		linux/makefile linux/*.c linux/*.h linux/*.sh