2 # Only use Open Watcom WMAKE
4 all: cpu16.exe cpu16h.exe cpu32.exe
7 rm -v *.exe *.obj *.map
10 !include $(DOSLIBDIR)/extdep.mak
12 # library deps 16-bit large
13 $(DOSLIBDIR)/hw/cpu/dos86l/cpu.lib:
14 cd $(DOSLIBDIR)/hw/cpu && ./make.sh
15 $(DOSLIBDIR)/hw/dos/dos86l/dos.lib:
16 cd $(DOSLIBDIR)/hw/dos && ./make.sh
18 # library deps 16-bit huge
19 $(DOSLIBDIR)/hw/cpu/dos86h/cpu.lib:
20 cd $(DOSLIBDIR)/hw/cpu && ./make.sh
21 $(DOSLIBDIR)/hw/dos/dos86h/dos.lib:
22 cd $(DOSLIBDIR)/hw/dos && ./make.sh
24 # library deps 32-bit flat
25 $(DOSLIBDIR)/hw/cpu/dos386f/cpu.lib:
26 cd $(DOSLIBDIR)/hw/cpu && ./make.sh
27 $(DOSLIBDIR)/hw/dos/dos386f/dos.lib:
28 cd $(DOSLIBDIR)/hw/dos && ./make.sh
30 # NOTE: dos86l = 16-bit large memory model. memory model must match!
31 cpu16.exe: cpu16.obj $(DOSLIBDIR)/hw/cpu/dos86l/cpu.lib $(DOSLIBDIR)/hw/dos/dos86l/dos.lib
32 %write tmp.cmd option quiet option map=cpu16.map $(DOSLIB_LDFLAGS_DOS16L) file cpu16.obj name cpu16.exe
33 %write tmp.cmd library $(DOSLIBDIR)/hw/cpu/dos86l/cpu.lib
34 %write tmp.cmd library $(DOSLIBDIR)/hw/dos/dos86l/dos.lib
37 wcl $(FLAGS) -fo=cpu16.obj -ml $(DOSLIB_CFLAGS_DOS16L) -c cpu.c
39 # NOTE: dos86h = 16-bit huge memory model. memory model must match!
40 cpu16h.exe: cpu16h.obj $(DOSLIBDIR)/hw/cpu/dos86h/cpu.lib $(DOSLIBDIR)/hw/dos/dos86h/dos.lib
41 %write tmp.cmd option quiet option map=cpu16h.map $(DOSLIB_LDFLAGS_DOS16H) file cpu16h.obj name cpu16h.exe
42 %write tmp.cmd library $(DOSLIBDIR)/hw/cpu/dos86h/cpu.lib
43 %write tmp.cmd library $(DOSLIBDIR)/hw/dos/dos86h/dos.lib
46 wcl $(FLAGS) -fo=cpu16h.obj -mh $(DOSLIB_CFLAGS_DOS16H) -c cpu.c
48 # NOTE: dos386f = 32-bit flat memory model. memory model must match!
49 cpu32.exe: cpu32.obj $(DOSLIBDIR)/hw/cpu/dos386f/cpu.lib $(DOSLIBDIR)/hw/dos/dos386f/dos.lib
50 %write tmp.cmd option quiet option map=cpu32.map $(DOSLIB_LDFLAGS_DOS32) file cpu32.obj name cpu32.exe
51 %write tmp.cmd library $(DOSLIBDIR)/hw/cpu/dos386f/cpu.lib
52 %write tmp.cmd library $(DOSLIBDIR)/hw/dos/dos386f/dos.lib
55 wcl386 $(FLAGS) -fo=cpu32.obj -mf $(DOSLIB_CFLAGS_DOS32) -c cpu.c