Makefile.fpc 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #
  2. # Makefile.fpc for FastCGI
  3. #
  4. [package]
  5. name=fastcgi
  6. version=2.5.1
  7. [require]
  8. packages=rtl fpmkunit
  9. [install]
  10. fpcpackage=y
  11. [default]
  12. fpcdir=../..
  13. [prerules]
  14. # If no fpmake exists and clean is called, do not try to build fpmake, it will
  15. # most often fail because the dependencies are cleared. So simply skip the
  16. # clean by replacing the command with 'echo'
  17. FPMAKE_BIN_CLEAN=$(wildcard .$(PATHSEP)fpmake$(SRCEXEEXT))
  18. ifeq ($(FPMAKE_BIN_CLEAN),)
  19. FPMAKE_BIN_CLEAN=$(ECHO)
  20. endif
  21. ifdef OS_TARGET
  22. FPC_TARGETOPT+=--os=$(OS_TARGET)
  23. endif
  24. ifdef CPU_TARGET
  25. FPC_TARGETOPT+=--cpu=$(CPU_TARGET)
  26. endif
  27. LOCALFPMAKE=.$(PATHSEP)fpmake$(SRCEXEEXT)
  28. [rules]
  29. fpmake: fpmake.pp
  30. $(FPCFPMAKE) fpmake.pp $(FPMAKE_SKIP_CONFIG) $(addprefix -Fu,$(COMPILER_FPMAKE_UNITDIR))
  31. all: fpmake
  32. $(LOCALFPMAKE) compile --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC)
  33. smart: fpmake
  34. $(LOCALFPMAKE) compile --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) -o "-XX -CX"
  35. release: fpmake
  36. $(LOCALFPMAKE) compile --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) -o "-dRELEASE"
  37. debug: fpmake
  38. $(LOCALFPMAKE) compile --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) -o "-dDEBUG"
  39. clean:
  40. $(FPMAKE_BIN_CLEAN) clean --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC)
  41. install: fpmake
  42. ifdef UNIXHier
  43. $(LOCALFPMAKE) install --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) --prefix=$(INSTALL_PREFIX)
  44. else
  45. $(LOCALFPMAKE) install --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) --prefix=$(INSTALL_BASEDIR)
  46. endif
  47. # Normally distinstall also installs the examples, but in this case there are
  48. # none.
  49. distinstall: install
  50. distclean: clean
  51. -$(DEL) $(LOCALFPMAKE)