home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / nasm097s.zip / MAKEFILE.VC < prev    next >
Text File  |  1997-11-06  |  3KB  |  78 lines

  1. # Makefile for the Netwide Assembler under Win32
  2. #
  3. # The Netwide Assembler is copyright (C) 1996 Simon Tatham and
  4. # Julian Hall. All rights reserved. The software is
  5. # redistributable under the licence given in the file "Licence"
  6. # distributed in the NASM archive.
  7. #
  8. # This Makefile is designed to build NASM as a Win32 command-
  9. # line executable. It's been tested with Visual C++ 1.10.
  10.  
  11. CC = cl /c /O
  12. QCL = cl /c
  13. LINK = cl
  14. LINKFLAGS =
  15. LIBRARIES =
  16. EXE = .exe#
  17. OBJ = obj#
  18. SUFFIX = w#  # by default, this makefile produces nasmw.exe and ndisasmw.exe
  19.  
  20. .c.$(OBJ):
  21.     $(CC) $*.c
  22.  
  23. NASMOBJS = nasm.$(OBJ) nasmlib.$(OBJ) float.$(OBJ) insnsa.$(OBJ) \
  24.            assemble.$(OBJ) labels.$(OBJ) parser.$(OBJ) outform.$(OBJ) \
  25.        outbin.$(OBJ) outaout.$(OBJ) outcoff.$(OBJ) outelf.$(OBJ) \
  26.        outobj.$(OBJ) outas86.$(OBJ) outrdf.$(OBJ) outdbg.$(OBJ) \
  27.        preproc.$(OBJ) listing.$(OBJ) eval.$(OBJ)
  28.  
  29. NDISASMOBJS = ndisasm.$(OBJ) disasm.$(OBJ) sync.$(OBJ) nasmlib.$(OBJ) \
  30.               insnsd.$(OBJ)
  31.  
  32. all : nasm$(SUFFIX)$(EXE) ndisasm$(SUFFIX)$(EXE)
  33.  
  34. # We have to have a horrible kludge here to get round the 128 character
  35. # limit, as usual...
  36. LINKOBJS = a*.obj e*.obj f*.obj insnsa.obj l*.obj na*.obj o*.obj p*.obj
  37. nasm$(SUFFIX)$(EXE): $(NASMOBJS)
  38.     cl /Fenasm$(SUFFIX).exe $(LINKOBJS)
  39.  
  40. ndisasm$(SUFFIX)$(EXE): $(NDISASMOBJS)
  41.     cl /Fendisasm$(SUFFIX).exe $(NDISASMOBJS)
  42.  
  43. assemble.$(OBJ): assemble.c nasm.h assemble.h insns.h
  44. disasm.$(OBJ): disasm.c nasm.h disasm.h sync.h insns.h names.c
  45. eval.$(OBJ): eval.c nasm.h nasmlib.h eval.h
  46. float.$(OBJ): float.c nasm.h
  47. labels.$(OBJ): labels.c nasm.h nasmlib.h
  48. listing.$(OBJ): listing.c nasm.h nasmlib.h listing.h
  49. nasm.$(OBJ): nasm.c nasm.h nasmlib.h parser.h assemble.h labels.h \
  50.     listing.h outform.h
  51. nasmlib.$(OBJ): nasmlib.c nasm.h nasmlib.h
  52. ndisasm.$(OBJ): ndisasm.c nasm.h sync.h disasm.h
  53. outas86.$(OBJ): outas86.c nasm.h nasmlib.h
  54. outaout.$(OBJ): outaout.c nasm.h nasmlib.h
  55. outbin.$(OBJ): outbin.c nasm.h nasmlib.h
  56. outcoff.$(OBJ): outcoff.c nasm.h nasmlib.h
  57. outdbg.$(OBJ): outdbg.c nasm.h nasmlib.h
  58. outelf.$(OBJ): outelf.c nasm.h nasmlib.h
  59. outobj.$(OBJ): outobj.c nasm.h nasmlib.h
  60. outrdf.$(OBJ): outrdf.c nasm.h nasmlib.h
  61. outform.$(OBJ): outform.c outform.h nasm.h
  62. parser.$(OBJ): parser.c nasm.h nasmlib.h parser.h float.h names.c
  63. preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h nasmlib.h
  64. sync.$(OBJ): sync.c sync.h
  65.  
  66. # Another grotty hack: QC is less likely to run out of memory than
  67. # CL proper; and we don't need any optimisation in these modules
  68. # since they're just data.
  69. insnsa.$(OBJ): insnsa.c nasm.h insns.h
  70.     $(QCL) insnsa.c
  71. insnsd.$(OBJ): insnsd.c nasm.h insns.h
  72.     $(QCL) insnsd.c
  73.  
  74. clean :
  75.     del *.obj
  76.     del nasm$(SUFFIX)$(EXE)
  77.     del ndisasm$(SUFFIX)$(EXE)
  78.