# File: Makefile.286 # Purpose: Makefile support for "main-ibm.c" for Watcom C/C++ (286) # From: michmarc@microsoft.com (Mike Marcelais) # Compatable with Watcom C v10.0, v10.6, and v11 (with the v10.6 linker) # Note that bugs in the v10.5 linker prevent you from building a working # version of Angband # I used the extensions .l86 and .o86 so I could build the 386 version # in the same directory as the 286 version. # Variable.c is broken up into two pieces using #defines and special rules # because there is too much data to fit into one 16bit object file. CC = wcc .EXTENSIONS: .EXTENSIONS: .exe .ovl .l86 .obj .o86 .c # /mh /wo /zt16 /of are REQUIRED options # # For size CFLAGS = /ml /fpc /wx /wo /s /zt16 /oxsf /DUSE_IBM /DUSE_WAT /DUSE_286 ROOTOBJS = & z-util.o86 z-virt.o86 z-form.o86 z-rand.o86 z-term.o86 & main-ibm.o86 main.o86 OVLOBJS = & variab1.o86 variab2.o86 tables.o86 util.o86 cave.o86 & object1.o86 object2.o86 monster1.o86 monster2.o86 & xtra1.o86 xtra2.o86 spells1.o86 spells2.o86 & melee1.o86 melee2.o86 save.o86 files.o86 & cmd1.o86 cmd2.o86 cmd3.o86 cmd4.o86 cmd5.o86 cmd6.o86 & store.o86 birth.o86 load1.o86 load2.o86 & wizard1.o86 wizard2.o86 & generate.o86 dungeon.o86 init1.o86 init2.o86 all: angband.exe gredit.exe makepref.exe angband.exe: $(ROOTOBJS) $(OVLOBJS) angband.l86 # Note: Watcom v11 cut support for overlays. If you merely use the linker # that came with Watcom v10.6, or v10.0, then everything is fine. # Note: Watcom v10.5s linker has a serious bug that can cause overlay files # to be corrupt when created. If you are using Watcom v10.5, upgrade # to 10.6. wlink10 @angband.l86 gredit.exe: gredit.o86 gredit.l86 wlink @gredit.l86 makepref.exe: makepref.o86 makepref.l86 wlink @makepref.l86 angband.l86: makefile.286 %create angband.l86 # @%append angband.l86 debug all @%append angband.l86 libpath d:\comp\watcom\lib286;d:\comp\watcom\lib286\dos @%append angband.l86 overlay code @%append angband.l86 option dynamic @%append angband.l86 option caseexact @%append angband.l86 option stack=16k @%append angband.l86 option area=100k @%append angband.l86 name angband @for %i in ($(ROOTOBJS)) do @%append angband.l86 file %i @%append angband.l86 begin @%append angband.l86 autosection into angband.ovl @for %i in ($(OVLOBJS)) do @%append angband.l86 file %i @%append angband.l86 end makepref.l86: makefile.286 %create makepref.l86 # @%append makepref.l86 debug all @%append makepref.l86 OPTION CASEEXACT @%append makepref.l86 OPTION STACK=16k @%append makepref.l86 name makepref @%append makepref.l86 file makepref.o86 gredit.l86: makefile.286 %create gredit.l86 # @%append gredit.l86 debug all @%append gredit.l86 OPTION CASEEXACT @%append gredit.l86 OPTION STACK=16k @%append gredit.l86 name gredit @%append gredit.l86 file gredit.o86 .c.o86: $(CC) $(CFLAGS) /fo=$[*.o86 $[*.c variab1.o86: variable.c $(CC) $(CFLAGS) /DVARIABLE_PART1 /fo=variab1.o86 variable.c variab2.o86: variable.c $(CC) $(CFLAGS) /DVARIABLE_PART2 /fo=variab2.o86 variable.c clean: del *.err del *.o86 del *.exe del *.l86