123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- #
- # Makefile.fpc for running fpmake
- #
- [package]
- name=fcl-process
- version=2.7.1
- [require]
- packages=rtl
- [install]
- fpcpackage=y
- [default]
- fpcdir=../..
- [prerules]
- FPMAKE_BIN_CLEAN=$(wildcard .$(PATHSEP)fpmake$(SRCEXEEXT))
- ifdef OS_TARGET
- FPC_TARGETOPT+=--os=$(OS_TARGET)
- endif
- ifdef CPU_TARGET
- FPC_TARGETOPT+=--cpu=$(CPU_TARGET)
- endif
- LOCALFPMAKE=.$(PATHSEP)fpmake$(SRCEXEEXT)
- # Adding a dependency on fpmkunit is not possbile due to an infinite loop. So
- # the fpmkunit-searchpath is added here:
- PACKAGEDIR_FPMKUNIT:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /fpmkunit/Makefile.fpc,$(PACKAGESDIR))))))
- ifneq ($(PACKAGEDIR_FPMKUNIT),)
- ifneq ($(wildcard $(PACKAGEDIR_FPMKUNIT)/units_bs/$(SOURCESUFFIX)),)
- UNITDIR_FPMAKE_FPMKUNIT=$(PACKAGEDIR_FPMKUNIT)/units_bs/$(SOURCESUFFIX)
- else
- UNITDIR_FPMAKE_FPMKUNIT=$(PACKAGEDIR_FPMKUNIT)
- endif
- ifdef CHECKDEPEND
- $(PACKAGEDIR_FPMKUNIT)/$(FPCMADE):
- $(MAKE) -C $(PACKAGEDIR_FPMKUNIT) $(FPCMADE)
- override ALLDEPENDENCIES+=$(PACKAGEDIR_FPMKUNIT)/$(FPCMADE)
- endif
- else
- PACKAGEDIR_FPMKUNIT=
- UNITDIR_FPMKUNIT:=$(subst /Package.fpc,,$(strip $(wildcard $(addsuffix /fpmkunit/Package.fpc,$(UNITSDIR)))))
- ifneq ($(UNITDIR_FPMKUNIT),)
- UNITDIR_FPMKUNIT:=$(firstword $(UNITDIR_FPMKUNIT))
- else
- UNITDIR_FPMKUNIT=
- endif
- endif
- ifdef UNITDIR_FPMAKE_FPMKUNIT
- override COMPILER_FPMAKE_UNITDIR+=$(UNITDIR_FPMAKE_FPMKUNIT)
- endif
- [rules]
- .NOTPARALLEL:
- fpmake: fpmake.pp
- $(FPCFPMAKE) fpmake.pp $(FPMAKE_SKIP_CONFIG) $(FPCOPT) $(addprefix -Fu,$(COMPILER_FPMAKE_UNITDIR)) $(FPCMAKEOPT)
- all: fpmake
- $(LOCALFPMAKE) compile --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) -bu
- smart: fpmake
- $(LOCALFPMAKE) compile --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) -bu -o -XX -o -CX
- release: fpmake
- $(LOCALFPMAKE) compile --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) -bu -o -dRELEASE
- debug: fpmake
- $(LOCALFPMAKE) compile --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) -bu -o -dDEBUG
- # If no fpmake exists and (dist)clean is called, do not try to build fpmake, it will
- # most often fail because the dependencies are cleared.
- # In case of a clean, simply do nothing
- ifeq ($(FPMAKE_BIN_CLEAN),)
- clean:
- else
- clean:
- $(FPMAKE_BIN_CLEAN) clean --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC)
- endif
- # In case of a distclean, perform an 'old'-style distclean. This to avoid problems
- # when the package is compiled using fpcmake prior to running this clean using fpmake
- ifeq ($(FPMAKE_BIN_CLEAN),)
- distclean: $(addsuffix _distclean,$(TARGET_DIRS)) fpc_cleanall
- else
- distclean:
- ifdef inUnix
- { $(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; }
- else
- $(FPMAKE_BIN_CLEAN) distclean --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC)
- endif
- -$(DEL) $(LOCALFPMAKE)
- endif
- install: fpmake
- ifdef UNIXHier
- $(LOCALFPMAKE) install --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR)
- else
- $(LOCALFPMAKE) install --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) --prefix=$(INSTALL_BASEDIR) --unitinstalldir=$(INSTALL_UNITDIR)
- endif
- # distinstall also installs the example-sources
- distinstall: fpmake
- ifdef UNIXHier
- $(LOCALFPMAKE) install --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR) -ie
- else
- $(LOCALFPMAKE) install --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) --prefix=$(INSTALL_BASEDIR) --unitinstalldir=$(INSTALL_UNITDIR) -ie
- endif
|