Makefile.fpc 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. #
  2. # Makefile.fpc for running fpmake
  3. #
  4. [package]
  5. name=httpd13
  6. version=2.7.1
  7. [require]
  8. packages=rtl fpmkunit
  9. [install]
  10. fpcpackage=y
  11. [default]
  12. fpcdir=../..
  13. [prerules]
  14. FPMAKE_BIN_CLEAN=$(wildcard .$(PATHSEP)fpmake$(SRCEXEEXT))
  15. ifdef OS_TARGET
  16. FPC_TARGETOPT+=--os=$(OS_TARGET)
  17. endif
  18. ifdef CPU_TARGET
  19. FPC_TARGETOPT+=--cpu=$(CPU_TARGET)
  20. endif
  21. LOCALFPMAKE=.$(PATHSEP)fpmake$(SRCEXEEXT)
  22. [rules]
  23. .NOTPARALLEL:
  24. fpmake: fpmake.pp
  25. $(FPCFPMAKE) fpmake.pp $(FPMAKE_SKIP_CONFIG) $(addprefix -Fu,$(COMPILER_FPMAKE_UNITDIR)) $(FPCMAKEOPT)
  26. all: fpmake
  27. $(LOCALFPMAKE) compile --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) -bu
  28. smart: fpmake
  29. $(LOCALFPMAKE) compile --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) -bu -o -XX -o -CX
  30. release: fpmake
  31. $(LOCALFPMAKE) compile --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) -bu -o -dRELEASE
  32. debug: fpmake
  33. $(LOCALFPMAKE) compile --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) -bu -o -dDEBUG
  34. # If no fpmake exists and (dist)clean is called, do not try to build fpmake, it will
  35. # most often fail because the dependencies are cleared.
  36. # In case of a clean, simply do nothing
  37. ifeq ($(FPMAKE_BIN_CLEAN),)
  38. clean:
  39. else
  40. clean:
  41. $(FPMAKE_BIN_CLEAN) clean --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC)
  42. endif
  43. # In case of a distclean, perform an 'old'-style distclean. This to avoid problems
  44. # when the package is compiled using fpcmake prior to running this clean using fpmake
  45. ifeq ($(FPMAKE_BIN_CLEAN),)
  46. distclean: $(addsuffix _distclean,$(TARGET_DIRS)) fpc_cleanall
  47. else
  48. distclean:
  49. ifdef inUnix
  50. { $(FPMAKE_BIN_CLEAN) distclean --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC); if [ $$? != "0" ]; then { echo Something wrong with fpmake exectable. Remove the executable and call make recursively to recover.; $(DEL) $(FPMAKE_BIN_CLEAN); $(MAKE) fpc_cleanall; }; fi; }
  51. else
  52. $(FPMAKE_BIN_CLEAN) distclean --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC)
  53. endif
  54. -$(DEL) $(LOCALFPMAKE)
  55. endif
  56. install: fpmake
  57. ifdef UNIXHier
  58. $(LOCALFPMAKE) install --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR)
  59. else
  60. $(LOCALFPMAKE) install --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) --prefix=$(INSTALL_BASEDIR) --unitinstalldir=$(INSTALL_UNITDIR)
  61. endif
  62. # distinstall also installs the example-sources
  63. distinstall: fpmake
  64. ifdef UNIXHier
  65. $(LOCALFPMAKE) install --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR) -ie
  66. else
  67. $(LOCALFPMAKE) install --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) --prefix=$(INSTALL_BASEDIR) --unitinstalldir=$(INSTALL_UNITDIR) -ie
  68. endif