home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / quot210s.zip / xtype / src / Makefile next >
Makefile  |  1998-12-13  |  2KB  |  108 lines

  1. ################################################################################
  2. #
  3. # Makefile for xtype library.
  4. #
  5. #      Created: 10th September 1998
  6. # Version 1.00: 10th September 1998
  7. #
  8. # (C) 1998 Nicholas Paul Sheppard. See the file licence.txt for details
  9. #
  10.  
  11.  
  12. ################################################################################
  13. #
  14. # Program names and options. Change appropriately.
  15. #
  16. # CC      - compiler name
  17. # CFLAGS  - flags to pass to the compiler
  18. # AR      - name of librarian
  19. # ARFLAGS - flags to pass to the librarian
  20. # INSTALL - file installation utility
  21. # ZIP     - name of archiver
  22. # ZFLAGS  - flags to pass to the archiver
  23. # RM      - file deletion utility
  24. #
  25. CC      = gcc
  26. CFLAGS  = -Wall -O2
  27. AR      = ar
  28. ARFLAGS = -r
  29. INSTALL = copy
  30. RM      = del
  31.  
  32.  
  33. ################################################################################
  34. #
  35. # File and directory names. Change appropriately.
  36. #
  37. # O - extension for object files
  38. # L - extension for libraries
  39. # V - version number
  40. # Z - extension for archives
  41. #
  42. # HEADER  - path and file name for installed header file
  43. # LIBRARY - path and file name for installed library file
  44. #
  45. O = .o
  46. L = .a
  47.  
  48. HEADER = \emx\include\xtype.h
  49. LIBRARY = \emx\lib\xtype$(L)
  50.  
  51.  
  52. ################################################################################
  53. #
  54. # Targets. Do not change.
  55. #
  56.  
  57. all: xtype$(L)
  58.  
  59. install: $(HEADER) $(LIBRARY)
  60.  
  61. clean: clean-objs
  62.  
  63. spotless: clean spotless-libs
  64.  
  65.  
  66. ################################################################################
  67. #
  68. # Pattern rules. Change appropriately (these are for GNU Make and GCC).
  69. #
  70.  
  71. %$(L):
  72.     $(AR) $(ARFLAGS) $@ $^
  73.  
  74. %$(O): %.c
  75.     $(CC) $(CFLAGS) -o $@ -c $*.c
  76.  
  77.  
  78. ################################################################################
  79. #
  80. # Dependencies. Do not change.
  81. #
  82.  
  83. OBJS = xarray$(O) xlist$(O) xstr$(O)
  84.  
  85. xtype$(L): $(OBJS)
  86.  
  87. xarray$(O): xarray.c xtype.h
  88. xlist$(O): xlist.c xtype.h
  89. xstr$(O): xstr.c xtype.h
  90.  
  91. $(HEADER): xtype.h
  92.     $(INSTALL) xtype.h $(HEADER)
  93.  
  94. $(LIBRARY): xtype$(L)
  95.     $(INSTALL) xtype$(L) $(LIBRARY)
  96.  
  97.  
  98. ################################################################################
  99. #
  100. # Additional cleaning targets. Do not change.
  101. #
  102.  
  103. clean-objs:
  104.     $(RM) $(OBJS)
  105.  
  106. spotless-libs:
  107.     $(RM) xtype$(L) $(HEADER) $(LIBRARY)
  108.