Makefile 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. #
  2. # $Id$
  3. # Copyright (c) 1999 by the Free Pascal Development Team
  4. #
  5. # Makefile for <template> for Free Pascal
  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. # Version of forms
  18. FORMSVERSION=88
  19. #FORMSVERSION=86
  20. # Where are the include files located
  21. INC=
  22. PROCINC=
  23. OSINC=
  24. # Needed options, without it won't compile
  25. NEEDOPT=-S2
  26. # Needed unit dir, which is searched as the first path
  27. NEEDUNITDIR=
  28. # Define if forms library is not in /usr/lib
  29. # FORMSLIBDIR=
  30. # Define if X library is not in /usr/lib
  31. # XLIBDIR=
  32. # Where need we to place the executables/ppu/objects
  33. TARGETDIR=
  34. UNITTARGETDIR=
  35. # As default make only the units
  36. #DEFAULTUNITS=1
  37. # Uncomment this is the makefile.fpc isn't located in ../..
  38. DEFAULTFPCDIR=../..
  39. #####################################################################
  40. # Real targets
  41. #####################################################################
  42. UNITOBJECTS=x xresource xlib xutil forms
  43. EXEOBJECTS=fd2pascal
  44. #####################################################################
  45. # Common targets
  46. #####################################################################
  47. ifdef FORMSLLIBDIR
  48. override NEEDLIBDIR+=$(FORMSLIBDIR)
  49. endif
  50. ifdef XLIBDIR
  51. override NEEDLIBDIR+=$(XLIBDIR)
  52. endif
  53. #####################################################################
  54. # Common targets
  55. #####################################################################
  56. .PHONY: all clean install info \
  57. staticlib sharedlib libsclean \
  58. staticinstall sharedinstall libinstall demo\
  59. all: testfpcmake fpc_all
  60. install: testfpcmake fpc_install
  61. info: testfpcmake fpc_info
  62. staticlib: testfpcmake fpc_staticlib
  63. sharedlib: testfpcmake fpc_sharedlib
  64. libsclean: testfpcmake fpc_libsclean
  65. staticinstall: testfpcmake fpc_staticinstall
  66. sharedinstall: testfpcmake fpc_sharedinstall
  67. libinstall: testfpcmake fpc_libinstall
  68. demo:
  69. $(MAKE) -C demo
  70. #####################################################################
  71. # Include default makefile
  72. #####################################################################
  73. # test if FPCMAKE is still valid
  74. ifdef FPCMAKE
  75. ifeq ($(strip $(wildcard $(FPCMAKE))),)
  76. FPCDIR=
  77. FPCMAKE=
  78. endif
  79. endif
  80. ifndef FPCDIR
  81. ifdef DEFAULTFPCDIR
  82. FPCDIR=$(DEFAULTFPCDIR)
  83. endif
  84. endif
  85. ifndef FPCMAKE
  86. ifdef FPCDIR
  87. FPCMAKE=$(FPCDIR)/makefile.fpc
  88. else
  89. FPCMAKE=makefile.fpc
  90. endif
  91. endif
  92. override FPCMAKE:=$(strip $(wildcard $(FPCMAKE)))
  93. ifeq ($(FPCMAKE),)
  94. testfpcmake:
  95. @echo makefile.fpc not found!
  96. @echo Check the FPCMAKE and FPCDIR environment variables.
  97. @exit
  98. else
  99. include $(FPCMAKE)
  100. testfpcmake:
  101. endif
  102. #####################################################################
  103. # Dependencies
  104. #####################################################################
  105. clean: testfpcmake fpc_clean
  106. $(DEL) forms$(PASEXT)
  107. forms$(PPUEXT): forms-$(FORMSVERSION)$(PASEXT) x$(PPUEXT) xresource$(PPUEXT) xlib$(PPUEXT)\
  108. xutil$(PPUEXT)
  109. ln -sf forms-$(FORMSVERSION)$(PASEXT) forms$(PASEXT)
  110. $(COMPILER) forms$(PASEXT)
  111. #
  112. # $Log$
  113. # Revision 1.2 1999-07-16 13:45:36 peter
  114. # * 0.99.12b updates
  115. # * merges
  116. #
  117. # Revision 1.1 1999/05/12 00:11:25 michael
  118. # initial import
  119. #
  120. # Revision 1.1 1999/03/16 00:50:29 peter
  121. # + init
  122. #
  123. #