aboutsummaryrefslogtreecommitdiffstats
path: root/dosutil/Makefile
blob: f3f90b3e197a5c44d419366b2603f9a58d350060 (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
#
# OpenWatcom compile and link utility
#
WCL	= wcl
WCLOPT	= -6 -osx -mt -bt=DOS -l=COM

UPX     = upx

NASM    = nasm
NASMOPT = -O9999

TARGETS = mdiskchk.com eltorito.sys

%.obj: %.c
	$(WCL) $(WCLOPT) -c -fo=$@ $<

%.com: %.obj
	$(WCL) $(WCLOPT) -fe=$@ $<
	$(UPX) --ultra-brute --lzma $@ || \
		$(UPX) --ultra-brute $@ || \
		true

%.sys: %.asm
	$(NASM) $(NASMOPT) -f bin -o $@ -l $*.lst $<
	$(UPX) --ultra-brute --lzma $@ || \
		$(UPX) --ultra-brute $@ || \
		true

%.com: %.asm
	$(NASM) $(NASMOPT) -f bin -o $@ -l $*.lst $<
	$(UPX) --ultra-brute --lzma $@ || \
		$(UPX) --ultra-brute $@ || \
		true

all: $(TARGETS)

tidy dist:
	-rm -f *.obj *.lst *.o

clean: tidy

spotless: clean
	-rm -f *.com *.sys *~