Makefile 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. #
  2. # $Id$
  3. # Copyright (c) 1999 by the Free Pascal Development Team
  4. #
  5. # Makefile for Free Component Library for Linux
  6. #
  7. # See the file COPYING.FPC, included in this distribution,
  8. # for details about the copyright.
  9. #
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. #
  14. #####################################################################
  15. # Defaults
  16. #####################################################################
  17. # Default place of the makefile.fpc
  18. DEFAULTFPCDIR=../..
  19. # set target and cpu which are required
  20. override OS_TARGET=linux
  21. override CPU=i386
  22. # Include files
  23. INC=../inc
  24. XML=../xml
  25. PROCINC=../$(CPU)
  26. # default library name
  27. LIBNAME=fpfcl
  28. # Where to place the files
  29. TARGETDIR=.
  30. # We need always -S2
  31. NEEDOPT=-S2
  32. # As default make only the units
  33. DEFAULTUNITS=1
  34. #####################################################################
  35. # Real targets
  36. #####################################################################
  37. # INCUNITS is defined in makefile.inc
  38. # They are default units for all platforms.
  39. include $(INC)/Makefile.inc
  40. include $(XML)/Makefile.inc
  41. UNITOBJECTS=classes $(INCUNITS) $(XMLUNITS)
  42. EXEOBJECTS=
  43. #####################################################################
  44. # Common targets
  45. #####################################################################
  46. .PHONY: all clean install info \
  47. staticlib sharedlib libsclean \
  48. staticinstall sharedinstall libinstall \
  49. all: testfpcmake fpc_all
  50. clean: testfpcmake fpc_clean
  51. install: testfpcmake fpc_install
  52. info: testfpcmake fpc_info
  53. staticlib: testfpcmake fpc_staticlib
  54. sharedlib: testfpcmake fpc_sharedlib
  55. libsclean: testfpcmake fpc_libsclean
  56. staticinstall: testfpcmake fpc_staticinstall
  57. sharedinstall: testfpcmake fpc_sharedinstall
  58. libinstall: testfpcmake fpc_libinstall
  59. #####################################################################
  60. # Include default makefile
  61. #####################################################################
  62. # test if FPCMAKE is still valid
  63. ifdef FPCMAKE
  64. ifeq ($(strip $(wildcard $(FPCMAKE))),)
  65. FPCDIR=
  66. FPCMAKE=
  67. endif
  68. endif
  69. ifndef FPCDIR
  70. ifdef DEFAULTFPCDIR
  71. FPCDIR=$(DEFAULTFPCDIR)
  72. endif
  73. endif
  74. ifndef FPCMAKE
  75. ifdef FPCDIR
  76. FPCMAKE=$(FPCDIR)/makefile.fpc
  77. else
  78. FPCMAKE=makefile.fpc
  79. endif
  80. endif
  81. override FPCMAKE:=$(strip $(wildcard $(FPCMAKE)))
  82. ifeq ($(FPCMAKE),)
  83. testfpcmake:
  84. @echo makefile.fpc not found!
  85. @echo Check the FPCMAKE and FPCDIR environment variables.
  86. @exit
  87. else
  88. include $(FPCMAKE)
  89. testfpcmake:
  90. endif
  91. #####################################################################
  92. # Dependencies
  93. #####################################################################
  94. vpath %$(PASEXT) $(INC) $(XML)
  95. INCFILES=$(addprefix $(INC)/,$(INCNAMES))
  96. classes$(PPUEXT): $(INCFILES) classes$(PASEXT)
  97. inifiles$(PPUEXT): classes$(PPUEXT) inifiles$(PASEXT)
  98. ezcgi$(PPUEXT): ezcgi$(PASEXT) ezcgi.inc
  99. #
  100. # $Log$
  101. # Revision 1.13 1999-08-09 22:19:58 peter
  102. # * classes vmt changed to only positive addresses
  103. # * sharedlib creation is working
  104. #
  105. # Revision 1.12 1999/07/09 08:43:26 michael
  106. # + Added XML units
  107. #
  108. # Revision 1.11 1999/05/31 12:46:31 peter
  109. # * classes unit to unitobjects
  110. #
  111. # Revision 1.10 1999/04/27 19:13:44 michael
  112. # + Added ezcgi from Michael Hess
  113. #
  114. # Revision 1.9 1999/04/22 10:50:45 peter
  115. # * set target always
  116. #
  117. # Revision 1.8 1999/04/08 15:58:44 michael
  118. # + INCUNITS added
  119. #
  120. # Revision 1.7 1999/04/08 10:18:59 peter
  121. # * makefile updates
  122. #
  123. #