home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / PAMAKE18.ZIP / MAKEFILE.TC < prev    next >
Text File  |  1989-09-30  |  4KB  |  114 lines

  1. #   PAMAKE makefile by Roundhill Computer Systems Limited   September 1989
  2. #
  3. #   This PAMAKE makefile builds the PAMAKE program for DOS using Borland
  4. #   Turbo C V 2.01.
  5. #
  6. #   For information on the PAMAKE make utility, see PAMAKE.DOC
  7. #
  8. #   The directory structure for which this makefile was constructed is
  9. #   as follows:
  10. #
  11. #   \tc2            :  C compiler executables
  12. #   \tc2\include    :  .H files
  13. #   \tc2\lib        :  compiler library files
  14. #   f:\msc51\pamake :  source for PAMAKE
  15. #
  16. #   This makefile is invoked from the \tc2\pamake directory. 
  17. #
  18. #   --------------------------------------------------------------------
  19.  
  20. target: pamake.exe
  21.     +@echo make complete:  target is up-to-date
  22.  
  23. #   --------------------------------------------------------------------
  24. #
  25. #   It is important to use the compact model rather than the small
  26. #   model.  In the small model, TC puts the stack at the top of a 
  27. #   64k data segment, so you always lose 64kb plus the code size when
  28. #   you spawn a program.  In the compact model, the heap is at the top
  29. #   of the memory map, so the overhead for spawned programs is only
  30. #   the code size plus fixed data, stack and current heap.  The compact
  31. #   model therefore gives significantly more space for spawned programs, 
  32. #   even though the code is slightly bigger.
  33. #   
  34. #   --------------------------------------------------------------------
  35.  
  36. M=c                        # compact model
  37. SRC=f:\msc51\pamake        # directory for source
  38.  
  39. #   --------------------------------------------------------------------
  40. #
  41. #   The following macro definitions are placed in the DOS environment
  42. #   during execution of PAMAKE.  Modify them to specify the pathnames
  43. #   which apply in your system.  Note that the PATH must include all
  44. #   directories which contain commands to be executed by PAMAKE, since
  45. #   it overrides your previous path during the execution of the make.
  46. #
  47. #   --------------------------------------------------------------------
  48.  
  49. +PATH=\tc2
  50. +LIB=\tc2\lib
  51.  
  52. #   --------------------------------------------------------------------
  53. #
  54. #   PAMAKE has a built-in command of $(CC) $(CFLAGS) $(CFILES) for C 
  55. #   compilations.  Here we set these macros for the specific compiler.
  56. #   Most flags are activated by copying them to TURBOC.CFG in the
  57. #   current directory, which is done in the 'config' step below.
  58. #
  59. #   --------------------------------------------------------------------
  60.  
  61. #if TEST=1
  62. CCD=-v              # compile for TD
  63. #endif
  64.  
  65. CCW=-wrvl -wamb -wamp -wnod -wpro -wstv -wuse -wcln -wsig -w-stu
  66. CCI=-I$(SRC) -I$(PATH)\include -L$(PATH)\lib
  67. CCO=-G -O -Z 
  68.  
  69. CC=tcc
  70. CFLAGS=-c $(CCD) -m$M
  71. CFILES=-o$@ $<
  72.  
  73. .SUFFIXES:                              # clear suffixes list
  74. .SUFFIXES: .c                           # not .asm and .pnl as built-in
  75.  
  76. #   --------------------------------------------------------------------
  77. #
  78. #   Here are the programs to build
  79. #
  80. #   --------------------------------------------------------------------
  81.  
  82. OBJS= main.obj check.obj input.obj macro.obj make.obj reader.obj rules.obj ifproc.obj mtime.obj
  83.  
  84. pamake.exe: $(OBJS)
  85.     tcc -m$M $(CCD) -f- -le -epamake.exe $(OBJS)
  86.  
  87. #   --------------------------------------------------------------------
  88. #
  89. #   Commands to build objects.
  90. #
  91. #   --------------------------------------------------------------------
  92.  
  93. $(OBJS): $(SRC)\$*.c $(SRC)\h.h
  94.  
  95. #   --------------------------------------------------------------------
  96. #
  97. #   The `config' target writes a Turbo C config file to your current
  98. #   working directory.
  99. #
  100. #   --------------------------------------------------------------------
  101.  
  102. config:
  103.     +copy $- turboc.cfg
  104. $(CCW)
  105. $(CCI)
  106. $(CCO)
  107. <
  108.  
  109. #   --------------------------------------------------------------------
  110. #
  111. #   end of makefile
  112. #
  113. #   --------------------------------------------------------------------
  114.