# host: watcom c (dos, windows, os/2) # target: dos 16bit # Makefile for the Netwide Assembler # # The Netwide Assembler is copyright (C) 1996 Simon Tatham and # Julian Hall. All rights reserved. The software is # redistributable under the licence given in the file "Licence" # distributed in the NASM archive. # # this makefile is designed for use with the OpenWatcom C # compiler, it generates dos 16 bit executable # it has been tested with # OpenWatcom wmake.exe /u 1.1-rc1 (remember about that /u option :) # # Tested with OpenWatcom 1.1-rc1. # MAKE SURE THE "WATCOM" ENVIRONMENT VARIABLE IS SET TO THE # OPENWATCOM INCLUDE DIRECTORY! # output formats OUTFORMS = -DOF_ONLY -DOF_BIN -DOF_OBJ -DOF_WIN32 -DOF_AS86 # compiler flags CFLAGS = -fpi -ml -j -s -bt=dos -ohk -zp1 -os -zt32 -I$(%WATCOM)\h $(OUTFORMS) # -fpi inline math + emulation # -ml large model # -j signed char # -s no stack checking # -bt=dos target system - dos # -ohk optimizations # -zp1 don't align structure members # -os optimize for size # -zt32 put objects > 32 bytes in separate segments # compiler CC = wcc $(CFLAGS) # linker flags LDFLAGS = # linker LD = wcl # object file extension OBJ = obj # Where C directories live .c : .;.\output\ .c.obj: $(CC) -fo=$@ $[@ NASMOBJS = nasm.$(OBJ) nasmlib.$(OBJ) float.$(OBJ) insnsa.$(OBJ) \ assemble.$(OBJ) labels.$(OBJ) parser.$(OBJ) outform.$(OBJ) \ outbin.$(OBJ) outaout.$(OBJ) outcoff.$(OBJ) \ outelf32.$(OBJ) outelf64.$(OBJ) outobj.$(OBJ) outas86.$(OBJ) \ outrdf.$(OBJ) outdbg.$(OBJ) \ preproc.$(OBJ) listing.$(OBJ) eval.$(OBJ) outrdf2.$(OBJ) \ outieee.$(OBJ) NDISASMOBJS = ndisasm.$(OBJ) disasm.$(OBJ) sync.$(OBJ) nasmlib.$(OBJ) \ insnsd.$(OBJ) .NOCHECK all : nasm.exe ndisasm.exe rem This is dummy command for dumb make nasm.exe: $(NASMOBJS) $(LD) $(LDFLAGS) -fe=nasm.exe $(NASMOBJS) ndisasm.exe: $(NDISASMOBJS) $(LD) $(LDFLAGS) -fe=ndisasm.exe $(NDISASMOBJS) # linker response files nasm.lnk: $(NASMOBJS) %create $@ %append $@ N nasm.exe for %i in ($(NASMOBJS)) do %append $@ F %i ndisasm.lnk: %create $@ %append $@ N nasm.exe for %i in ($(NDISASMOBJS)) do %append $@ F %i clean : .SYMBOLIC -del *.obj -del *.lnk -del nasm.exe -del ndisasm.exe #-- Magic hints to mkdep.pl --# # @object-ending: ".$(OBJ)" # @path-separator: "" # This means kill the path completely #-- Everything below is generated by mkdep.pl - do not edit --# assemble.$(OBJ): assemble.c preproc.h insns.h regs.h regflags.c config.h \ version.h nasmlib.h nasm.h regvals.c insnsi.h assemble.h disasm.$(OBJ): disasm.c insns.h sync.h regdis.c regs.h config.h regs.c \ version.h nasm.h insnsn.c names.c insnsi.h disasm.h eval.$(OBJ): eval.c labels.h eval.h regs.h config.h version.h nasmlib.h \ nasm.h float.$(OBJ): float.c regs.h config.h version.h nasm.h insnsa.$(OBJ): insnsa.c insns.h regs.h config.h version.h nasm.h insnsi.h insnsd.$(OBJ): insnsd.c insns.h regs.h config.h version.h nasm.h insnsi.h insnsn.$(OBJ): insnsn.c labels.$(OBJ): labels.c regs.h config.h version.h nasmlib.h nasm.h listing.$(OBJ): listing.c regs.h config.h version.h nasmlib.h nasm.h \ listing.h macros.$(OBJ): macros.c names.$(OBJ): names.c regs.c insnsn.c nasm.$(OBJ): nasm.c labels.h preproc.h insns.h parser.h eval.h regs.h \ outform.h config.h version.h nasmlib.h nasm.h stdscan.h assemble.h insnsi.h \ listing.h nasmlib.$(OBJ): nasmlib.c insns.h regs.h config.h regs.c version.h nasmlib.h \ nasm.h insnsn.c names.c insnsi.h ndisasm.$(OBJ): ndisasm.c insns.h sync.h regs.h config.h version.h nasmlib.h \ nasm.h insnsi.h disasm.h outform.$(OBJ): outform.c regs.h config.h outform.h version.h nasm.h outaout.$(OBJ): outaout.c regs.h outform.h config.h version.h nasmlib.h \ nasm.h stdscan.h outas86.$(OBJ): outas86.c regs.h outform.h config.h version.h nasmlib.h \ nasm.h outbin.$(OBJ): outbin.c labels.h eval.h regs.h outform.h config.h version.h \ nasmlib.h nasm.h stdscan.h outcoff.$(OBJ): outcoff.c regs.h outform.h config.h version.h nasmlib.h \ nasm.h outdbg.$(OBJ): outdbg.c regs.h outform.h config.h version.h nasmlib.h nasm.h outelf32.$(OBJ): outelf32.c regs.h outform.h config.h version.h nasmlib.h \ nasm.h stdscan.h outelf64.$(OBJ): outelf64.c regs.h outform.h config.h version.h nasmlib.h \ nasm.h stdscan.h outieee.$(OBJ): outieee.c regs.h outform.h config.h version.h nasmlib.h \ nasm.h outmacho.$(OBJ): outmacho.c compiler.h regs.h outform.h config.h version.h \ nasmlib.h nasm.h outobj.$(OBJ): outobj.c regs.h outform.h config.h version.h nasmlib.h nasm.h \ stdscan.h outrdf.$(OBJ): outrdf.c regs.h outform.h config.h version.h nasmlib.h nasm.h outrdf2.$(OBJ): outrdf2.c rdoff.h regs.h outform.h config.h version.h \ nasmlib.h nasm.h parser.$(OBJ): parser.c insns.h parser.h float.h regs.h regflags.c config.h \ version.h nasmlib.h nasm.h stdscan.h insnsi.h preproc.$(OBJ): preproc.c macros.c regs.h config.h version.h nasmlib.h \ nasm.h regdis.$(OBJ): regdis.c regflags.$(OBJ): regflags.c regs.$(OBJ): regs.c regvals.$(OBJ): regvals.c stdscan.$(OBJ): stdscan.c insns.h regs.h config.h version.h nasmlib.h nasm.h \ stdscan.h insnsi.h sync.$(OBJ): sync.c sync.h tokhash.$(OBJ): tokhash.c insns.h regs.h config.h version.h nasm.h insnsi.h