home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / biblioteki / c_library / easylibs / source / dmakefile next >
Makefile  |  1977-12-31  |  3KB  |  115 lines

  1. #
  2. #    Makefile for creating a library with LibHeader.c
  3. #
  4.  
  5.  
  6.  
  7. ##########################################################################
  8. #    Definitions used in LibHeader.c
  9. ##########################################################################
  10. LIBNAME=helloworld.library
  11. LIBVERSION=40
  12. LIBREVISION=1
  13. #LIBBASESIZE=sizeof(struct Library)
  14. #LIBINITFUNC=
  15. #LIBOPENFUNC=
  16. #LIBCLOSEFUNC=
  17. #LIBTERMFUNC=
  18. #LIBFUNCTABLE=LibFuncTable
  19.  
  20.  
  21.  
  22.  
  23.  
  24. ##########################################################################
  25. #    Use this to compile with Dice
  26. ##########################################################################
  27. CC=dcc
  28. CFLAGS= -DLIBNAME=$(LIBNAME) -DLIBVERSION=$(LIBVERSION) \
  29.     -DLIBREVISION=$(LIBREVISION) -Iinclude
  30. AS=dcc
  31. AFLAGS=
  32. LN=dcc
  33. LFLAGS= -l0 -lc -lamiga30
  34. TO=-o
  35. NOLINK=-c
  36. LINK=
  37.  
  38. ##########################################################################
  39. #    Use this to compile with SAS/C
  40. ##########################################################################
  41. #CC=sc
  42. #CFLAGS=STDIO INCLUDEDIR include DEFINE LIBNAME=$(LIBNAME) \
  43. #    DEFINE LIBVERSION=$(LIBVERSION) DEFINE LIBREVISION=$(LIBREVISION)
  44. #AS=
  45. #AFLAGS=
  46. #LN=slink
  47. #LFLAGS= NOICONS FROM
  48. #TO=TO
  49. #NOLINK=
  50. #LINK=LINK
  51.  
  52.  
  53.  
  54. ###########################################################################
  55. #    You should not need to change anything below 
  56. ###########################################################################
  57.  
  58. #    Main targets: all clean
  59.  
  60. all: Xtract fd2pragma HelloWorld libs/HelloWorld.library
  61.  
  62. clean:
  63.     delete quiet #?.o libs/HelloWorld.library HelloWorld Xtract fd2pragma \
  64.         include/clib/HelloWorld_protos.h \
  65.         include/pragmas/HelloWorld_pragmas.h \
  66.         include/fd/HelloWorld_lib.fd
  67.  
  68.  
  69. #
  70. # Stuff for creating the library
  71. #
  72. libs/HelloWorld.library: LibHeader.o HelloWorldLib.o
  73.     $(LN) $(TO) libs/HelloWorld.library $(LFLAGS) LibHeader.o \
  74.         HelloWorldLib.o
  75.  
  76. LibHeader.o: LibHeader.c LibFuncTable.c
  77.     $(CC) $(CFLAGS) $(NOLINK) LibHeader.c
  78.  
  79. HelloWorldLib.o: HelloWorldLib.c
  80.     $(CC) $(CFLAGS) $(NOLINK) HelloWorldLib.c
  81.  
  82. LibFuncTable.c: include/fd/HelloWorld_lib.fd
  83.     fd2pragma include/fd/HelloWorld_lib.fd FUNCTABLE LibFuncTable.c
  84.  
  85.  
  86. #
  87. # Stuff for creating the executable
  88. #
  89. HelloWorld: include/clib/HelloWorld_protos.h \
  90.         include/pragmas/HelloWorld_pragmas.h \
  91.         HelloWorld.c
  92.     $(CC) $(LINK) $(CFLAGS) $(TO) HelloWorld HelloWorld.c
  93.  
  94.  
  95.  
  96.  
  97. #
  98. # Stuff for creating the include files
  99. #
  100. Xtract: Xtract.c
  101.     $(CC) $(LINK) $(CFLAGS) $(TO) Xtract Xtract.c
  102.  
  103. fd2pragma: fd2pragma.c
  104.     $(CC) $(LINK) $(CFLAGS) $(TO) fd2pragma fd2pragma.c
  105.  
  106. include/clib/HelloWorld_protos.h: HelloWorldLib.c
  107.     Xtract HelloWorldLib.c PROTOS >include/clib/HelloWorld_protos.h
  108.  
  109. include/pragmas/HelloWorld_pragmas.h: include/fd/HelloWorld_lib.fd
  110.     fd2pragma include/fd/HelloWorld_lib.fd \
  111.           SAS include/pragmas/HelloWorld_pragmas.h
  112.  
  113. include/fd/HelloWorld_lib.fd: HelloWorldLib.c
  114.     Xtract HelloWorldLib.c FD >include/fd/HelloWorld_lib.fd
  115.