home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / biblioteki / c_library / asyncio / source / dmakefile < prev    next >
Makefile  |  1977-12-31  |  4KB  |  151 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 RecordAsyncFailure.c RequeuePacket.c SeekAsync.c SendPacket.c \
  14.       WaitPacket.c WriteAsync.c WriteCharAsync.c
  15.  
  16. OBJ = $(SRC:*.?:*.o)
  17.  
  18. PRAGMA = /include/pragmas/asyncio_pragmas.h
  19. FD     = /include/fd/asyncio_lib.fd
  20.  
  21. # Generate all "normal" flavors
  22.  
  23. All : /libs/asyncio.library $(PRAGMA) \
  24.       /dlib/asynciolibs.lib /dlib/asynciolibsr.lib /dlib/asyncios.lib /dlib/asynciosr.lib \
  25.       /lib/asyncio.lib /lib/asyncior.lib
  26.  
  27.  
  28. # The only difference when making the shared library is that Lib.c is included
  29. # (MUST be first), and that SHARED_LIB is defined. It only affects another define
  30. # in the (private) include file async.h
  31.  
  32. /libs/asyncio.library : Lib.o $(OBJ)
  33.     Sc LINK TO %(left) %(right)
  34.  
  35. Lib.o $(OBJ) : Lib.c $(SRC)
  36.     Sc DEF ASIO_SHARED_LIB UTILLIB OBJNAME %(left) %(right)
  37.  
  38.  
  39. /lib/asyncio.lib : $(SRC:*.c:*l.o) AsyncLib.o
  40.     Sc OBJLIB %(left) %(right)
  41.  
  42. $(SRC:*.c:*l.o) : $(SRC)
  43.     Sc PARAMS STACK OBJNAME %(left) %(right)
  44.  
  45. /lib/asyncior.lib : $(SRC:*.c:*lr.o) AsyncLib.o
  46.     Sc OBJLIB %(left) %(right)
  47.  
  48. $(SRC:*.c:*lr.o) AsyncLib.o : $(SRC) AsyncLib.c
  49.     Sc DEF ASIO_REGARGS OBJNAME %(left) %(right)
  50.  
  51.  
  52. # Does this dependancy look odd to you? Well, it is a bit odd, but it need to
  53. # be written like this in order to avoid a bug in DMake. If "$(SRC) : async.h"
  54. # was used instead, DMake would recompile the files that _didn't_ need it, and
  55. # ignore the ones that _did_ need it. ;)
  56.  
  57. $(OBJ) : async.h
  58.  
  59.  
  60. # Keep the pragma file up to date
  61.  
  62. $(PRAGMA) : $(FD)
  63.     FDTOPragma -o%(left) %(right)
  64.  
  65.  
  66. # Link libraries for use with the shared version of the library. Only needed if
  67. # the -mi option isn't used, or you use the autoinit stuff.
  68.  
  69. /lib/asynciolibs.lib : $(FD)
  70.     FDToLib -o%(left) %(right) -auto asyncio.library
  71.  
  72. /lib/asynciolibsr.lib : $(FD)
  73.     FDToLib -o%(left) %(right) -mr -hasynciolibsr.h -auto asyncio.library
  74.  
  75. # Large data models of the above two libraries. Not generated per default.
  76.  
  77. /lib/asynciolibs.lib : $(FD)
  78.     FDToLib -o%(left) %(right) -auto asyncio.library -md
  79.  
  80. /lib/asynciolibsr.lib : $(FD)
  81.     FDToLib -o%(left) %(right) -mr -hasynciolibsr.h -auto asyncio.library -md
  82.  
  83.  
  84. # Here the normal link library versions are generated. See lib.def for more information.
  85.  
  86. /lib/asyncios.lib :
  87.     LbMake asyncio s
  88.  
  89. /lib/asynciosr.lib :
  90.     LbMake asyncio s r
  91.  
  92. # Other flavours, not generated per default
  93.  
  94. /lib/asynciol.lib :
  95.     LbMake asyncio l
  96.  
  97. /lib/asynciorl.lib :
  98.     LbMake asyncio l r
  99.  
  100. /lib/asyncioes.lib :
  101.     LbMake asyncio s e
  102.  
  103. /lib/asyncioesr.lib :
  104.     LbMake asyncio s r e
  105.  
  106. /lib/asyncioel.lib :
  107.     LbMake asyncio l e
  108.  
  109. /lib/asyncioelr.lib :
  110.     LbMake asyncio l r e
  111.  
  112. /lib/asynciolp.lib :
  113.     LbMake asyncio l p
  114.  
  115. /lib/asynciolrp.lib :
  116.     LbMake asyncio l r p
  117.  
  118. /lib/asyncioesp.lib :
  119.     LbMake asyncio s p e
  120.  
  121. /lib/asyncioesrp.lib :
  122.     LbMake asyncio s r p e
  123.  
  124. /lib/asyncioelp.lib :
  125.     LbMake asyncio l p e
  126.  
  127. /lib/asyncioelrp.lib :
  128.     LbMake asyncio l r p e
  129.  
  130. /lib/asynciosp.lib :
  131.     LbMake asyncio s p
  132.  
  133. /lib/asynciosrp.lib :
  134.     LbMake asyncio s r p
  135.  
  136.  
  137. # SAS versions of some of the above
  138.  
  139. /lib/asyncioer.lib : $(SRC:*.c:*ler.o) AsyncLib.o
  140.     Sc OBJLIB %(left) %(right)
  141.  
  142. $(SRC:*.c:*ler.o) : $(SRC)
  143.     Sc DEF ASIO_REGARGS OBJNAME %(left) %(right)
  144.  
  145. /lib/asyncioe.lib : $(SRC:*.c:*le.o) AsyncLib.o
  146.     Sc PARAMS STACK DEF ASIO_NO_EXTERNALS OBJLIB %(left) %(right)
  147.  
  148. $(SRC:*.c:*le.o) : $(SRC)
  149.     Sc PARAMS STACK DEF ASIO_NO_EXTERNALS,ASIO_REGARGS OBJNAME %(left) %(right)
  150.  
  151.