home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 1 / crawlyvol1.bin / program / compiler / nasm20b / nasm_src / makefile < prev    next >
Makefile  |  1993-01-19  |  10KB  |  351 lines

  1. #NOWARNINGS=-w-
  2. # ----------------------------------------------------------------------
  3. #     If you don't have the environment var set, uncomment this
  4. #
  5. #CCDEV=g:\turbo.c
  6. #CCDEV=c:
  7. # ----------------------------------------------------------------------
  8. # Things to change for other OS/Machinery are marked with
  9. # ... ---- look here ----
  10. # Global replace ")\" with ")/" for Unix
  11. # Incorporate data from the various .TLK files into the link commands
  12.  
  13. TCDEBUG=-y
  14. TDDEBUG=-l -g -y
  15.  
  16. #YACCDEBUG=-DYACCDEBUG=1
  17. #DEBUG=-DDEBUG=1 -DLOCALDEBUG=1
  18. YFLAGS=-v
  19. AFLAGS=-y
  20.  
  21. # ... ---- look here ----
  22. # ------------------------------------------------------------------------
  23. #       Change these defines according to your installation
  24. # ------------------------------------------------------------------------
  25. # TOS or MSDOS (UNIX maybe)
  26. OS=TOS
  27. EXT=.ttp
  28. # MOTOROLA or INTEL currently
  29. MACHINERY=MOTOROLA
  30.  
  31. #CC=
  32. #LD=
  33. #AS=
  34. #YACC=
  35. #STRIP=makefast
  36.  
  37. SRC65=lib\src
  38. INIT=$(LIBDIR)\start.o
  39. LIBS=-c=std65.tlk
  40. INCLUDE=$(INCDIR)
  41.  
  42. SLOW=-p
  43. CFLAGS=$(TCDEBUG) -i$(INCLUDE) $(NOWARNINGS) -a -D$(OS) -D$(MACHINERY)
  44. IFLAGS=-i$(INCLUDE)
  45.  
  46. LFLAGS=$(TDDEBUG) -s=32000
  47.  
  48.  
  49. .SUFFIXES:
  50.  
  51. .SUFFIXES:    $(EXT) .s .o .i .c .y
  52.  
  53. .c.o:
  54.     $(CC)  $(CFLAGS) $<
  55.  
  56. .o$(EXT):
  57.     $(LD) $(LFLAGS) $(INIT) -o=$*$(EXT) $*.o $(LIBS)
  58.     $(STRIP) $*$(EXT)
  59.  
  60. .c.i:
  61.     $(CPP) -o=$*.i $(CFLAGS) $<
  62.  
  63. .i.o:
  64.     $(CC) $(CFLAGS) $<
  65.  
  66.  
  67. # ------------------------------------------------------------------------
  68. #           Until here!  Keeping looking for more...
  69. # ------------------------------------------------------------------------
  70. PRGS=nasm65$(EXT) nlink65$(EXT) nlib65$(EXT)
  71. SUPPORT=xtrctbin$(EXT) chkffff$(EXT) demac65$(EXT) disasm65$(EXT) crlf155$(EXT) nasm$(EXT)
  72.  
  73. ADEPS=main65.o  asm65.o ops.o  exprasm.o helper.o input.o  segment.o  \
  74.       error.o   debug.o if.o   symbols.o object.o macro.o  process.o  \
  75.       lexer.o   expr.o  imm.o  immasm.o  labels.o ndebug.o errorasm.o \
  76.       sym_asm.o stats.o hash.o float.o   io.o     fix.o    version0.o \
  77.       p_debug.o
  78.  
  79. LDEPS=link65.o worker.o err_link.o lsymbols.o sym_link.o imm.o        \
  80.       lexpr.o  error.o  exprlink.o lsegment.o debug.o    helper.o     \
  81.       lload.o  lreloc.o stats.o    load.o     hash.o     fix.o        \
  82.       link.o   libfix.o libflip.o version0.o  lp_debug.o
  83.       
  84.  
  85. DDEPS=disasm.o version0.o helper.o dload.o error.o stats.o debug.o
  86.  
  87. IDEPS=lib65.o libwork.o error.o debug.o helper.o errorlib.o stats.o \
  88.       libflip.o libfix.o version0.o
  89.  
  90. NXDEPS=nasm.o error.o helper.o debug.o stats.o
  91.  
  92. DEPSI=main65.i asm65.i  ops.i  exprasm.i helper.i input.i  segment.i  \
  93.       error.i  debug.i  if.i   symbols.i object.i macro.i  process.i  \
  94.       lexer.i  expr.i   imm.i  immasm.i  labels.i ndebug.i errorasm.i \
  95.       sym_asm.i stats.i hash.i float.i   io.i     link65.i worker.i   \
  96.       err_link.i lsymbols.i sym_link.i lexpr.i exprlink.i segment.i   \
  97.       lload.i  lreloc.i lib65.i libwork.i  errorlib.i  load.i       \
  98.       libfix.i libflip.i version0.i
  99.  
  100. ASCII=*.c *.h *.y *.tlk demo\*.[hsl]* doc\* lib\src\*.s65 header\*
  101.       
  102. TABASCII=makefile makeback.up demo\makefile lib\src\makefile
  103.  
  104. all:        $(PRGS) support
  105.  
  106. it:        nasm65$(EXT) nlink65$(EXT)
  107.  
  108. install:    $(PRGS) support
  109.     $(SHELL) cp $(PRGS) $(SUPPORT) $(BINDIR)
  110.  
  111. backup:
  112.     make -f makeback.up backup
  113.  
  114. restore:
  115.     make -f makeback.up restore
  116.  
  117. to_us:    crlf155$(EXT)
  118.     crlf155 -s -u $(ASCII)
  119.     crlf155 -s $(TABASCII)
  120.  
  121. untabify:    crlf155$(EXT)
  122.     crlf155 -s -n -u $(ASCII)
  123.  
  124. support:        $(SUPPORT)
  125.  
  126. cpp:    $(DEPSI) xtrctbin.i chkffff.i de_mac.i disasm.i crlf155.i
  127.  
  128. # ... ---- look here ----
  129. ### ******************** CHANGE THESE ***********************
  130. portable$(EXT):    portable.o
  131.     $(LD) $(LFLAGS) $(INIT) -o=portable$(EXT) portable.o $(LIBS) 
  132.  
  133. nasm$(EXT):    $(NXDEPS)
  134.     $(LD) $(LFLAGS) $(INIT) -c=nasm.tlk -o=nasm$(EXT)
  135. #    $(STRIP) nasm65$(EXT)
  136.     
  137. nasm65$(EXT):    $(ADEPS)
  138.     $(LD) $(LFLAGS) $(INIT) -c=asm65.tlk -o=nasm65$(EXT) 
  139. #    $(STRIP) nasm65$(EXT)
  140.  
  141. nlink65$(EXT):    $(LDEPS)
  142.     $(LD) $(LFLAGS) $(INIT) -c=link65.tlk -o=nlink65$(EXT) 
  143. #    $(STRIP) nlink65$(EXT)
  144.  
  145. nlib65$(EXT):    $(IDEPS)
  146.     $(LD) $(LFLAGS) $(INIT) -c=lib65.tlk -o=nlib65$(EXT) 
  147. #    $(STRIP) nlib65$(EXT)
  148.  
  149. disasm65$(EXT):    $(DDEPS)
  150.     $(LD) $(LFLAGS) $(INIT) -c=disasm65.tlk -o=disasm65$(EXT)  
  151. #    $(STRIP) disasm65$(EXT)
  152.  
  153.  
  154. demac65$(EXT):    de_mac.o
  155.     $(LD) $(LFLAGS) $(INIT) -o=demac65$(EXT) de_mac.o $(LIBS)
  156. #    $(STRIP) demac65$(EXT)
  157.  
  158. crlf155$(EXT):    crlf155.o
  159.     $(LD) $(LFLAGS) $(INIT) -o=crlf155$(EXT) crlf155.o $(LIBS)
  160. #    $(STRIP) crlf155$(EXT)
  161.  
  162. xtrctbin$(EXT):    xtrctbin.o
  163.     $(LD) $(LFLAGS) $(INIT) -o=xtrctbin$(EXT) xtrctbin.o $(LIBS)
  164. #    $(STRIP) xtrctbin$(EXT)
  165.  
  166. chkffff$(EXT):    chkffff.o
  167.     $(LD) $(LFLAGS) $(INIT) -o=chkffff$(EXT) chkffff.o $(LIBS)
  168. #    $(STRIP) chkffff$(EXT)
  169. # ******************* LOOK BELOW FOR MORE *************************
  170.  
  171. main65.o:    main65.c defines.h nmalloc.h buffer.h debug.h
  172.     $(CC) $(SLOW) $(CFLAGS) $(DEBUG) $(YACCDEBUG) main65.c
  173.  
  174. debug.o:    debug.c defines.h
  175.     $(CC) $(SLOW) $(CFLAGS) $(DEBUG) debug.c
  176.  
  177. err_link.o:    err_link.c defines.h
  178.     $(CC) $(SLOW) $(CFLAGS) err_link.c
  179.  
  180. error.o:    error.c defines.h
  181.     $(CC) $(SLOW) $(CFLAGS) error.c
  182.  
  183. errorasm.o:    errorasm.c defines.h structs.h y_tab.h buffer.h ops.h
  184.     $(CC) $(SLOW) $(CFLAGS) errorasm.c
  185.  
  186. errorlib.o:    errorlib.c err_link.o
  187.     $(CC) $(SLOW) $(CFLAGS) errorlib.c
  188.  
  189. expr.o:     expr.c     defines.h op.h debug.h labels.h structs.h \
  190.                 nmalloc.h code.h exprfast.h
  191.     $(CC) $(CFLAGS) expr.c
  192.  
  193. exprasm.o:    exprasm.c defines.h debug.h labels.h structs.h code.h \
  194.                 nmalloc.h exprfast.h op.h
  195.     $(CC) $(CFLAGS) exprasm.c
  196.  
  197. exprlink.o:    exprlink.c defines.h debug.h structs.h
  198.     $(CC) $(CFLAGS) exprlink.c
  199.  
  200. fix.o:    fix.c defines.h debug.h structs.h nmalloc.h code.h fix.h \
  201.             labels.h seg.h
  202.     $(CC) $(CFLAGS) fix.c
  203.  
  204. float.o:    float.c defines.h
  205.     $(CC) $(SLOW) $(CFLAGS) float.c
  206.  
  207. # ... ---- look here ----
  208. ##### uncomment this if you can't use MAS ####
  209. #hash.o:    hash.c defines.h
  210. #    $(CC) $(CFLAGS) hash.c
  211. ##### and comment this out
  212. hash.o: xhash.s
  213.     $(AS) $(AFLAGS) -o=hash.o xhash.s
  214. #####
  215.  
  216. helper.o:    helper.c defines.h debug.h stats.h code.h
  217.     $(CC) $(CFLAGS) helper.c
  218.  
  219. if.o:        if.c defines.h labels.h y_tab.h debug.h buffer.h 
  220.     $(CC) $(CFLAGS) if.c
  221.  
  222. imm.o:        imm.c defines.h debug.h structs.h imm.h nmalloc.h
  223.     $(CC) $(CFLAGS) imm.c
  224.  
  225. immasm.o:    immasm.c defines.h debug.h imm.h op.h
  226.     $(CC) $(CFLAGS) immasm.c
  227.  
  228. input.o:    input.c defines.h structs.h debug.h nmalloc.h \
  229.             buffer.h
  230.     $(CC) $(CFLAGS) input.c
  231.  
  232. io.o:        io.c defines.h structs.h debug.h nmalloc.h buffer.h
  233.     $(CC) $(SLOW) $(CFLAGS) io.c
  234.  
  235. labels.o:    labels.c defines.h debug.h labels.h structs.h code.h \
  236.                 fix.h exprfast.h
  237.     $(CC) $(CFLAGS) labels.c
  238.  
  239. lexer.o:    lexer.c md_suck.c defines.h y_tab.h structs.h debug.h code.h  \
  240.             nmalloc.h code.h inputfst.h 
  241.     $(CC) $(CFLAGS) lexer.c
  242.  
  243. lexpr.o:        lexpr.c expr.o defines.h
  244.     $(CC) $(CFLAGS) lexpr.c
  245.  
  246. p_debug.o:    p_debug.c defines.h debug.h structs.h
  247.     $(CC) $(CFLAGS) p_debug.c
  248.  
  249. lp_debug.o:        p_debug.o defines.h
  250.     $(CC) $(CFLAGS) lp_debug.c
  251.  
  252. lib65.o:    lib65.c defines.h debug.h structs.h object.h lib.h  \
  253.         nmalloc.h 
  254.     $(CC) $(CFLAGS) lib65.c
  255.  
  256. libwork.o:    libwork.c defines.h debug.h code.h nmalloc.h structs.h      \
  257.         object.h lib.h
  258.     $(CC) $(CFLAGS) libwork.c
  259.  
  260. libflip.o: libflip.c defines.h debug.h structs.h object.h lib.h      \
  261.             code.h 
  262.     $(CC) $(CFLAGS) libflip.c
  263.  
  264. libfix.o: libfix.c defines.h debug.h structs.h object.h lib.h      \
  265.             code.h 
  266.     $(CC) $(CFLAGS) libfix.c
  267.  
  268. link.o: link.c defines.h debug.h nmalloc.h labels.h structs.h \
  269.             object.h seg.h imm.h process.h exprfast.h 
  270.     $(CC) $(CFLAGS) link.c
  271.  
  272. link65.o:    link65.c defines.h structs.h debug.h nmalloc.h code.h 
  273.     $(CC) $(CFLAGS) link65.c
  274.  
  275. lload.o:    lload.c defines.h debug.h nmalloc.h labels.h structs.h \
  276.         object.h code.h lib.h 
  277.     $(CC) $(CFLAGS) lload.c
  278.  
  279. dload.o:    dload.c load.o
  280.     $(CC) $(CFLAGS) dload.c
  281.  
  282. load.o: load.c defines.h debug.h nmalloc.h structs.h object.h \
  283.             code.h 
  284.     $(CC) $(CFLAGS) load.c
  285.  
  286. lreloc.o:    lreloc.c defines.h debug.h seg.h structs.h labels.h imm.h  \
  287.                 process.h 
  288.     $(CC) $(CFLAGS) lreloc.c
  289.  
  290. lsymbols.o:    lsymbols.c symbols.o
  291.     $(CC) $(CFLAGS) lsymbols.c
  292.  
  293. macro.o:    macro.c y_tab.h defines.h labels.h structs.h debug.h nmalloc.h \
  294.             buffer.h inputfst.h code.h
  295.     $(CC) $(CFLAGS) macro.c
  296.  
  297. ndebug.o:    ndebug.c y_tab.h defines.h structs.h
  298.     $(CC) $(SLOW) $(CFLAGS) ndebug.c
  299.  
  300. object.o:    object.c defines.h labels.h structs.h seg.h object.h debug.h  \
  301.                 code.h imm.h 
  302.     $(CC) $(SLOW) $(CFLAGS) object.c
  303.  
  304. ops.o:        ops.c defines.h ops.h
  305.     $(CC) $(SLOW) $(CFLAGS) ops.c
  306.  
  307. process.o:    process.c defines.h structs.h labels.h seg.h op.h   \
  308.                 nmalloc.h object.h fix.h process.h code.h debug.h
  309.     $(CC) $(CFLAGS) process.c
  310.  
  311. lsegment.o:    segment.o lsegment.c
  312.     $(CC) $(CFLAGS) lsegment.c
  313.  
  314. segment.o:    segment.c defines.h debug.h nmalloc.h structs.h code.h \
  315.         seg.h
  316.     $(CC) $(CFLAGS) segment.c
  317.  
  318. stats.o:    stats.c defines.h structs.h imm.h seg.h nmalloc.h
  319.     $(CC) $(SLOW) $(CFLAGS) stats.c
  320.  
  321. sym_asm.o:    sym_asm.c defines.h debug.h labels.h structs.h \
  322.                 exprfast.h 
  323.     $(CC) $(CFLAGS) sym_asm.c
  324.  
  325. sym_link.o:    sym_link.c defines.h debug.h labels.h structs.h 
  326.     $(CC) $(CFLAGS) sym_link.c
  327.  
  328. symbols.o:    symbols.c defines.h debug.h labels.h structs.h nmalloc.h 
  329.     $(CC) $(CFLAGS) symbols.c
  330.  
  331. version0.o:    version0.c structs.h object.h defines.h
  332.     $(CC) $(SLOW) $(CFLAGS) version0.c
  333.  
  334. worker.o:    worker.c defines.h debug.h nmalloc.h structs.h \
  335.                 object.h process.h 
  336.     $(CC) $(SLOW) $(CFLAGS) worker.c
  337.  
  338. asm65.c:    asm65.y
  339.     yacc $(YFLAGS) asm65.y
  340.     $(SHELL) mv y_tab.c asm65.c
  341.  
  342. asm65.o:    asm65.c defines.h labels.h structs.h code.h buffer.h \
  343.             exprfast.h op.h
  344.     $(CC) $(CFLAGS) asm65.c
  345.  
  346. defines.h:    localdef.h
  347.     $(SHELL) touch defines.h
  348.  
  349. localdef.h:    portable$(EXT)
  350.     portable$(EXT) x
  351.