[fpc-devel] Adapting MakeFile to make subfolders for targets with sub architectures

Christo christo.crause at gmail.com
Mon Aug 6 07:32:30 CEST 2018


On Sat, 2018-07-28 at 22:48 +0200, Christo wrote:
> On Thu, 2018-07-26 at 22:19 +0200, Florian Klämpfl wrote:
> > 
> > 
> Well, I got also stuck on the fpmake problem :(
> 
> Yes, it appears to me that fpmkunit lack support for subarch & ABI at the moment, else it
> would
> have been easy to modify TPackage.GetUnitsOutputDir in a similar way.

A patch to implement the idea is available here: https://github.com/ccrause/fpc-avr/blob/master/
misc/fpc-subarch-abi-target/target-subarch-abi.patch

General approach: include subarch and (if applicable) ABI in target name.
* In fpcmake.ini 
  * add SUBARCH_ABI_SUFFIX variable
  * append SUBARCH_ABI_SUFFIX variable to FULLTARGET variable to form TARGET_SUFFIX variable
* In fpmkunit.pp:
  * add support for new command line options subarch and abi
  * include subarch and abi in MakeTargetString function
* In Makefile.fpc:
  * add --subarch and --abi options to FPC_TARGETOPT variable
  * remove -Cp%, -P%, -T% and -Ca% from FPCOPT variable

TODO - Update fpcmkcfg once approach is accepted.



More information about the fpc-devel mailing list