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

  1. # Makefile for the Netwide Assembler under 32-bit DOS(tm)
  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 using the 32-bit WIN32 C
  9. # compiler Symantec(tm) C++ 7.5, provided you have a MAKE-utility
  10. # that's compatible to SMAKE.
  11.  
  12. CC = sc
  13. CCFLAGS = -c -a1 -mx -Nc -w2 -w7 -o+time -5
  14. # -5            optimize for pentium (tm)
  15. # -c            compile only
  16. # -o-all        no optimizations (to avoid problems in disasm.c)
  17. # -o+time       optimize for speed
  18. # -o+space      optimize for size
  19. # -A1           byte alignment for structures
  20. # -mn           compile for Win32 executable
  21. # -mx           compile for DOS386 (DOSX) executable
  22. # -Nc           create COMDAT records
  23. # -w2           possible unattended assignment: off
  24. # -w7           for loops with empty instruction-body
  25.  
  26. LINK = link
  27. LINKFLAGS = /noi /exet:DOSX
  28. # /noignorecase all symbols are case-sensitive
  29. # /exet:NT      Exetype: NT (Win32)
  30. # /exet:DOSX    Exetype: DOSX (DOS32)
  31. # /su:console   Subsystem: Console (Console-App)
  32.  
  33. LIBRARIES =
  34. EXE = .exe
  35. OBJ = obj
  36.  
  37. .c.$(OBJ):
  38.         $(CC) $(CCFLAGS) $*.c
  39.  
  40.  
  41. #
  42. # modules needed for different programs
  43. #
  44.  
  45. NASMOBJS = nasm.$(OBJ) nasmlib.$(OBJ) float.$(OBJ) insnsa.$(OBJ) \
  46.            assemble.$(OBJ) labels.$(OBJ) parser.$(OBJ) outform.$(OBJ) \
  47.        outbin.$(OBJ) outaout.$(OBJ) outcoff.$(OBJ) outelf.$(OBJ) \
  48.        outobj.$(OBJ) outas86.$(OBJ) outrdf.$(OBJ) outdbg.$(OBJ) \
  49.        preproc.$(OBJ) listing.$(OBJ) eval.$(OBJ)
  50.  
  51. NDISASMOBJS = ndisasm.$(OBJ) disasm.$(OBJ) sync.$(OBJ) nasmlib.$(OBJ) \
  52.               insnsd.$(OBJ)
  53.  
  54.  
  55. #
  56. # programs to create
  57. #
  58.  
  59. all : nasm$(EXE) ndisasm$(EXE)
  60.  
  61.  
  62. #
  63. # We have to have a horrible kludge here to get round the 128 character
  64. # limit, as usual... we'll simply use LNK-files :)
  65. #
  66. nasm$(EXE): $(NASMOBJS)
  67.         $(LINK) $(LINKFLAGS) @<<
  68. cx.obj $(NASMOBJS)
  69. nasm.exe
  70. <<
  71.  
  72. ndisasm$(EXE): $(NDISASMOBJS)
  73.         $(LINK) $(LINKFLAGS) @<<
  74. cx.obj $(NDISASMOBJS)
  75. ndisasm.exe
  76. <<
  77.  
  78.  
  79.  
  80. #
  81. # modules for programs
  82. #
  83.  
  84. disasm.$(OBJ): disasm.c nasm.h disasm.h sync.h insns.h names.c
  85. assemble.$(OBJ): assemble.c nasm.h assemble.h insns.h
  86. eval.$(OBJ): eval.c nasm.h nasmlib.h eval.h
  87. float.$(OBJ): float.c nasm.h
  88. labels.$(OBJ): labels.c nasm.h nasmlib.h
  89. listing.$(OBJ): listing.c nasm.h nasmlib.h listing.h
  90. nasm.$(OBJ): nasm.c nasm.h nasmlib.h parser.h assemble.h labels.h \
  91.     listing.h outform.h
  92. nasmlib.$(OBJ): nasmlib.c nasm.h nasmlib.h
  93. ndisasm.$(OBJ): ndisasm.c nasm.h sync.h disasm.h
  94. outas86.$(OBJ): outas86.c nasm.h nasmlib.h
  95. outaout.$(OBJ): outaout.c nasm.h nasmlib.h
  96. outbin.$(OBJ): outbin.c nasm.h nasmlib.h
  97. outcoff.$(OBJ): outcoff.c nasm.h nasmlib.h
  98. outdbg.$(OBJ): outdbg.c nasm.h nasmlib.h
  99. outelf.$(OBJ): outelf.c nasm.h nasmlib.h
  100. outobj.$(OBJ): outobj.c nasm.h nasmlib.h
  101. outrdf.$(OBJ): outrdf.c nasm.h nasmlib.h
  102. outform.$(OBJ): outform.c outform.h nasm.h
  103. parser.$(OBJ): parser.c nasm.h nasmlib.h parser.h float.h names.c
  104. preproc.$(OBJ): preproc.c macros.c preproc.h nasm.h nasmlib.h
  105. sync.$(OBJ): sync.c sync.h
  106. insnsa.$(OBJ): insnsa.c nasm.h insns.h
  107. insnsd.$(OBJ): insnsd.c nasm.h insns.h
  108.  
  109.  
  110.  
  111. clean :
  112.     del *.obj
  113.     del nasm$(EXE)
  114.     del ndisasm$(EXE)
  115.