home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / dev / c / AsyncIO.lha / AsyncIO / src / DMakeFile < prev    next >
Encoding:
Makefile  |  1996-12-03  |  4.1 KB  |  170 lines

  1. #
  2. # DMakeFile for asyncio library. Both shared library and normal library models.
  3. #
  4. #
  5. # Does not generate all flavors; only the basic ones:
  6. #   Normal arguments, smalldata
  7. #   Registered arguments, smalldata
  8. #
  9. # Should be easy to modify below to generate other flavors, if needed.
  10. #
  11.  
  12. SRC = CloseAsync.c OpenAsync.c OpenAsyncFH.c OpenAsyncFromFH.c ReadAsync.c \
  13.       ReadCharAsync.c ReadLineAsync.c RecordAsyncFailure.c RequeuePacket.c \
  14.       SeekAsync.c SendPacket.c WaitPacket.c WriteAsync.c WriteCharAsync.c  \
  15.       WriteLineAsync.c
  16.  
  17. OBJ = $(SRC:*.?:*.o)
  18.  
  19. PRAGMA = /include/pragmas/asyncio_pragmas.h
  20. FD     = /include/fd/asyncio_lib.fd
  21.  
  22. # Generate all "normal" flavors
  23.  
  24. All : /libs/asyncio.library $(PRAGMA) \
  25.       /dlib/asynciolibs.lib /dlib/asynciolibsr.lib /dlib/asyncios.lib /dlib/asynciosr.lib \
  26.       /lib/asyncio.lib /lib/asyncior.lib
  27.  
  28.  
  29. # The only difference when making the shared library is that Lib.c is included
  30. # (MUST be first), and that SHARED_LIB is defined. It only affects another define
  31. # in the (private) include file async.h
  32.  
  33. /libs/asyncio.library : Lib.o $(OBJ)
  34.     Sc LINK TO %(left) %(right)
  35.  
  36. Lib.o $(OBJ) : Lib.c $(SRC)
  37.     Sc DEF ASIO_SHARED_LIB UTILLIB OBJNAME %(left) %(right)
  38.  
  39.  
  40. # Normal link libraries
  41.  
  42. /lib/asyncio.lib : $(SRC:*.c:*l.o) AsyncLib.o
  43.     Sc OBJLIB %(left) %(right)
  44.  
  45. $(SRC:*.c:*l.o) : $(SRC)
  46.     Sc PARAMS STACK OBJNAME %(left) %(right)
  47.  
  48. /lib/asyncior.lib : $(SRC:*.c:*lr.o) AsyncLib.o
  49.     Sc OBJLIB %(left) %(right)
  50.  
  51. $(SRC:*.c:*lr.o) AsyncLib.o : $(SRC) AsyncLib.c
  52.     Sc DEF ASIO_REGARGS OBJNAME %(left) %(right)
  53.  
  54.  
  55. # Does this dependancy look odd to you? Well, it is a bit odd, but it need to
  56. # be written like this in order to avoid a bug in DMake. If "$(SRC) : async.h"
  57. # was used instead, DMake would recompile the files that _didn't_ need it, and
  58. # ignore the ones that _did_ need it. ;)
  59.  
  60. $(OBJ) : async.h
  61.  
  62.  
  63. # Keep the pragma file up to date
  64.  
  65. $(PRAGMA) : $(FD)
  66.     FDTOPragma -o%(left) %(right)
  67.  
  68.  
  69. # Link libraries for use with the shared version of the library. Only needed if
  70. # the -mi option isn't used, or you use the autoinit stuff.
  71.  
  72. /lib/asynciolibs.lib : $(FD)
  73.     FDToLib -o%(left) %(right) -auto asyncio.library
  74.  
  75. /lib/asynciolibsr.lib : $(FD)
  76.     FDToLib -o%(left) %(right) -mr -hasynciolibsr.h -auto asyncio.library
  77.  
  78. # Large data models of the above two libraries. Not generated per default.
  79.  
  80. /lib/asynciolibs.lib : $(FD)
  81.     FDToLib -o%(left) %(right) -auto asyncio.library -md
  82.  
  83. /lib/asynciolibsr.lib : $(FD)
  84.     FDToLib -o%(left) %(right) -mr -hasynciolibsr.h -auto asyncio.library -md
  85.  
  86.  
  87. # Here the normal link library versions are generated. See lib.def for more information.
  88.  
  89. /lib/asyncios.lib :
  90.     LbMake asyncio s
  91.  
  92. /lib/asynciosr.lib :
  93.     LbMake asyncio s r
  94.  
  95. # Other flavours, not generated per default
  96.  
  97. /lib/asynciol.lib :
  98.     LbMake asyncio l
  99.  
  100. /lib/asynciorl.lib :
  101.     LbMake asyncio l r
  102.  
  103. /lib/asyncioes.lib :
  104.     LbMake asyncio s e
  105.  
  106. /lib/asyncioesr.lib :
  107.     LbMake asyncio s r e
  108.  
  109. /lib/asyncioel.lib :
  110.     LbMake asyncio l e
  111.  
  112. /lib/asyncioelr.lib :
  113.     LbMake asyncio l r e
  114.  
  115. /lib/asynciolp.lib :
  116.     LbMake asyncio l p
  117.  
  118. /lib/asynciolrp.lib :
  119.     LbMake asyncio l r p
  120.  
  121. /lib/asyncioesp.lib :
  122.     LbMake asyncio s p e
  123.  
  124. /lib/asyncioesrp.lib :
  125.     LbMake asyncio s r p e
  126.  
  127. /lib/asyncioelp.lib :
  128.     LbMake asyncio l p e
  129.  
  130. /lib/asyncioelrp.lib :
  131.     LbMake asyncio l r p e
  132.  
  133. /lib/asynciosp.lib :
  134.     LbMake asyncio s p
  135.  
  136. /lib/asynciosrp.lib :
  137.     LbMake asyncio s r p
  138.  
  139.  
  140. # SAS versions of some of the above
  141.  
  142. /lib/asyncioer.lib : $(SRC:*.c:*ler.o) AsyncLib.o
  143.     Sc OBJLIB %(left) %(right)
  144.  
  145. $(SRC:*.c:*ler.o) : $(SRC)
  146.     Sc DEF ASIO_REGARGS OBJNAME %(left) %(right)
  147.  
  148. /lib/asyncioe.lib : $(SRC:*.c:*le.o) AsyncLib.o
  149.     Sc OBJLIB %(left) %(right)
  150.  
  151. $(SRC:*.c:*le.o) : $(SRC)
  152.     Sc PARAMS STACK DEF ASIO_NO_EXTERNALS,ASIO_REGARGS OBJNAME %(left) %(right)
  153.  
  154.  
  155. # Some other "odd" SAS/C link library version. "u" means that UtilityBase
  156. # is needed, and "2" means 020+ compiled.
  157.  
  158. /lib/asyncioru.lib : $(SRC:*.c:*lru.o) AsyncLib.o
  159.     Sc OBJLIB %(left) %(right)
  160.  
  161. $(SRC:*.c:*lru.o) : $(SRC)
  162.     Sc UTILLIB DEF ASIO_REGARGS OBJNAME %(left) %(right)
  163.  
  164. /lib/asyncioru2.lib : $(SRC:*.c:*lru2.o) AsyncLib.o
  165.     Sc DEF ASIO_REGARGS OBJLIB %(left) %(right)
  166.  
  167. $(SRC:*.c:*lru2.o) : $(SRC)
  168.     Sc UTILLIB CPU 68020 DEF ASIO_REGARGS OBJNAME %(left) %(right)
  169.  
  170.