Makefile 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  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. clean: testfpcmake fpc_clean
  61. install: testfpcmake fpc_install
  62. info: testfpcmake fpc_info
  63. staticlib: testfpcmake fpc_staticlib
  64. sharedlib: testfpcmake fpc_sharedlib
  65. libsclean: testfpcmake fpc_libsclean
  66. staticinstall: testfpcmake fpc_staticinstall
  67. sharedinstall: testfpcmake fpc_sharedinstall
  68. libinstall: testfpcmake fpc_libinstall
  69. demo:
  70. $(MAKE) -C demo
  71. #####################################################################
  72. # Include default makefile
  73. #####################################################################
  74. # test if FPCMAKE is still valid
  75. ifdef FPCMAKE
  76. ifeq ($(strip $(wildcard $(FPCMAKE))),)
  77. FPCDIR=
  78. FPCMAKE=
  79. endif
  80. endif
  81. ifndef FPCDIR
  82. ifdef DEFAULTFPCDIR
  83. FPCDIR=$(DEFAULTFPCDIR)
  84. endif
  85. endif
  86. ifndef FPCMAKE
  87. ifdef FPCDIR
  88. FPCMAKE=$(FPCDIR)/makefile.fpc
  89. else
  90. FPCMAKE=makefile.fpc
  91. endif
  92. endif
  93. override FPCMAKE:=$(strip $(wildcard $(FPCMAKE)))
  94. ifeq ($(FPCMAKE),)
  95. testfpcmake:
  96. @echo makefile.fpc not found!
  97. @echo Check the FPCMAKE and FPCDIR environment variables.
  98. @exit
  99. else
  100. include $(FPCMAKE)
  101. testfpcmake:
  102. endif
  103. #####################################################################
  104. # Dependencies
  105. #####################################################################
  106. forms$(PPUEXT): forms-$(FORMSVERSION)$(PASEXT) x$(PPUEXT) xresource$(PPUEXT) xlib$(PPUEXT)\
  107. xutil$(PPUEXT)
  108. ln -sf forms-$(FORMSVERSION)$(PASEXT) forms$(PASEXT)
  109. $(COMPILER) forms$(PASEXT)
  110. #
  111. # $Log$
  112. # Revision 1.1 1999-05-12 00:11:25 michael
  113. # initial import
  114. #
  115. # Revision 1.1 1999/03/16 00:50:29 peter
  116. # + init
  117. #
  118. #