mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-22 21:51:44 +02:00
* packages
* lot of other changes
This commit is contained in:
parent
2719fb91e8
commit
392c44c739
@ -1,7 +1,7 @@
|
|||||||
{$ifdef Delphi}
|
{$ifdef Delphi}
|
||||||
const fpcmakeini : array[0..93] of string[240]=(
|
const fpcmakeini : array[0..99] of string[240]=(
|
||||||
{$else Delphi}
|
{$else Delphi}
|
||||||
const fpcmakeini : array[0..93,1..240] of char=(
|
const fpcmakeini : array[0..99,1..240] of char=(
|
||||||
{$endif Delphi}
|
{$endif Delphi}
|
||||||
';'#010+
|
';'#010+
|
||||||
'; $Id$'#010+
|
'; $Id$'#010+
|
||||||
@ -320,19 +320,23 @@ const fpcmakeini : array[0..93,1..240] of char=(
|
|||||||
'override ','FPCOPT+=-FU$(UNITTARGETDIR)'#010+
|
'override ','FPCOPT+=-FU$(UNITTARGETDIR)'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
#010+
|
#010+
|
||||||
'[command_smartlink]'#010+
|
'[command_end]'#010+
|
||||||
'# Smartlinking'#010+
|
'# Smartlinking'#010+
|
||||||
'ifdef SMARTLINK'#010+
|
'ifdef SMARTLINK'#010+
|
||||||
'override FPCOPT+=-CX'#010+
|
'override FPCOPT+=-CX'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
#010+
|
#010+
|
||||||
'[command_end]'#010+
|
'# Debug'#010+
|
||||||
|
'ifdef DEBUG'#010+
|
||||||
|
'override FPCOPT+=-g'#010+
|
||||||
|
'endif'#010+
|
||||||
|
#010+
|
||||||
'# Add commandline options'#010+
|
'# Add commandline options'#010+
|
||||||
'ifdef OPT'#010+
|
'ifdef OPT'#010+
|
||||||
'override FPCOPT+=$(OPT)'#010+
|
'override FPCOPT+=$(OPT)'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
'ifdef UNITDIR'#010+
|
'ifdef UNITDIR'#010+
|
||||||
'override FPCOPT+=$(addprefix -Fu',',$(UNITDIR))'#010+
|
'overr','ide FPCOPT+=$(addprefix -Fu,$(UNITDIR))'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
'ifdef LIBDIR'#010+
|
'ifdef LIBDIR'#010+
|
||||||
'override FPCOPT+=$(addprefix -Fl,$(LIBDIR))'#010+
|
'override FPCOPT+=$(addprefix -Fl,$(LIBDIR))'#010+
|
||||||
@ -344,7 +348,7 @@ const fpcmakeini : array[0..93,1..240] of char=(
|
|||||||
'override FPCOPT+=$(addprefix -Fi,$(INCDIR))'#010+
|
'override FPCOPT+=$(addprefix -Fi,$(INCDIR))'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
#010+
|
#010+
|
||||||
'# Add defines from FPCOPTDEF to',' FPCOPT'#010+
|
'# Ad','d defines from FPCOPTDEF to FPCOPT'#010+
|
||||||
'ifdef FPCOPTDEF'#010+
|
'ifdef FPCOPTDEF'#010+
|
||||||
'override FPCOPT+=$(FPCOPTDEF)'#010+
|
'override FPCOPT+=$(FPCOPTDEF)'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
@ -358,7 +362,7 @@ const fpcmakeini : array[0..93,1..240] of char=(
|
|||||||
#010+
|
#010+
|
||||||
#010+
|
#010+
|
||||||
'[shelltools]'#010+
|
'[shelltools]'#010+
|
||||||
'###############################################','#####################'+
|
'####################','################################################'+
|
||||||
'#'#010+
|
'#'#010+
|
||||||
'# Shell tools'#010+
|
'# Shell tools'#010+
|
||||||
'#####################################################################'#010+
|
'#####################################################################'#010+
|
||||||
@ -370,10 +374,10 @@ const fpcmakeini : array[0..93,1..240] of char=(
|
|||||||
#010+
|
#010+
|
||||||
'# To move pograms'#010+
|
'# To move pograms'#010+
|
||||||
'ifndef MOVE'#010+
|
'ifndef MOVE'#010+
|
||||||
'export MOVE:=mv -f'#010+
|
'export MOVE:=mv -f',#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
#010+
|
#010+
|
||||||
'# Check delete prog','ram'#010+
|
'# Check delete program'#010+
|
||||||
'ifndef DEL'#010+
|
'ifndef DEL'#010+
|
||||||
'export DEL:=rm -f'#010+
|
'export DEL:=rm -f'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
@ -388,11 +392,11 @@ const fpcmakeini : array[0..93,1..240] of char=(
|
|||||||
'ifdef inlinux'#010+
|
'ifdef inlinux'#010+
|
||||||
'export INSTALL:=install -m 644'#010+
|
'export INSTALL:=install -m 644'#010+
|
||||||
'else'#010+
|
'else'#010+
|
||||||
'export INSTALL:=$(COPY)'#010+
|
'export INSTALL:=$(CO','PY)'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
#010+
|
#010+
|
||||||
'# To insta','ll programs'#010+
|
'# To install programs'#010+
|
||||||
'ifndef INSTALLEXE'#010+
|
'ifndef INSTALLEXE'#010+
|
||||||
'ifdef inlinux'#010+
|
'ifdef inlinux'#010+
|
||||||
'export INSTALLEXE:=install -m 755'#010+
|
'export INSTALLEXE:=install -m 755'#010+
|
||||||
@ -406,7 +410,7 @@ const fpcmakeini : array[0..93,1..240] of char=(
|
|||||||
'ifdef inlinux'#010+
|
'ifdef inlinux'#010+
|
||||||
'export MKDIR:=install -m 755 -d'#010+
|
'export MKDIR:=install -m 755 -d'#010+
|
||||||
'else'#010+
|
'else'#010+
|
||||||
'export MKDIR:=ginstall -m 755 ','-d'#010+
|
'exp','ort MKDIR:=ginstall -m 755 -d'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
#010+
|
#010+
|
||||||
@ -416,8 +420,8 @@ const fpcmakeini : array[0..93,1..240] of char=(
|
|||||||
'# Default Tools'#010+
|
'# Default Tools'#010+
|
||||||
'#####################################################################'#010+
|
'#####################################################################'#010+
|
||||||
#010+
|
#010+
|
||||||
'# assembler, redefine it if cross compiling'#010+
|
'# assembler, redefine it',' if cross compiling'#010+
|
||||||
'ifndef ','AS'#010+
|
'ifndef AS'#010+
|
||||||
'AS=as'#010+
|
'AS=as'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
#010+
|
#010+
|
||||||
@ -437,8 +441,8 @@ const fpcmakeini : array[0..93,1..240] of char=(
|
|||||||
'endif'#010+
|
'endif'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
#010+
|
#010+
|
||||||
'# also call ppas if with command option -s'#010+
|
'# also call ppas if with comman','d option -s'#010+
|
||||||
'ifeq (,$(findst','ring -s ,$(COMPILER)))'#010+
|
'ifeq (,$(findstring -s ,$(COMPILER)))'#010+
|
||||||
'EXECPPAS='#010+
|
'EXECPPAS='#010+
|
||||||
'else'#010+
|
'else'#010+
|
||||||
'EXECPPAS=@$(PPAS)'#010+
|
'EXECPPAS=@$(PPAS)'#010+
|
||||||
@ -453,8 +457,9 @@ const fpcmakeini : array[0..93,1..240] of char=(
|
|||||||
#010+
|
#010+
|
||||||
'# echo'#010+
|
'# echo'#010+
|
||||||
'ifndef ECHO'#010+
|
'ifndef ECHO'#010+
|
||||||
'ECHO:=$(strip $(wildcard $(addsuffix /echo$(EXEEXT),$(SEARCHPATH))))'#010+
|
'ECHO:=$(strip $(wildcard $(addsuffix /echo$(E','XEEXT),$(SEARCHPATH))))'+
|
||||||
'ife','q ($(ECHO),)'#010+
|
#010+
|
||||||
|
'ifeq ($(ECHO),)'#010+
|
||||||
'export ECHO:=echo'#010+
|
'export ECHO:=echo'#010+
|
||||||
'else'#010+
|
'else'#010+
|
||||||
'export ECHO:=$(firstword $(ECHO))'#010+
|
'export ECHO:=$(firstword $(ECHO))'#010+
|
||||||
@ -468,9 +473,9 @@ const fpcmakeini : array[0..93,1..240] of char=(
|
|||||||
'PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))'+
|
'PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))'+
|
||||||
#010+
|
#010+
|
||||||
'ifeq ($(PPDEP),)'#010+
|
'ifeq ($(PPDEP),)'#010+
|
||||||
'PPDEP='#010+
|
'PPDEP='#010,
|
||||||
'else'#010+
|
'else'#010+
|
||||||
'export PPDEP:=$(firstw','ord $(PPDEP))'#010+
|
'export PPDEP:=$(firstword $(PPDEP))'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
#010+
|
#010+
|
||||||
@ -482,11 +487,11 @@ const fpcmakeini : array[0..93,1..240] of char=(
|
|||||||
'ifeq ($(PPUMOVE),)'#010+
|
'ifeq ($(PPUMOVE),)'#010+
|
||||||
'PPUMOVE='#010+
|
'PPUMOVE='#010+
|
||||||
'else'#010+
|
'else'#010+
|
||||||
'export PPUMOVE:=$(firstword $(PPUMOVE))'#010+
|
'export PPUMOVE:=$(firstword $(PPUMOVE)',')'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
#010+
|
#010+
|
||||||
'[tool_ppufil','es]'#010+
|
'[tool_ppufiles]'#010+
|
||||||
'# ppufiles'#010+
|
'# ppufiles'#010+
|
||||||
'ifndef PPUFILES'#010+
|
'ifndef PPUFILES'#010+
|
||||||
'PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPA'+
|
'PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPA'+
|
||||||
@ -498,9 +503,9 @@ const fpcmakeini : array[0..93,1..240] of char=(
|
|||||||
'endif'#010+
|
'endif'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
#010+
|
#010+
|
||||||
'[tool_data2inc]'#010+
|
'[tool_data2inc]',#010+
|
||||||
'# data2inc'#010+
|
'# data2inc'#010+
|
||||||
'ifndef DATA2INC',#010+
|
'ifndef DATA2INC'#010+
|
||||||
'DATA2INC:=$(strip $(wildcard $(addsuffix /data2inc$(EXEEXT),$(SEARCHPA'+
|
'DATA2INC:=$(strip $(wildcard $(addsuffix /data2inc$(EXEEXT),$(SEARCHPA'+
|
||||||
'TH))))'#010+
|
'TH))))'#010+
|
||||||
'ifeq ($(DATA2INC),)'#010+
|
'ifeq ($(DATA2INC),)'#010+
|
||||||
@ -513,7 +518,7 @@ const fpcmakeini : array[0..93,1..240] of char=(
|
|||||||
'[tool_diff]'#010+
|
'[tool_diff]'#010+
|
||||||
'# diff'#010+
|
'# diff'#010+
|
||||||
'ifndef DIFF'#010+
|
'ifndef DIFF'#010+
|
||||||
'DIFF:=$(strip $(wildcard $(addsuffix /dif','f$(EXEEXT),$(SEARCHPATH))))'+
|
'DIFF:=$(strip ','$(wildcard $(addsuffix /diff$(EXEEXT),$(SEARCHPATH))))'+
|
||||||
#010+
|
#010+
|
||||||
'ifeq ($(DIFF),)'#010+
|
'ifeq ($(DIFF),)'#010+
|
||||||
'DIFF='#010+
|
'DIFF='#010+
|
||||||
@ -527,9 +532,9 @@ const fpcmakeini : array[0..93,1..240] of char=(
|
|||||||
'ifndef CMP'#010+
|
'ifndef CMP'#010+
|
||||||
'CMP:=$(strip $(wildcard $(addsuffix /cmp$(EXEEXT),$(SEARCHPATH))))'#010+
|
'CMP:=$(strip $(wildcard $(addsuffix /cmp$(EXEEXT),$(SEARCHPATH))))'#010+
|
||||||
'ifeq ($(CMP),)'#010+
|
'ifeq ($(CMP),)'#010+
|
||||||
'CMP='#010+
|
'C','MP='#010+
|
||||||
'else'#010+
|
'else'#010+
|
||||||
'export CMP:=$(firs','tword $(CMP))'#010+
|
'export CMP:=$(firstword $(CMP))'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
#010+
|
#010+
|
||||||
@ -545,7 +550,7 @@ const fpcmakeini : array[0..93,1..240] of char=(
|
|||||||
'endif'#010+
|
'endif'#010+
|
||||||
#010+
|
#010+
|
||||||
'[tool_upx]'#010+
|
'[tool_upx]'#010+
|
||||||
'# Look if UPX is found for go32v2 and',' win32. We can'#039't use $UPX b'+
|
'# Look if ','UPX is found for go32v2 and win32. We can'#039't use $UPX b'+
|
||||||
'ecuase'#010+
|
'ecuase'#010+
|
||||||
'# upx uses that one itself (PFV)'#010+
|
'# upx uses that one itself (PFV)'#010+
|
||||||
'ifndef UPXPROG'#010+
|
'ifndef UPXPROG'#010+
|
||||||
@ -556,7 +561,7 @@ const fpcmakeini : array[0..93,1..240] of char=(
|
|||||||
'UPXPROG:=1'#010+
|
'UPXPROG:=1'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
'ifdef UPXPROG'#010+
|
'ifdef UPXPROG'#010+
|
||||||
'UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(EXEEXT),$(S','EARCHPATH))'+
|
'UPXPROG:=$(strip $(wildcard $(','addsuffix /upx$(EXEEXT),$(SEARCHPATH))'+
|
||||||
'))'#010+
|
'))'#010+
|
||||||
'ifeq ($(UPXPROG),)'#010+
|
'ifeq ($(UPXPROG),)'#010+
|
||||||
'UPXPROG='#010+
|
'UPXPROG='#010+
|
||||||
@ -571,8 +576,9 @@ const fpcmakeini : array[0..93,1..240] of char=(
|
|||||||
'[tool_date]'#010+
|
'[tool_date]'#010+
|
||||||
'# gdate/date'#010+
|
'# gdate/date'#010+
|
||||||
'ifndef DATE'#010+
|
'ifndef DATE'#010+
|
||||||
'DATE:=$(strip $(wildcard $(addsuffix /date$(EXEEXT),$(SEARCHPATH))))'#010+
|
'DATE:=$(strip $(wildcard $(addsuffix /date$(EXEEXT),$(SE','ARCHPATH))))'+
|
||||||
'ifeq ($(DATE),',')'#010+
|
#010+
|
||||||
|
'ifeq ($(DATE),)'#010+
|
||||||
'DATE:=$(strip $(wildcard $(addsuffix /gdate$(EXEEXT),$(SEACHPATH))))'#010+
|
'DATE:=$(strip $(wildcard $(addsuffix /gdate$(EXEEXT),$(SEACHPATH))))'#010+
|
||||||
'ifeq ($(DATE),)'#010+
|
'ifeq ($(DATE),)'#010+
|
||||||
'DATE='#010+
|
'DATE='#010+
|
||||||
@ -585,8 +591,8 @@ const fpcmakeini : array[0..93,1..240] of char=(
|
|||||||
'endif'#010+
|
'endif'#010+
|
||||||
#010+
|
#010+
|
||||||
'ifdef DATE'#010+
|
'ifdef DATE'#010+
|
||||||
'DATESTR:=$(shell $(DATE) +%Y%m%d)'#010+
|
'DATESTR:=$(s','hell $(DATE) +%Y%m%d)'#010+
|
||||||
'else'#010,
|
'else'#010+
|
||||||
'DATESTR='#010+
|
'DATESTR='#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
#010+
|
#010+
|
||||||
@ -598,7 +604,7 @@ const fpcmakeini : array[0..93,1..240] of char=(
|
|||||||
'ifeq ($(ZIPPROG),)'#010+
|
'ifeq ($(ZIPPROG),)'#010+
|
||||||
'ZIPPROG='#010+
|
'ZIPPROG='#010+
|
||||||
'else'#010+
|
'else'#010+
|
||||||
'export ZIPPROG:=$(firstword $(ZIPPROG)) -D9',' -r'#010+
|
'export ZIPPROG:=','$(firstword $(ZIPPROG)) -D9 -r'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
#010+
|
#010+
|
||||||
@ -610,9 +616,10 @@ const fpcmakeini : array[0..93,1..240] of char=(
|
|||||||
'[extensions]'#010+
|
'[extensions]'#010+
|
||||||
'#####################################################################'#010+
|
'#####################################################################'#010+
|
||||||
'# Default extensions'#010+
|
'# Default extensions'#010+
|
||||||
'#####################################################################'#010+
|
'##########################################################','##########'+
|
||||||
|
'#'#010+
|
||||||
#010+
|
#010+
|
||||||
'# Default need','ed extensions (Go32v2,Linux)'#010+
|
'# Default needed extensions (Go32v2,Linux)'#010+
|
||||||
'LOADEREXT=.as'#010+
|
'LOADEREXT=.as'#010+
|
||||||
'PPLEXT=.ppl'#010+
|
'PPLEXT=.ppl'#010+
|
||||||
'PPUEXT=.ppu'#010+
|
'PPUEXT=.ppu'#010+
|
||||||
@ -627,9 +634,9 @@ const fpcmakeini : array[0..93,1..240] of char=(
|
|||||||
'ifeq ($(OS_TARGET),go32v1)'#010+
|
'ifeq ($(OS_TARGET),go32v1)'#010+
|
||||||
'PPUEXT=.pp1'#010+
|
'PPUEXT=.pp1'#010+
|
||||||
'OEXT=.o1'#010+
|
'OEXT=.o1'#010+
|
||||||
'ASMEXT=.s1'#010+
|
'ASMEXT=.s','1'#010+
|
||||||
'SMARTEXT=.sl1'#010+
|
'SMARTEXT=.sl1'#010+
|
||||||
'STATICLIBEX','T=.a1'#010+
|
'STATICLIBEXT=.a1'#010+
|
||||||
'SHAREDLIBEXT=.so1'#010+
|
'SHAREDLIBEXT=.so1'#010+
|
||||||
'PACKAGESUFFIX=v1'#010+
|
'PACKAGESUFFIX=v1'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
@ -646,10 +653,10 @@ const fpcmakeini : array[0..93,1..240] of char=(
|
|||||||
#010+
|
#010+
|
||||||
'# Win32'#010+
|
'# Win32'#010+
|
||||||
'ifeq ($(OS_TARGET),win32)'#010+
|
'ifeq ($(OS_TARGET),win32)'#010+
|
||||||
'PPUEXT=.ppw'#010+
|
'PPUEXT=.','ppw'#010+
|
||||||
'OEXT=.ow'#010+
|
'OEXT=.ow'#010+
|
||||||
'ASMEXT=.sw'#010+
|
'ASMEXT=.sw'#010+
|
||||||
'SMA','RTEXT=.slw'#010+
|
'SMARTEXT=.slw'#010+
|
||||||
'STATICLIBEXT=.aw'#010+
|
'STATICLIBEXT=.aw'#010+
|
||||||
'SHAREDLIBEXT=.dll'#010+
|
'SHAREDLIBEXT=.dll'#010+
|
||||||
'PACKAGESUFFIX=win32'#010+
|
'PACKAGESUFFIX=win32'#010+
|
||||||
@ -666,8 +673,8 @@ const fpcmakeini : array[0..93,1..240] of char=(
|
|||||||
'PACKAGESUFFIX=os2'#010+
|
'PACKAGESUFFIX=os2'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
#010+
|
#010+
|
||||||
'# library prefix'#010+
|
'#',' library prefix'#010+
|
||||||
'LIBPREFIX=l','ib'#010+
|
'LIBPREFIX=lib'#010+
|
||||||
'ifeq ($(OS_TARGET),go32v2)'#010+
|
'ifeq ($(OS_TARGET),go32v2)'#010+
|
||||||
'LIBPREFIX='#010+
|
'LIBPREFIX='#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
@ -678,8 +685,8 @@ const fpcmakeini : array[0..93,1..240] of char=(
|
|||||||
'# determine which .pas extension is used'#010+
|
'# determine which .pas extension is used'#010+
|
||||||
'ifndef PASEXT'#010+
|
'ifndef PASEXT'#010+
|
||||||
'ifdef EXEOBJECTS'#010+
|
'ifdef EXEOBJECTS'#010+
|
||||||
'override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(EX'+
|
'override TESTPAS:=$(strip $(wildcard $(addsuffix ','.pas,$(firstword $('+
|
||||||
'EOBJEC','TS)))))'#010+
|
'EXEOBJECTS)))))'#010+
|
||||||
'else'#010+
|
'else'#010+
|
||||||
'override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(UN'+
|
'override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(UN'+
|
||||||
'ITOBJECTS)))))'#010+
|
'ITOBJECTS)))))'#010+
|
||||||
@ -693,52 +700,118 @@ const fpcmakeini : array[0..93,1..240] of char=(
|
|||||||
#010+
|
#010+
|
||||||
#010+
|
#010+
|
||||||
'[defaultrules]'#010+
|
'[defaultrules]'#010+
|
||||||
'############################################################','########'+
|
'#################################','###################################'+
|
||||||
'#'#010+
|
'#'#010+
|
||||||
'# Default rules'#010+
|
'# Default rules'#010+
|
||||||
'#####################################################################'#010+
|
'#####################################################################'#010+
|
||||||
#010+
|
#010+
|
||||||
'.PHONY: defaultrule all smart shared \'#010+
|
'.PHONY: defaultrule all debug examples test smart shared \'#010+
|
||||||
' showinstall install zipinstall zipinstalladd \'#010+
|
' showinstall install zipinstall zipinstalladd \'#010+
|
||||||
' clean cleanall depend info'#010+
|
' ',' clean cleanall depend info'#010+
|
||||||
#010+
|
#010+
|
||||||
#010+
|
#010+
|
||||||
'[compilerule','s]'#010+
|
'[loaderrules]'#010+
|
||||||
'#####################################################################'#010+
|
'#####################################################################'#010+
|
||||||
'# General compile rules'#010+
|
'# Loaders'#010+
|
||||||
'#####################################################################'#010+
|
'#####################################################################'#010+
|
||||||
#010+
|
#010+
|
||||||
'.PHONY: fpc_all fpc_units fpc_exes fpc_loaders'#010+
|
'.PHONY: fpc_loaders'#010+
|
||||||
#010+
|
#010+
|
||||||
'# Create Filenames'#010+
|
'%$(OEXT): %$(LOADER','EXT)'#010+
|
||||||
'ifdef',' LOADEROBJECTS'#010+
|
' $(AS) -o $*$(OEXT) $<'#010+
|
||||||
'LOADEROFILES=$(addsuffix $(OEXT),$(LOADEROBJECTS))'#010+
|
|
||||||
'endif'#010+
|
|
||||||
'ifdef EXEOBJECTS'#010+
|
|
||||||
'EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS))'#010+
|
|
||||||
'EXEOFILES=$(addsuffix $(OEXT),$(EXEOBJECTS))'#010+
|
|
||||||
'endif'#010+
|
|
||||||
'ifdef UNITOBJECTS'#010+
|
|
||||||
'UNITPPUFILES=$(addsuffix $(PPUEXT),$','(UNITOBJECTS))'#010+
|
|
||||||
'endif'#010+
|
|
||||||
#010+
|
#010+
|
||||||
'.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp'#010+
|
'override ALLTARGET+=fpc_loaders'#010+
|
||||||
|
'override CLEANTARGET+=fpc_loaders_clean'#010+
|
||||||
|
'override SHOWINSTALLTARGET+=fpc_loaders_showinstall'#010+
|
||||||
|
'override INSTALLTARGET+=fpc_loaders_install'#010+
|
||||||
#010+
|
#010+
|
||||||
'ifdef DEFAULTUNITS'#010+
|
'LOADEROFILES=$(addsuffix $(OEXT),$(','LOADEROBJECTS))'#010+
|
||||||
'fpc_all: fpc_loaders fpc_units'#010+
|
|
||||||
'else'#010+
|
|
||||||
'fpc_all: fpc_loaders fpc_units fpc_exes'#010+
|
|
||||||
'endif'#010+
|
|
||||||
#010+
|
#010+
|
||||||
'fpc_loaders: $(LOADEROFILES)'#010+
|
'fpc_loaders: $(LOADEROFILES)'#010+
|
||||||
#010+
|
#010+
|
||||||
|
'fpc_loaders_clean:'#010+
|
||||||
|
' -$(DEL) $(LOADEROFILES)'#010+
|
||||||
|
#010+
|
||||||
|
'fpc_loaders_showinstall:'#010+
|
||||||
|
' @$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(LOADEROFILES))'#010+
|
||||||
|
#010+
|
||||||
|
'fpc_loaders_install:'#010+
|
||||||
|
' $(MKDIR) $(UNITIN','STALLDIR)'#010+
|
||||||
|
' $(INSTALL) $(LOADEROFILES) $(UNITINSTALLDIR)'#010+
|
||||||
|
#010+
|
||||||
|
#010+
|
||||||
|
'[unitrules]'#010+
|
||||||
|
'#####################################################################'#010+
|
||||||
|
'# Units'#010+
|
||||||
|
'#####################################################################'#010+
|
||||||
|
#010+
|
||||||
|
'.PHONY: fpc_un','its'#010+
|
||||||
|
#010+
|
||||||
|
'override ALLTARGET+=fpc_units'#010+
|
||||||
|
#010+
|
||||||
|
'UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))'#010+
|
||||||
|
'override INSTALLPPUFILES+=$(UNITPPUFILES)'#010+
|
||||||
|
'override CLEANPPUFILES+=$(UNITPPUFILES)'#010+
|
||||||
|
#010+
|
||||||
'fpc_units: $(UNITPPUFILES)'#010+
|
'fpc_units: $(UNITPPUFILES)'#010+
|
||||||
#010+
|
#010+
|
||||||
'fpc_exes:',' $(EXEFILES)'#010+
|
#010+
|
||||||
|
#010+
|
||||||
|
'[exerules]'#010+
|
||||||
|
'#############################','#######################################'+
|
||||||
|
'#'#010+
|
||||||
|
'# Exes'#010+
|
||||||
|
'#####################################################################'#010+
|
||||||
|
#010+
|
||||||
|
'.PHONY: fpc_exes'#010+
|
||||||
|
#010+
|
||||||
|
'EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS))'#010+
|
||||||
|
'EXEOFILES=$(addsuffix $(OEXT),$(EXEOBJECTS))'#010+
|
||||||
|
#010+
|
||||||
|
'override AL','LTARGET+=fpc_exes'#010+
|
||||||
|
'override INSTALLEXEFILES+=$(EXEFILES)'#010+
|
||||||
|
'override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)'#010+
|
||||||
|
#010+
|
||||||
|
'fpc_exes: $(EXEFILES)'#010+
|
||||||
|
#010+
|
||||||
|
#010+
|
||||||
|
'[examplerules]'#010+
|
||||||
|
'#####################################################################'#010+
|
||||||
|
'# Examples'#010+
|
||||||
|
'##############','######################################################'+
|
||||||
|
'#'#010+
|
||||||
|
#010+
|
||||||
|
'.PHONY: fpc_examples fpc_test'#010+
|
||||||
|
#010+
|
||||||
|
'EXAMPLEFILES=$(addsuffix $(EXEEXT),$(EXAMPLEOBJECTS))'#010+
|
||||||
|
'EXAMPLEOFILES=$(addsuffix $(OEXT),$(EXAMPLEOBJECTS))'#010+
|
||||||
|
#010+
|
||||||
|
'override CLEANEXEFILES+=$(EXAMPLEFILES) $(EX','AMPLEOFILES)'#010+
|
||||||
|
#010+
|
||||||
|
'fpc_examples: all $(EXAMPLEFILES)'#010+
|
||||||
|
#010+
|
||||||
|
'fpc_test: examples'#010+
|
||||||
|
#010+
|
||||||
|
#010+
|
||||||
|
'[compilerules]'#010+
|
||||||
|
'#####################################################################'#010+
|
||||||
|
'# General compile rules'#010+
|
||||||
|
'#############################################################','#######'+
|
||||||
|
'#'#010+
|
||||||
|
#010+
|
||||||
|
'.PHONY: fpc_all fpc_debug'#010+
|
||||||
|
#010+
|
||||||
|
'fpc_all: $(ALLTARGET)'#010+
|
||||||
|
#010+
|
||||||
|
'fpc_debug:'#010+
|
||||||
|
' $(MAKE) all DEBUG=1'#010+
|
||||||
#010+
|
#010+
|
||||||
'# General compile rules, available for both possible PASEXT'#010+
|
'# General compile rules, available for both possible PASEXT'#010+
|
||||||
|
#010+
|
||||||
|
'.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp'#010+
|
||||||
|
#010+
|
||||||
'%$(PPUEXT): %.pp'#010+
|
'%$(PPUEXT): %.pp'#010+
|
||||||
' $(COMPILER) $< $(REDIR)'#010+
|
' $(COM','PILER) $< $(REDIR)'#010+
|
||||||
' $(EXECPASS)'#010+
|
' $(EXECPASS)'#010+
|
||||||
#010+
|
#010+
|
||||||
'%$(PPUEXT): %.pas'#010+
|
'%$(PPUEXT): %.pas'#010+
|
||||||
@ -746,29 +819,25 @@ const fpcmakeini : array[0..93,1..240] of char=(
|
|||||||
' $(EXECPASS)'#010+
|
' $(EXECPASS)'#010+
|
||||||
#010+
|
#010+
|
||||||
'%$(EXEEXT): %.pp'#010+
|
'%$(EXEEXT): %.pp'#010+
|
||||||
' ','$(COMPILER) $< $(REDIR)'#010+
|
' $(COMPILER) $< $(REDIR)'#010+
|
||||||
' $(EXECPASS)'#010+
|
' $(EXECPASS)'#010+
|
||||||
#010+
|
#010+
|
||||||
'%$(EXEEXT): %.pas'#010+
|
'%$(EXEEXT): %.pas'#010+
|
||||||
' $(COMPILER) $< $(REDIR)'#010+
|
' $(COMPILER) $< $(REDIR)'#010+
|
||||||
' $(EXECPASS)'#010+
|
' $','(EXECPASS)'#010+
|
||||||
#010+
|
|
||||||
'%$(OEXT): %$(LOADEREXT)'#010+
|
|
||||||
' $(AS) -o $*$(OEXT) $<'#010+
|
|
||||||
#010+
|
#010+
|
||||||
#010+
|
#010+
|
||||||
'[libraryrules]'#010+
|
'[libraryrules]'#010+
|
||||||
'#####################################################','###############'+
|
'#####################################################################'#010+
|
||||||
'#'#010+
|
|
||||||
'# Library'#010+
|
'# Library'#010+
|
||||||
'#####################################################################'#010+
|
'#####################################################################'#010+
|
||||||
#010+
|
#010+
|
||||||
'.PHONY: fpc_smart fpc_shared'#010+
|
'.PHONY: fpc_smart fpc_shared'#010+
|
||||||
#010+
|
#010+
|
||||||
'# Default sharedlib units are all unit objects'#010+
|
'# Default sharedlib units are a','ll unit objects'#010+
|
||||||
'ifndef SHAREDLIBUNITOBJECTS'#010+
|
'ifndef SHAREDLIBUNITOBJECTS'#010+
|
||||||
'SHAREDLIBUNITOBJECTS=$(UNITOBJECTS)'#010+
|
'SHAREDLIBUNITOBJECTS=$(UNITOBJECTS)'#010+
|
||||||
'e','ndif'#010+
|
'endif'#010+
|
||||||
#010+
|
#010+
|
||||||
'fpc_smart:'#010+
|
'fpc_smart:'#010+
|
||||||
' $(MAKE) all SMARTLINK=1'#010+
|
' $(MAKE) all SMARTLINK=1'#010+
|
||||||
@ -778,23 +847,21 @@ const fpcmakeini : array[0..93,1..240] of char=(
|
|||||||
'ifndef LIBNAME'#010+
|
'ifndef LIBNAME'#010+
|
||||||
' @$(ECHO) LIBNAME not set'#010+
|
' @$(ECHO) LIBNAME not set'#010+
|
||||||
'else'#010+
|
'else'#010+
|
||||||
' $(PPUMOVE) $(SHAREDLIBUNITOBJECTS) -o$(LIBNAME)'#010+
|
' $(PPUMOVE) $(SHARE','DLIBUNITOBJECTS) -o$(LIBNAME)'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
'else'#010+
|
'else'#010+
|
||||||
' @$(ECHO) Shared Libraries not su','pported'#010+
|
' @$(ECHO) Shared Libraries not supported'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
#010+
|
#010+
|
||||||
#010+
|
#010+
|
||||||
'[installrules]'#010+
|
'[installrules]'#010+
|
||||||
'#####################################################################'#010+
|
'#####################################################################'#010+
|
||||||
'# Install rules'#010+
|
'# Install rules'#010+
|
||||||
'#####################################################################'#010+
|
'##########################################','##########################'+
|
||||||
|
'#'#010+
|
||||||
#010+
|
#010+
|
||||||
'.PHONY: fpc_showinstall fpc_install'#010+
|
'.PHONY: fpc_showinstall fpc_install'#010+
|
||||||
#010+
|
#010+
|
||||||
'ifdef UNITPPUFI','LES'#010+
|
|
||||||
'override INSTALLPPUFILES:=$(UNITPPUFILES)'#010+
|
|
||||||
'endif'#010+
|
|
||||||
'ifdef EXTRAINSTALLUNITS'#010+
|
'ifdef EXTRAINSTALLUNITS'#010+
|
||||||
'override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))'#010+
|
'override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
@ -802,7 +869,7 @@ const fpcmakeini : array[0..93,1..240] of char=(
|
|||||||
'ifdef INSTALLPPUFILES'#010+
|
'ifdef INSTALLPPUFILES'#010+
|
||||||
'ifdef PPUFILES'#010+
|
'ifdef PPUFILES'#010+
|
||||||
'ifdef inlinux'#010+
|
'ifdef inlinux'#010+
|
||||||
'INSTALLPPULINKFILES=$(shell $(PPUFIL','ES) -S -O $(INSTALLPPUFILES))'#010+
|
'INSTALLPPULINKFILES=$(','shell $(PPUFILES) -S -O $(INSTALLPPUFILES))'#010+
|
||||||
'INSTALLPPULIBFILES=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))'#010+
|
'INSTALLPPULIBFILES=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))'#010+
|
||||||
'else'#010+
|
'else'#010+
|
||||||
'INSTALLPPULINKFILES=$(shell $(PPUFILES) $(INSTALLPPUFILES))'#010+
|
'INSTALLPPULINKFILES=$(shell $(PPUFILES) $(INSTALLPPUFILES))'#010+
|
||||||
@ -810,63 +877,53 @@ const fpcmakeini : array[0..93,1..240] of char=(
|
|||||||
'endif'#010+
|
'endif'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
#010+
|
#010+
|
||||||
'fpc_showinstall:'#010+
|
'fpc_showinstall: $(SHOWINSTALLTARGET)'#010+
|
||||||
'ifndef DEFAULTUNITS'#010+
|
'ifdef INSTAL','LEXEFILES'#010+
|
||||||
'ifdef EXEOBJECTS'#010+
|
' @$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))'+
|
||||||
' @$','(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(EXEFILES))'#010+
|
#010+
|
||||||
'endif'#010+
|
|
||||||
'endif'#010+
|
|
||||||
'ifdef LOADEROBJECTS'#010+
|
|
||||||
' @$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(LOADEROFILES))'#010+
|
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
'ifdef INSTALLPPUFILES'#010+
|
'ifdef INSTALLPPUFILES'#010+
|
||||||
' @$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INS','TALLPPUFILE'+
|
' @$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES)'+
|
||||||
'S))'#010+
|
')'#010+
|
||||||
'ifneq ($(INSTALLPPULINKFILES),)'#010+
|
'ifneq ($(INSTALLPPULINKFILES),)'#010+
|
||||||
' @$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFI'+
|
' @$(ECHO) $(addprefi','x "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINK'+
|
||||||
'LES))'#010+
|
'FILES))'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
'ifneq ($(INSTALLPPULIBFILES),)'#010+
|
'ifneq ($(INSTALLPPULIBFILES),)'#010+
|
||||||
' @$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILE'+
|
' @$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILE'+
|
||||||
'S))'#010+
|
'S))'#010+
|
||||||
'endif'#010,
|
'endif'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
'ifdef EXTRAINSTALLFILES'#010+
|
'ifdef EXTRAINSTALLFILES'#010+
|
||||||
' @$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFIL'+
|
' @$(ECHO) $(addprefix "\n"$(EXTRAINST','ALLDIR)/,$(EXTRAINSTALLF'+
|
||||||
'ES))'#010+
|
'ILES))'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
#010+
|
#010+
|
||||||
'fpc_install:'#010+
|
'fpc_install: $(INSTALLTARGET)'#010+
|
||||||
'# Create UnitInstallFiles'#010+
|
'# Create UnitInstallFiles'#010+
|
||||||
'ifndef DEFAULTUNITS'#010+
|
'ifdef INSTALLEXEFILES'#010+
|
||||||
'ifdef EXEOBJECTS'#010+
|
|
||||||
' $(MKDIR) $(BININSTALLDIR)'#010+
|
' $(MKDIR) $(BININSTALLDIR)'#010+
|
||||||
'# Compress the exe','s if upx is defined'#010+
|
'# Compress the exes if upx is defined'#010+
|
||||||
'ifdef UPXPROG'#010+
|
'ifdef UPXPROG'#010+
|
||||||
' -$(UPXPROG) $(EXEFILES)'#010+
|
' -$(UPXPROG) $(INSTALLEXEFILES)',#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
' $(INSTALLEXE) $(EXEFILES) $(BININSTALLDIR)'#010+
|
' $(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)'#010+
|
||||||
'endif'#010+
|
|
||||||
'endif'#010+
|
|
||||||
'ifdef LOADEROBJECTS'#010+
|
|
||||||
' $(MKDIR) $(UNITINSTALLDIR)'#010+
|
|
||||||
' $(INSTALL) $(LOADEROFILES) $(UNITINSTALLDI','R)'#010+
|
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
'ifdef INSTALLPPUFILES'#010+
|
'ifdef INSTALLPPUFILES'#010+
|
||||||
' $(MKDIR) $(UNITINSTALLDIR)'#010+
|
' $(MKDIR) $(UNITINSTALLDIR)'#010+
|
||||||
' $(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)'#010+
|
' $(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)'#010+
|
||||||
'ifneq ($(INSTALLPPULINKFILES),)'#010+
|
'ifneq ($(INSTALLPPULINKFILES),)'#010+
|
||||||
' $(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)'#010+
|
' $(INSTALL) $(INS','TALLPPULINKFILES) $(UNITINSTALLDIR)'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
'ifneq ($(INSTALLPPUL','IBFILES),)'#010+
|
'ifneq ($(INSTALLPPULIBFILES),)'#010+
|
||||||
' $(MKDIR) $(LIBINSTALLDIR)'#010+
|
' $(MKDIR) $(LIBINSTALLDIR)'#010+
|
||||||
' $(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)'#010+
|
' $(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
'ifdef EXTRAINSTALLFILES'#010+
|
'ifdef EXTRAINSTALLFILES'#010+
|
||||||
' $(MKDIR) $(EXTRAINSTALLDIR)'#010+
|
' $(MKDIR) $(EXTRAINSTALLDIR)'#010+
|
||||||
' $(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)'#010+
|
' ',' $(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)'#010+
|
||||||
'endif'#010,
|
'endif'#010+
|
||||||
#010+
|
#010+
|
||||||
#010+
|
#010+
|
||||||
'[zipinstallrules]'#010+
|
'[zipinstallrules]'#010+
|
||||||
@ -874,9 +931,9 @@ const fpcmakeini : array[0..93,1..240] of char=(
|
|||||||
'# Zip'#010+
|
'# Zip'#010+
|
||||||
'#####################################################################'#010+
|
'#####################################################################'#010+
|
||||||
#010+
|
#010+
|
||||||
'.PHONY: fpc_zipinstall fpc_zipinstalladd'#010+
|
'.PHONY: fpc','_zipinstall fpc_zipinstalladd'#010+
|
||||||
#010+
|
#010+
|
||||||
'# Temporary path to pack a file',#010+
|
'# Temporary path to pack a file'#010+
|
||||||
'ifndef PACKDIR'#010+
|
'ifndef PACKDIR'#010+
|
||||||
'ifndef inlinux'#010+
|
'ifndef inlinux'#010+
|
||||||
'PACKDIR=pack_tmp'#010+
|
'PACKDIR=pack_tmp'#010+
|
||||||
@ -890,10 +947,10 @@ const fpcmakeini : array[0..93,1..240] of char=(
|
|||||||
'PACKAGEDIR=$(BASEDIR)'#010+
|
'PACKAGEDIR=$(BASEDIR)'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
#010+
|
#010+
|
||||||
'# Add .zip/.tar.gz extension'#010+
|
'# Add .zip/.ta','r.gz extension'#010+
|
||||||
'ifdef ZIPNAME'#010+
|
'ifdef ZIPNAME'#010+
|
||||||
'ifndef inlinux'#010+
|
'ifndef inlinux'#010+
|
||||||
'override ZIPNAME:=','$(ZIPNAME)$(ZIPEXT)'#010+
|
'override ZIPNAME:=$(ZIPNAME)$(ZIPEXT)'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
#010+
|
#010+
|
||||||
@ -903,17 +960,17 @@ const fpcmakeini : array[0..93,1..240] of char=(
|
|||||||
'endif'#010+
|
'endif'#010+
|
||||||
#010+
|
#010+
|
||||||
'# Note: This will not remove the zipfile first'#010+
|
'# Note: This will not remove the zipfile first'#010+
|
||||||
'fpc_zipinstalladd:'#010+
|
'fpc_zipins','talladd:'#010+
|
||||||
'ifndef ZIPNAME'#010+
|
'ifndef ZIPNAME'#010+
|
||||||
' @$(ECHO) Please specify ZIPNAM','E!'#010+
|
' @$(ECHO) Please specify ZIPNAME!'#010+
|
||||||
' @exit'#010+
|
' @exit'#010+
|
||||||
'else'#010+
|
'else'#010+
|
||||||
' $(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)'#010+
|
' $(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)'#010+
|
||||||
'ifdef inlinux'#010+
|
'ifdef inlinux'#010+
|
||||||
' gzip -d $(PACKAGEDIR)/$(ZIPNAME).tar.gz'#010+
|
' gzip -d $(PACKAGEDIR)/$(ZIPNAME).tar.gz'#010+
|
||||||
' cd $(PACKDIR) ; tar rv --file $(PACKAGEDIR)/$(ZIPNAME).tar * ;'+
|
' cd $(PACKDIR) ; tar rv --file',' $(PACKAGEDIR)/$(ZIPNAME).tar *'+
|
||||||
' cd $(BASEDIR)'#010+
|
' ; cd $(BASEDIR)'#010+
|
||||||
' gzip $','(PACKAGEDIR)/$(ZIPNAME).tar'#010+
|
' gzip $(PACKAGEDIR)/$(ZIPNAME).tar'#010+
|
||||||
'else'#010+
|
'else'#010+
|
||||||
' cd $(PACKDIR) ; $(ZIPPROG) $(PACKAGEDIR)/$(ZIPNAME) * ; cd $(B'+
|
' cd $(PACKDIR) ; $(ZIPPROG) $(PACKAGEDIR)/$(ZIPNAME) * ; cd $(B'+
|
||||||
'ASEDIR)'#010+
|
'ASEDIR)'#010+
|
||||||
@ -921,17 +978,17 @@ const fpcmakeini : array[0..93,1..240] of char=(
|
|||||||
' $(DELTREE) $(PACKDIR)'#010+
|
' $(DELTREE) $(PACKDIR)'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
#010+
|
#010+
|
||||||
'# First remove the zip and then install'#010+
|
'# First remove the zip a','nd then install'#010+
|
||||||
'fpc_zipinstall:'#010+
|
'fpc_zipinstall:'#010+
|
||||||
'ifndef ZIPNAME'#010+
|
'ifndef ZIPNAME'#010+
|
||||||
' @$(ECHO',') Please specify ZIPNAME!'#010+
|
' @$(ECHO) Please specify ZIPNAME!'#010+
|
||||||
' @exit'#010+
|
' @exit'#010+
|
||||||
'else'#010+
|
'else'#010+
|
||||||
' $(DEL) $(PACKAGEDIR)/$(ZIPNAME)'#010+
|
' $(DEL) $(PACKAGEDIR)/$(ZIPNAME)'#010+
|
||||||
' $(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)'#010+
|
' $(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)'#010+
|
||||||
'ifdef inlinux'#010+
|
'ifdef inlinux'#010+
|
||||||
' cd $(PACKDIR) ; tar cvz --file $(PACKAGEDIR)/$(ZIPNAME).tar.gz'+
|
' cd $(PACKDIR) ','; tar cvz --file $(PACKAGEDIR)/$(ZIPNAME).tar.'+
|
||||||
' * ; cd $(BASE','DIR)'#010+
|
'gz * ; cd $(BASEDIR)'#010+
|
||||||
'else'#010+
|
'else'#010+
|
||||||
' cd $(PACKDIR) ; $(ZIPPROG) $(PACKAGEDIR)/$(ZIPNAME) * ; cd $(B'+
|
' cd $(PACKDIR) ; $(ZIPPROG) $(PACKAGEDIR)/$(ZIPNAME) * ; cd $(B'+
|
||||||
'ASEDIR)'#010+
|
'ASEDIR)'#010+
|
||||||
@ -941,32 +998,32 @@ const fpcmakeini : array[0..93,1..240] of char=(
|
|||||||
#010+
|
#010+
|
||||||
#010+
|
#010+
|
||||||
'[cleanrules]'#010+
|
'[cleanrules]'#010+
|
||||||
'#####################################################################'#010+
|
'#################################','###################################'+
|
||||||
'# Clean rules'#010+
|
|
||||||
'###########','#########################################################'+
|
|
||||||
'#'#010+
|
'#'#010+
|
||||||
|
'# Clean rules'#010+
|
||||||
|
'#####################################################################'#010+
|
||||||
#010+
|
#010+
|
||||||
'.PHONY: fpc_clean fpc_cleanall'#010+
|
'.PHONY: fpc_clean fpc_cleanall'#010+
|
||||||
#010+
|
#010+
|
||||||
'ifdef UNITPPUFILES'#010+
|
|
||||||
'override CLEANPPUFILES=$(UNITPPUFILES)'#010+
|
|
||||||
'endif'#010+
|
|
||||||
'ifdef EXTRACLEANUNITS'#010+
|
'ifdef EXTRACLEANUNITS'#010+
|
||||||
'override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNIT','S))'#010+
|
'override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS)',')'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
#010+
|
#010+
|
||||||
'fpc_clean:'#010+
|
'ifdef CLEANPPUFILES'#010+
|
||||||
'ifdef EXEOBJECTS'#010+
|
'ifdef PPUFILES'#010+
|
||||||
' -$(DEL) $(EXEFILES) $(EXEOFILES)'#010+
|
'CLEANPPULINKFILES=$(shell $(PPUFILES) $(CLEANPPUFILES))'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
'ifdef LOADEROBJECTS'#010+
|
'endif'#010+
|
||||||
' -$(DEL) $(LOADEROFILES)'#010+
|
#010+
|
||||||
|
'fpc_clean: $(CLEANTARGET)'#010+
|
||||||
|
'ifdef CLEANEXEFILES'#010+
|
||||||
|
' -$(DEL) $(CLEANEXEFILES)'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
'ifdef CLEANPPUFILES'#010+
|
'ifdef CLEANPPUFILES'#010+
|
||||||
' -$(DEL) $(CLEANPPUFILES)'#010+
|
' -$(DEL) $(CLEA','NPPUFILES)'#010+
|
||||||
'ifdef PPUFILES'#010+
|
|
||||||
' -$(DEL) $(shell $(PP','UFILES) $(CLEANPPUFILES))'#010+
|
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
|
'ifneq ($(CLEANPPULINKFILES),)'#010+
|
||||||
|
' -$(DEL) $(CLEANPPULINKFILES)'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
'ifdef EXTRACLEANFILES'#010+
|
'ifdef EXTRACLEANFILES'#010+
|
||||||
' -$(DEL) $(EXTRACLEANFILES)'#010+
|
' -$(DEL) $(EXTRACLEANFILES)'#010+
|
||||||
@ -974,20 +1031,20 @@ const fpcmakeini : array[0..93,1..240] of char=(
|
|||||||
' -$(DEL) $(PPAS) link.res log'#010+
|
' -$(DEL) $(PPAS) link.res log'#010+
|
||||||
#010+
|
#010+
|
||||||
'fpc_cleanall:'#010+
|
'fpc_cleanall:'#010+
|
||||||
'ifdef EXEOBJECTS'#010+
|
'ifdef CLEANEXEFILES'#010+
|
||||||
' -$(DEL) $(EXEFILES)'#010+
|
' -$(DEL)',' $(CLEANEXEFILES)'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
' -$(DEL) *$(OEXT) *$(PPUEXT) ','*$(ASMEXT) *$(STATICLIBEXT) *$(S'+
|
' -$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHA'+
|
||||||
'HAREDLIBEXT) *$(PPLEXT)'#010+
|
'REDLIBEXT) *$(PPLEXT)'#010+
|
||||||
' -$(DELTREE) *$(SMARTEXT)'#010+
|
' -$(DELTREE) *$(SMARTEXT)'#010+
|
||||||
' -$(DEL) $(PPAS) link.res log'#010+
|
' -$(DEL) $(PPAS) link.res log'#010+
|
||||||
#010+
|
#010+
|
||||||
#010+
|
#010+
|
||||||
'[dependrules]'#010+
|
'[dependrules]'#010+
|
||||||
'#####################################################################'#010+
|
'######################################','##############################'+
|
||||||
'# Depend rules'#010+
|
|
||||||
'#############','#######################################################'+
|
|
||||||
'#'#010+
|
'#'#010+
|
||||||
|
'# Depend rules'#010+
|
||||||
|
'#####################################################################'#010+
|
||||||
#010+
|
#010+
|
||||||
'.PHONY: fpc_depend'#010+
|
'.PHONY: fpc_depend'#010+
|
||||||
#010+
|
#010+
|
||||||
@ -996,10 +1053,10 @@ const fpcmakeini : array[0..93,1..240] of char=(
|
|||||||
#010+
|
#010+
|
||||||
#010+
|
#010+
|
||||||
'[inforules]'#010+
|
'[inforules]'#010+
|
||||||
'#####################################################################'#010+
|
'############################################','########################'+
|
||||||
'# Info rules'#010+
|
|
||||||
'#####################','###############################################'+
|
|
||||||
'#'#010+
|
'#'#010+
|
||||||
|
'# Info rules'#010+
|
||||||
|
'#####################################################################'#010+
|
||||||
#010+
|
#010+
|
||||||
'.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installi'+
|
'.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installi'+
|
||||||
'nfo \'#010+
|
'nfo \'#010+
|
||||||
@ -1007,17 +1064,17 @@ const fpcmakeini : array[0..93,1..240] of char=(
|
|||||||
#010+
|
#010+
|
||||||
'fpc_info: $(FPCINFO)'#010+
|
'fpc_info: $(FPCINFO)'#010+
|
||||||
#010+
|
#010+
|
||||||
'[info_cfg]'#010+
|
'[info_cfg]'#010,
|
||||||
'fpc_infocfg:'#010+
|
'fpc_infocfg:'#010+
|
||||||
' @$(ECHO)'#010+
|
' @$(ECHO)'#010+
|
||||||
' @$(ECHO) == Configura','tion info =='#010+
|
' @$(ECHO) == Configuration info =='#010+
|
||||||
' @$(ECHO)'#010+
|
' @$(ECHO)'#010+
|
||||||
' @$(ECHO) FPC....... $(FPC)'#010+
|
' @$(ECHO) FPC....... $(FPC)'#010+
|
||||||
' @$(ECHO) Version... $(FPC_VERSION)'#010+
|
' @$(ECHO) Version... $(FPC_VERSION)'#010+
|
||||||
' @$(ECHO) CPU....... $(CPU_TARGET)'#010+
|
' @$(ECHO) CPU....... $(CPU_TARGET)'#010+
|
||||||
' @$(ECHO) Source.... $(OS_SOURCE)'#010+
|
' @$(ECHO) Source...','. $(OS_SOURCE)'#010+
|
||||||
' @$(ECHO) Target.... $(OS_TARGET)'#010+
|
' @$(ECHO) Target.... $(OS_TARGET)'#010+
|
||||||
' ',' @$(ECHO)'#010+
|
' @$(ECHO)'#010+
|
||||||
#010+
|
#010+
|
||||||
'[info_dirs]'#010+
|
'[info_dirs]'#010+
|
||||||
'fpc_infodirs:'#010+
|
'fpc_infodirs:'#010+
|
||||||
@ -1026,30 +1083,30 @@ const fpcmakeini : array[0..93,1..240] of char=(
|
|||||||
' @$(ECHO) == Directory info =='#010+
|
' @$(ECHO) == Directory info =='#010+
|
||||||
' @$(ECHO)'#010+
|
' @$(ECHO)'#010+
|
||||||
'ifdef NEEDGCCLIB'#010+
|
'ifdef NEEDGCCLIB'#010+
|
||||||
' @$(ECHO) GCC library is needed.'#010+
|
' @$(ECHO) GCC library is ne','eded.'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
'ifdef NEEDOTHERLIB'#010+
|
'ifdef NEEDOTHERLIB'#010+
|
||||||
' @$(ECHO) Other libra','ry is needed.'#010+
|
' @$(ECHO) Other library is needed.'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
' @$(ECHO) Basedir......... $(BASEDIR)'#010+
|
' @$(ECHO) Basedir......... $(BASEDIR)'#010+
|
||||||
' @$(ECHO)'#010+
|
' @$(ECHO)'#010+
|
||||||
' @$(ECHO) GCC library..... $(GCCLIBDIR)'#010+
|
' @$(ECHO) GCC library..... $(GCCLIBDIR)'#010+
|
||||||
' @$(ECHO) Other library... $(OTHERLIBDIR)'#010+
|
' @$(ECHO) Other library... $(OTHERLIBDIR)',#010+
|
||||||
' @$(ECHO)'#010+
|
' @$(ECHO)'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
#010+
|
#010+
|
||||||
'[info_tools]'#010+
|
'[info_tools]'#010+
|
||||||
'fpc_infotools:'#010+
|
'fpc_infotools:'#010+
|
||||||
' ',' @$(ECHO)'#010+
|
' @$(ECHO)'#010+
|
||||||
' @$(ECHO) == Tools info =='#010+
|
' @$(ECHO) == Tools info =='#010+
|
||||||
' @$(ECHO)'#010+
|
' @$(ECHO)'#010+
|
||||||
' @$(ECHO) Pwd....... $(PWD)'#010+
|
' @$(ECHO) Pwd....... $(PWD)'#010+
|
||||||
' @$(ECHO) Echo...... $(ECHO)'#010+
|
' @$(ECHO) Echo...... $(ECHO)'#010+
|
||||||
'ifdef PPDEP'#010+
|
'ifdef PPDEP'#010+
|
||||||
' @$(ECHO) PPDep..... $(PPDEP)'#010+
|
' @$(ECHO) PPDep..... $(PP','DEP)'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
'ifdef PPUMOVE'#010+
|
'ifdef PPUMOVE'#010+
|
||||||
' @$(ECHO) PPUMove... $(PPUM','OVE)'#010+
|
' @$(ECHO) PPUMove... $(PPUMOVE)'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
'ifdef PPUFILES'#010+
|
'ifdef PPUFILES'#010+
|
||||||
' @$(ECHO) PPUFiles.. $(PPUFILES)'#010+
|
' @$(ECHO) PPUFiles.. $(PPUFILES)'#010+
|
||||||
@ -1058,11 +1115,11 @@ const fpcmakeini : array[0..93,1..240] of char=(
|
|||||||
' @$(ECHO) Data2Inc.. $(DATA2INC)'#010+
|
' @$(ECHO) Data2Inc.. $(DATA2INC)'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
'ifdef SED'#010+
|
'ifdef SED'#010+
|
||||||
' @$(ECHO) Sed....... $(SED)'#010+
|
' @$(ECHO) Sed....... $(SED)',#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
'ifdef DATE'#010+
|
'ifdef DATE'#010+
|
||||||
' @$(ECHO) Date...... $(DATE)'#010+
|
' @$(ECHO) Date...... $(DATE)'#010+
|
||||||
'endif',#010+
|
'endif'#010+
|
||||||
'ifdef DIFF'#010+
|
'ifdef DIFF'#010+
|
||||||
' @$(ECHO) Diff...... $(DIFF)'#010+
|
' @$(ECHO) Diff...... $(DIFF)'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
@ -1072,10 +1129,10 @@ const fpcmakeini : array[0..93,1..240] of char=(
|
|||||||
'ifdef UPXPROG'#010+
|
'ifdef UPXPROG'#010+
|
||||||
' @$(ECHO) Upx....... $(UPXPROG)'#010+
|
' @$(ECHO) Upx....... $(UPXPROG)'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
'ifdef ZIPPROG'#010+
|
'ifdef ZIPPROG',#010+
|
||||||
' @$(ECHO) Zip....... $(ZIPPROG)'#010+
|
' @$(ECHO) Zip....... $(ZIPPROG)'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
' @$(EC','HO)'#010+
|
' @$(ECHO)'#010+
|
||||||
#010+
|
#010+
|
||||||
'[info_objects]'#010+
|
'[info_objects]'#010+
|
||||||
'fpc_infoobjects:'#010+
|
'fpc_infoobjects:'#010+
|
||||||
@ -1083,14 +1140,14 @@ const fpcmakeini : array[0..93,1..240] of char=(
|
|||||||
' @$(ECHO) == Object info =='#010+
|
' @$(ECHO) == Object info =='#010+
|
||||||
' @$(ECHO)'#010+
|
' @$(ECHO)'#010+
|
||||||
' @$(ECHO) LoaderObjects..... $(LOADEROBJECTS)'#010+
|
' @$(ECHO) LoaderObjects..... $(LOADEROBJECTS)'#010+
|
||||||
' @$(ECHO) UnitObjects....... $(UNITOBJECTS)'#010+
|
' @$(ECHO) U','nitObjects....... $(UNITOBJECTS)'#010+
|
||||||
' @$(ECHO) ExeObject','s........ $(EXEOBJECTS)'#010+
|
' @$(ECHO) ExeObjects........ $(EXEOBJECTS)'#010+
|
||||||
' @$(ECHO)'#010+
|
' @$(ECHO)'#010+
|
||||||
' @$(ECHO) ExtraCleanUnits... $(EXTRACLEANUNITS)'#010+
|
' @$(ECHO) ExtraCleanUnits... $(EXTRACLEANUNITS)'#010+
|
||||||
' @$(ECHO) ExtraCleanFiles... $(EXTRACLEANFILES)'#010+
|
' @$(ECHO) ExtraCleanFiles... $(EXTRACLEANFILES)'#010+
|
||||||
' @$(ECHO)'#010+
|
' @$(ECHO)'#010+
|
||||||
' @$(ECHO) ExtraInstallUnits. $(EXTRAINSTALLUNITS)'#010+
|
' @$','(ECHO) ExtraInstallUnits. $(EXTRAINSTALLUNITS)'#010+
|
||||||
' @$(E','CHO) ExtraInstallFiles. $(EXTRAINSTALLFILES)'#010+
|
' @$(ECHO) ExtraInstallFiles. $(EXTRAINSTALLFILES)'#010+
|
||||||
' @$(ECHO)'#010+
|
' @$(ECHO)'#010+
|
||||||
#010+
|
#010+
|
||||||
'[info_install]'#010+
|
'[info_install]'#010+
|
||||||
@ -1099,30 +1156,35 @@ const fpcmakeini : array[0..93,1..240] of char=(
|
|||||||
' @$(ECHO) == Install info =='#010+
|
' @$(ECHO) == Install info =='#010+
|
||||||
' @$(ECHO)'#010+
|
' @$(ECHO)'#010+
|
||||||
'ifdef DATE'#010+
|
'ifdef DATE'#010+
|
||||||
' @$(ECHO) DateStr.............. $(DATESTR)'#010+
|
' ',' @$(ECHO) DateStr.............. $(DATESTR)'#010+
|
||||||
'endif'#010+
|
'endif'#010+
|
||||||
' ',' @$(ECHO) PackageSuffix........ $(PACKAGESUFFIX)'#010+
|
' @$(ECHO) PackageSuffix........ $(PACKAGESUFFIX)'#010+
|
||||||
' @$(ECHO)'#010+
|
' @$(ECHO)'#010+
|
||||||
' @$(ECHO) BaseInstallDir....... $(BASEINSTALLDIR)'#010+
|
' @$(ECHO) BaseInstallDir....... $(BASEINSTALLDIR)'#010+
|
||||||
' @$(ECHO) BinInstallDir........ $(BININSTALLDIR)'#010+
|
' @$(ECHO) BinInstallDir........ $(BININSTALLD','IR)'#010+
|
||||||
' @$(ECHO) LibInstallDir........ $(LIBINSTALLDIR)',#010+
|
' @$(ECHO) LibInstallDir........ $(LIBINSTALLDIR)'#010+
|
||||||
' @$(ECHO) UnitInstallDir....... $(UNITINSTALLDIR)'#010+
|
' @$(ECHO) UnitInstallDir....... $(UNITINSTALLDIR)'#010+
|
||||||
' @$(ECHO) SourceInstallDir..... $(SOURCEINSTALLDIR)'#010+
|
' @$(ECHO) SourceInstallDir..... $(SOURCEINSTALLDIR)'#010+
|
||||||
' @$(ECHO) DocInstallDir........ $(DOCINSTALLDIR)'#010+
|
' @$(ECHO) DocInstallDir........ $(DOCINSTALLDIR)'#010+
|
||||||
' @$(ECHO) ExtraInstallDir...... $(EXTRAINSTALLDIR)'#010+
|
' ',' @$(ECHO) ExtraInstallDir...... $(EXTRAINSTALLDIR)'#010+
|
||||||
' ',' @$(ECHO)'#010+
|
' @$(ECHO)'#010+
|
||||||
#010+
|
#010+
|
||||||
'[userrules]'#010+
|
'[userrules]'#010+
|
||||||
'#####################################################################'#010+
|
'#####################################################################'#010+
|
||||||
'# Users rules'#010+
|
'# Users rules'#010+
|
||||||
'#####################################################################'#010+
|
'#####################################################################'#010+
|
||||||
#010+
|
#010,
|
||||||
|
'[end]'#010+
|
||||||
';'#010+
|
';'#010+
|
||||||
'; $Log$
|
'; $Log$
|
||||||
'; Revision 1.1 1999-11-23 09:43:35 peter
|
'; Revision 1.2 1999-11-24 23:53:00 peter
|
||||||
'; + internal .ini file
|
'; * packages
|
||||||
'; + packages support
|
'; * lot of other changes
|
||||||
'; * ppufiles,data2inc support
|
';'#010+
|
||||||
|
'; Revision 1.7 1999/11/23 09:43:35 peter'#010+
|
||||||
|
'; + internal .ini file'#010+
|
||||||
|
'; + packages support'#010+
|
||||||
|
'; * ppufiles,data2inc support'#010+
|
||||||
';'#010+
|
';'#010+
|
||||||
';'#010
|
';'#010
|
||||||
);
|
);
|
||||||
|
@ -304,13 +304,17 @@ ifdef UNITTARGETDIR
|
|||||||
override FPCOPT+=-FU$(UNITTARGETDIR)
|
override FPCOPT+=-FU$(UNITTARGETDIR)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
[command_smartlink]
|
[command_end]
|
||||||
# Smartlinking
|
# Smartlinking
|
||||||
ifdef SMARTLINK
|
ifdef SMARTLINK
|
||||||
override FPCOPT+=-CX
|
override FPCOPT+=-CX
|
||||||
endif
|
endif
|
||||||
|
|
||||||
[command_end]
|
# Debug
|
||||||
|
ifdef DEBUG
|
||||||
|
override FPCOPT+=-g
|
||||||
|
endif
|
||||||
|
|
||||||
# Add commandline options
|
# Add commandline options
|
||||||
ifdef OPT
|
ifdef OPT
|
||||||
override FPCOPT+=$(OPT)
|
override FPCOPT+=$(OPT)
|
||||||
@ -670,45 +674,108 @@ endif
|
|||||||
# Default rules
|
# Default rules
|
||||||
#####################################################################
|
#####################################################################
|
||||||
|
|
||||||
.PHONY: defaultrule all smart shared \
|
.PHONY: defaultrule all debug examples test smart shared \
|
||||||
showinstall install zipinstall zipinstalladd \
|
showinstall install zipinstall zipinstalladd \
|
||||||
clean cleanall depend info
|
clean cleanall depend info
|
||||||
|
|
||||||
|
|
||||||
|
[loaderrules]
|
||||||
|
#####################################################################
|
||||||
|
# Loaders
|
||||||
|
#####################################################################
|
||||||
|
|
||||||
|
.PHONY: fpc_loaders
|
||||||
|
|
||||||
|
%$(OEXT): %$(LOADEREXT)
|
||||||
|
$(AS) -o $*$(OEXT) $<
|
||||||
|
|
||||||
|
override ALLTARGET+=fpc_loaders
|
||||||
|
override CLEANTARGET+=fpc_loaders_clean
|
||||||
|
override SHOWINSTALLTARGET+=fpc_loaders_showinstall
|
||||||
|
override INSTALLTARGET+=fpc_loaders_install
|
||||||
|
|
||||||
|
LOADEROFILES=$(addsuffix $(OEXT),$(LOADEROBJECTS))
|
||||||
|
|
||||||
|
fpc_loaders: $(LOADEROFILES)
|
||||||
|
|
||||||
|
fpc_loaders_clean:
|
||||||
|
-$(DEL) $(LOADEROFILES)
|
||||||
|
|
||||||
|
fpc_loaders_showinstall:
|
||||||
|
@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(LOADEROFILES))
|
||||||
|
|
||||||
|
fpc_loaders_install:
|
||||||
|
$(MKDIR) $(UNITINSTALLDIR)
|
||||||
|
$(INSTALL) $(LOADEROFILES) $(UNITINSTALLDIR)
|
||||||
|
|
||||||
|
|
||||||
|
[unitrules]
|
||||||
|
#####################################################################
|
||||||
|
# Units
|
||||||
|
#####################################################################
|
||||||
|
|
||||||
|
.PHONY: fpc_units
|
||||||
|
|
||||||
|
override ALLTARGET+=fpc_units
|
||||||
|
|
||||||
|
UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
|
||||||
|
override INSTALLPPUFILES+=$(UNITPPUFILES)
|
||||||
|
override CLEANPPUFILES+=$(UNITPPUFILES)
|
||||||
|
|
||||||
|
fpc_units: $(UNITPPUFILES)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
[exerules]
|
||||||
|
#####################################################################
|
||||||
|
# Exes
|
||||||
|
#####################################################################
|
||||||
|
|
||||||
|
.PHONY: fpc_exes
|
||||||
|
|
||||||
|
EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS))
|
||||||
|
EXEOFILES=$(addsuffix $(OEXT),$(EXEOBJECTS))
|
||||||
|
|
||||||
|
override ALLTARGET+=fpc_exes
|
||||||
|
override INSTALLEXEFILES+=$(EXEFILES)
|
||||||
|
override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)
|
||||||
|
|
||||||
|
fpc_exes: $(EXEFILES)
|
||||||
|
|
||||||
|
|
||||||
|
[examplerules]
|
||||||
|
#####################################################################
|
||||||
|
# Examples
|
||||||
|
#####################################################################
|
||||||
|
|
||||||
|
.PHONY: fpc_examples fpc_test
|
||||||
|
|
||||||
|
EXAMPLEFILES=$(addsuffix $(EXEEXT),$(EXAMPLEOBJECTS))
|
||||||
|
EXAMPLEOFILES=$(addsuffix $(OEXT),$(EXAMPLEOBJECTS))
|
||||||
|
|
||||||
|
override CLEANEXEFILES+=$(EXAMPLEFILES) $(EXAMPLEOFILES)
|
||||||
|
|
||||||
|
fpc_examples: all $(EXAMPLEFILES)
|
||||||
|
|
||||||
|
fpc_test: examples
|
||||||
|
|
||||||
|
|
||||||
[compilerules]
|
[compilerules]
|
||||||
#####################################################################
|
#####################################################################
|
||||||
# General compile rules
|
# General compile rules
|
||||||
#####################################################################
|
#####################################################################
|
||||||
|
|
||||||
.PHONY: fpc_all fpc_units fpc_exes fpc_loaders
|
.PHONY: fpc_all fpc_debug
|
||||||
|
|
||||||
# Create Filenames
|
fpc_all: $(ALLTARGET)
|
||||||
ifdef LOADEROBJECTS
|
|
||||||
LOADEROFILES=$(addsuffix $(OEXT),$(LOADEROBJECTS))
|
fpc_debug:
|
||||||
endif
|
$(MAKE) all DEBUG=1
|
||||||
ifdef EXEOBJECTS
|
|
||||||
EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS))
|
# General compile rules, available for both possible PASEXT
|
||||||
EXEOFILES=$(addsuffix $(OEXT),$(EXEOBJECTS))
|
|
||||||
endif
|
|
||||||
ifdef UNITOBJECTS
|
|
||||||
UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
|
|
||||||
endif
|
|
||||||
|
|
||||||
.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
|
.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
|
||||||
|
|
||||||
ifdef DEFAULTUNITS
|
|
||||||
fpc_all: fpc_loaders fpc_units
|
|
||||||
else
|
|
||||||
fpc_all: fpc_loaders fpc_units fpc_exes
|
|
||||||
endif
|
|
||||||
|
|
||||||
fpc_loaders: $(LOADEROFILES)
|
|
||||||
|
|
||||||
fpc_units: $(UNITPPUFILES)
|
|
||||||
|
|
||||||
fpc_exes: $(EXEFILES)
|
|
||||||
|
|
||||||
# General compile rules, available for both possible PASEXT
|
|
||||||
%$(PPUEXT): %.pp
|
%$(PPUEXT): %.pp
|
||||||
$(COMPILER) $< $(REDIR)
|
$(COMPILER) $< $(REDIR)
|
||||||
$(EXECPASS)
|
$(EXECPASS)
|
||||||
@ -725,9 +792,6 @@ fpc_exes: $(EXEFILES)
|
|||||||
$(COMPILER) $< $(REDIR)
|
$(COMPILER) $< $(REDIR)
|
||||||
$(EXECPASS)
|
$(EXECPASS)
|
||||||
|
|
||||||
%$(OEXT): %$(LOADEREXT)
|
|
||||||
$(AS) -o $*$(OEXT) $<
|
|
||||||
|
|
||||||
|
|
||||||
[libraryrules]
|
[libraryrules]
|
||||||
#####################################################################
|
#####################################################################
|
||||||
@ -763,9 +827,6 @@ endif
|
|||||||
|
|
||||||
.PHONY: fpc_showinstall fpc_install
|
.PHONY: fpc_showinstall fpc_install
|
||||||
|
|
||||||
ifdef UNITPPUFILES
|
|
||||||
override INSTALLPPUFILES:=$(UNITPPUFILES)
|
|
||||||
endif
|
|
||||||
ifdef EXTRAINSTALLUNITS
|
ifdef EXTRAINSTALLUNITS
|
||||||
override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
|
override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
|
||||||
endif
|
endif
|
||||||
@ -781,14 +842,9 @@ endif
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
fpc_showinstall:
|
fpc_showinstall: $(SHOWINSTALLTARGET)
|
||||||
ifndef DEFAULTUNITS
|
ifdef INSTALLEXEFILES
|
||||||
ifdef EXEOBJECTS
|
@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
|
||||||
@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(EXEFILES))
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
ifdef LOADEROBJECTS
|
|
||||||
@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(LOADEROFILES))
|
|
||||||
endif
|
endif
|
||||||
ifdef INSTALLPPUFILES
|
ifdef INSTALLPPUFILES
|
||||||
@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
|
@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
|
||||||
@ -803,21 +859,15 @@ ifdef EXTRAINSTALLFILES
|
|||||||
@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
|
@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
fpc_install:
|
fpc_install: $(INSTALLTARGET)
|
||||||
# Create UnitInstallFiles
|
# Create UnitInstallFiles
|
||||||
ifndef DEFAULTUNITS
|
ifdef INSTALLEXEFILES
|
||||||
ifdef EXEOBJECTS
|
|
||||||
$(MKDIR) $(BININSTALLDIR)
|
$(MKDIR) $(BININSTALLDIR)
|
||||||
# Compress the exes if upx is defined
|
# Compress the exes if upx is defined
|
||||||
ifdef UPXPROG
|
ifdef UPXPROG
|
||||||
-$(UPXPROG) $(EXEFILES)
|
-$(UPXPROG) $(INSTALLEXEFILES)
|
||||||
endif
|
endif
|
||||||
$(INSTALLEXE) $(EXEFILES) $(BININSTALLDIR)
|
$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
|
||||||
endif
|
|
||||||
endif
|
|
||||||
ifdef LOADEROBJECTS
|
|
||||||
$(MKDIR) $(UNITINSTALLDIR)
|
|
||||||
$(INSTALL) $(LOADEROFILES) $(UNITINSTALLDIR)
|
|
||||||
endif
|
endif
|
||||||
ifdef INSTALLPPUFILES
|
ifdef INSTALLPPUFILES
|
||||||
$(MKDIR) $(UNITINSTALLDIR)
|
$(MKDIR) $(UNITINSTALLDIR)
|
||||||
@ -910,25 +960,25 @@ endif
|
|||||||
|
|
||||||
.PHONY: fpc_clean fpc_cleanall
|
.PHONY: fpc_clean fpc_cleanall
|
||||||
|
|
||||||
ifdef UNITPPUFILES
|
|
||||||
override CLEANPPUFILES=$(UNITPPUFILES)
|
|
||||||
endif
|
|
||||||
ifdef EXTRACLEANUNITS
|
ifdef EXTRACLEANUNITS
|
||||||
override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
|
override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
fpc_clean:
|
ifdef CLEANPPUFILES
|
||||||
ifdef EXEOBJECTS
|
ifdef PPUFILES
|
||||||
-$(DEL) $(EXEFILES) $(EXEOFILES)
|
CLEANPPULINKFILES=$(shell $(PPUFILES) $(CLEANPPUFILES))
|
||||||
endif
|
endif
|
||||||
ifdef LOADEROBJECTS
|
endif
|
||||||
-$(DEL) $(LOADEROFILES)
|
|
||||||
|
fpc_clean: $(CLEANTARGET)
|
||||||
|
ifdef CLEANEXEFILES
|
||||||
|
-$(DEL) $(CLEANEXEFILES)
|
||||||
endif
|
endif
|
||||||
ifdef CLEANPPUFILES
|
ifdef CLEANPPUFILES
|
||||||
-$(DEL) $(CLEANPPUFILES)
|
-$(DEL) $(CLEANPPUFILES)
|
||||||
ifdef PPUFILES
|
|
||||||
-$(DEL) $(shell $(PPUFILES) $(CLEANPPUFILES))
|
|
||||||
endif
|
endif
|
||||||
|
ifneq ($(CLEANPPULINKFILES),)
|
||||||
|
-$(DEL) $(CLEANPPULINKFILES)
|
||||||
endif
|
endif
|
||||||
ifdef EXTRACLEANFILES
|
ifdef EXTRACLEANFILES
|
||||||
-$(DEL) $(EXTRACLEANFILES)
|
-$(DEL) $(EXTRACLEANFILES)
|
||||||
@ -936,8 +986,8 @@ endif
|
|||||||
-$(DEL) $(PPAS) link.res log
|
-$(DEL) $(PPAS) link.res log
|
||||||
|
|
||||||
fpc_cleanall:
|
fpc_cleanall:
|
||||||
ifdef EXEOBJECTS
|
ifdef CLEANEXEFILES
|
||||||
-$(DEL) $(EXEFILES)
|
-$(DEL) $(CLEANEXEFILES)
|
||||||
endif
|
endif
|
||||||
-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
|
-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
|
||||||
-$(DELTREE) *$(SMARTEXT)
|
-$(DELTREE) *$(SMARTEXT)
|
||||||
@ -1075,9 +1125,14 @@ endif
|
|||||||
# Users rules
|
# Users rules
|
||||||
#####################################################################
|
#####################################################################
|
||||||
|
|
||||||
|
[end]
|
||||||
;
|
;
|
||||||
; $Log$
|
; $Log$
|
||||||
; Revision 1.7 1999-11-23 09:43:35 peter
|
; Revision 1.8 1999-11-24 23:53:00 peter
|
||||||
|
; * packages
|
||||||
|
; * lot of other changes
|
||||||
|
;
|
||||||
|
; Revision 1.7 1999/11/23 09:43:35 peter
|
||||||
; + internal .ini file
|
; + internal .ini file
|
||||||
; + packages support
|
; + packages support
|
||||||
; * ppufiles,data2inc support
|
; * ppufiles,data2inc support
|
||||||
|
390
utils/fpcmake.pp
390
utils/fpcmake.pp
@ -22,44 +22,84 @@ uses
|
|||||||
dos,
|
dos,
|
||||||
sysutils,classes,inifiles;
|
sysutils,classes,inifiles;
|
||||||
|
|
||||||
{ Include default fpcmake.ini }
|
|
||||||
{$i fpcmake.inc}
|
|
||||||
|
|
||||||
const
|
const
|
||||||
Version='v0.99.13';
|
Version='v0.99.13';
|
||||||
Title='fpcmake '+Version;
|
Title='fpcmake '+Version;
|
||||||
|
|
||||||
|
{ Include default fpcmake.ini }
|
||||||
|
{$i fpcmake.inc}
|
||||||
|
|
||||||
|
type
|
||||||
|
tsections=(sec_none,
|
||||||
|
sec_units,sec_exes,sec_loaders,sec_examples,
|
||||||
|
sec_compile,sec_depend,sec_install,sec_zipinstall,
|
||||||
|
sec_clean,sec_libs,sec_command,sec_exts,sec_dirs,sec_tools,sec_info
|
||||||
|
);
|
||||||
|
|
||||||
|
const
|
||||||
EnvVar='FPCMAKEINI'; { should be FPCMAKE in the future }
|
EnvVar='FPCMAKEINI'; { should be FPCMAKE in the future }
|
||||||
TimeFormat='yyyy/mm/dd hh:nn';
|
TimeFormat='yyyy/mm/dd hh:nn';
|
||||||
|
|
||||||
|
sectionstr : array[tsections] of string=('none',
|
||||||
|
'units','exes','loaders','examples',
|
||||||
|
'compile','depend','install','zipinstall',
|
||||||
|
'clean','libs','command','exts','dirs','tools','info'
|
||||||
|
);
|
||||||
|
|
||||||
|
sectiondef : array[tsections] of boolean=(false,
|
||||||
|
true,true,false,false,
|
||||||
|
true,false,true,true,
|
||||||
|
true,true,true,true,true,true,true
|
||||||
|
);
|
||||||
|
|
||||||
targets=4;
|
targets=4;
|
||||||
targetstr : array[1..targets] of string=(
|
targetstr : array[1..targets] of string=(
|
||||||
'linux','go32v2','win32','os2'
|
'linux','go32v2','win32','os2'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
rules=14;
|
||||||
|
rulestr : array[1..rules] of string=(
|
||||||
|
'all','debug',
|
||||||
|
'examples','test',
|
||||||
|
'smart','shared',
|
||||||
|
'showinstall','install','zipinstall','zipinstalladd',
|
||||||
|
'clean','cleanall',
|
||||||
|
'depend','info'
|
||||||
|
);
|
||||||
|
|
||||||
|
rule2sec : array[1..rules] of tsections=(
|
||||||
|
sec_compile,sec_compile,
|
||||||
|
sec_examples,sec_examples,
|
||||||
|
sec_libs,sec_libs,
|
||||||
|
sec_install,sec_install,sec_zipinstall,sec_zipinstall,
|
||||||
|
sec_clean,sec_clean,
|
||||||
|
sec_depend,sec_info
|
||||||
|
);
|
||||||
|
|
||||||
{ Sections in Makefile.fpc }
|
{ Sections in Makefile.fpc }
|
||||||
sec_sections='sections';
|
ini_sections='sections';
|
||||||
sec_install='install';
|
ini_install='install';
|
||||||
sec_clean='clean';
|
ini_clean='clean';
|
||||||
sec_dirs='dirs';
|
ini_dirs='dirs';
|
||||||
sec_packages='packages';
|
ini_packages='packages';
|
||||||
sec_libs='libs';
|
ini_libs='libs';
|
||||||
sec_targets='targets';
|
ini_targets='targets';
|
||||||
sec_info='info';
|
ini_info='info';
|
||||||
sec_defaults='defaults';
|
ini_defaults='defaults';
|
||||||
sec_tools='tools';
|
ini_tools='tools';
|
||||||
|
|
||||||
type
|
type
|
||||||
TTargetsString=array[0..targets] of string;
|
TTargetsString=array[0..targets] of string;
|
||||||
TFpcMake=record
|
TFpcMake=record
|
||||||
|
TargetDirs,
|
||||||
TargetLoaders,
|
TargetLoaders,
|
||||||
TargetUnits,
|
TargetUnits,
|
||||||
TargetPrograms,
|
TargetPrograms,
|
||||||
|
TargetExamples,
|
||||||
InstallUnits,
|
InstallUnits,
|
||||||
InstallFiles,
|
InstallFiles,
|
||||||
CleanUnits,
|
CleanUnits,
|
||||||
CleanFiles : TTargetsString;
|
CleanFiles : TTargetsString;
|
||||||
DefaultUnits : boolean;
|
|
||||||
DefaultRule,
|
DefaultRule,
|
||||||
DefaultTarget,
|
DefaultTarget,
|
||||||
DefaultCPU,
|
DefaultCPU,
|
||||||
@ -71,6 +111,7 @@ type
|
|||||||
DirObj,
|
DirObj,
|
||||||
DirTarget,
|
DirTarget,
|
||||||
DirUnitTarget,
|
DirUnitTarget,
|
||||||
|
DirSources,
|
||||||
DirInc : string;
|
DirInc : string;
|
||||||
PackageFCL : boolean;
|
PackageFCL : boolean;
|
||||||
Packages : string;
|
Packages : string;
|
||||||
@ -83,18 +124,7 @@ type
|
|||||||
InfoTools,
|
InfoTools,
|
||||||
InfoInstall,
|
InfoInstall,
|
||||||
InfoObjects : boolean;
|
InfoObjects : boolean;
|
||||||
SectionNone,
|
Section : array[tsections] of boolean;
|
||||||
SectionCompile,
|
|
||||||
SectionDepend,
|
|
||||||
SectionInstall,
|
|
||||||
SectionZipInstall,
|
|
||||||
SectionClean,
|
|
||||||
SectionLibs,
|
|
||||||
SectionCommand,
|
|
||||||
SectionExts,
|
|
||||||
SectionDirs,
|
|
||||||
SectionTools,
|
|
||||||
SectionInfo : boolean;
|
|
||||||
ToolsPPDep,
|
ToolsPPDep,
|
||||||
ToolsPPUMove,
|
ToolsPPUMove,
|
||||||
ToolsPPUFiles,
|
ToolsPPUFiles,
|
||||||
@ -138,6 +168,20 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
function TargetStringEmpty(const t:TTargetsString):boolean;
|
||||||
|
var
|
||||||
|
i : integer;
|
||||||
|
begin
|
||||||
|
for i:=0 to targets do
|
||||||
|
if t[i]<>'' then
|
||||||
|
begin
|
||||||
|
TargetStringEmpty:=false;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
TargetStringEmpty:=true;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
{*****************************************************************************
|
{*****************************************************************************
|
||||||
TMyMemoryStream
|
TMyMemoryStream
|
||||||
*****************************************************************************}
|
*****************************************************************************}
|
||||||
@ -167,6 +211,8 @@ var
|
|||||||
t[i]:=ini.ReadString(sec,name+'_'+targetstr[i],'');
|
t[i]:=ini.ReadString(sec,name+'_'+targetstr[i],'');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
sec : tsections;
|
||||||
begin
|
begin
|
||||||
ReadMakefilefpc:=false;
|
ReadMakefilefpc:=false;
|
||||||
if FileExists('Makefile.fpc') then
|
if FileExists('Makefile.fpc') then
|
||||||
@ -183,82 +229,74 @@ begin
|
|||||||
with userini,ini do
|
with userini,ini do
|
||||||
begin
|
begin
|
||||||
{ targets }
|
{ targets }
|
||||||
ReadTargetsString(TargetLoaders,sec_targets,'loaders','');
|
ReadTargetsString(TargetDirs,ini_targets,'dirs','');
|
||||||
ReadTargetsString(TargetUnits,sec_targets,'units','');
|
ReadTargetsString(TargetLoaders,ini_targets,'loaders','');
|
||||||
ReadTargetsString(TargetPrograms,sec_targets,'programs','');
|
ReadTargetsString(TargetUnits,ini_targets,'units','');
|
||||||
|
ReadTargetsString(TargetPrograms,ini_targets,'programs','');
|
||||||
|
ReadTargetsString(TargetExamples,ini_targets,'examples','');
|
||||||
{ clean }
|
{ clean }
|
||||||
ReadTargetsString(CleanUnits,sec_clean,'units','');
|
ReadTargetsString(CleanUnits,ini_clean,'units','');
|
||||||
ReadTargetsString(CleanFiles,sec_clean,'files','');
|
ReadTargetsString(CleanFiles,ini_clean,'files','');
|
||||||
{ install }
|
{ install }
|
||||||
ReadTargetsString(InstallUnits,sec_install,'units','');
|
ReadTargetsString(InstallUnits,ini_install,'units','');
|
||||||
ReadTargetsString(InstallFiles,sec_install,'files','');
|
ReadTargetsString(InstallFiles,ini_install,'files','');
|
||||||
{ defaults }
|
{ defaults }
|
||||||
DefaultUnits:=ReadBool(sec_defaults,'defaultunits',false);
|
DefaultRule:=ReadString(ini_defaults,'defaultrule','all');
|
||||||
DefaultRule:=ReadString(sec_defaults,'defaultrule','all');
|
DefaultTarget:=ReadString(ini_defaults,'defaulttarget','');
|
||||||
DefaultTarget:=ReadString(sec_defaults,'defaulttarget','');
|
DefaultCPU:=ReadString(ini_defaults,'defaultcpu','');
|
||||||
DefaultCPU:=ReadString(sec_defaults,'defaultcpu','');
|
DefaultOptions:=ReadString(ini_defaults,'defaultoptions','');
|
||||||
DefaultOptions:=ReadString(sec_defaults,'defaultoptions','');
|
|
||||||
{ packages }
|
{ packages }
|
||||||
Packages:=Readstring(sec_packages,'packages','');
|
Packages:=Readstring(ini_packages,'packages','');
|
||||||
PackageFCL:=ReadBool(sec_packages,'fcl',false);
|
PackageFCL:=ReadBool(ini_packages,'fcl',false);
|
||||||
{ dirs }
|
{ dirs }
|
||||||
DirFpc:=ReadString(sec_dirs,'fpcdir','');
|
DirFpc:=ReadString(ini_dirs,'fpcdir','');
|
||||||
DirPackage:=ReadString(sec_dirs,'packagedir','$(FPCDIR)/packages');
|
DirPackage:=ReadString(ini_dirs,'packagedir','$(FPCDIR)/packages');
|
||||||
DirUnit:=ReadString(sec_dirs,'unitdir','');
|
DirUnit:=ReadString(ini_dirs,'unitdir','');
|
||||||
DirLib:=ReadString(sec_dirs,'libdir','');
|
DirLib:=ReadString(ini_dirs,'libdir','');
|
||||||
DirObj:=ReadString(sec_dirs,'objdir','');
|
DirObj:=ReadString(ini_dirs,'objdir','');
|
||||||
DirTarget:=ReadString(sec_dirs,'targetdir','');
|
DirTarget:=ReadString(ini_dirs,'targetdir','');
|
||||||
DirUnitTarget:=ReadString(sec_dirs,'unittargetdir','');
|
DirSources:=ReadString(ini_dirs,'sourcesdir','');
|
||||||
DirInc:=ReadString(sec_dirs,'incdir','');
|
DirUnitTarget:=ReadString(ini_dirs,'unittargetdir','');
|
||||||
|
DirInc:=ReadString(ini_dirs,'incdir','');
|
||||||
{ libs }
|
{ libs }
|
||||||
LibName:=ReadString(sec_libs,'libname','');
|
LibName:=ReadString(ini_libs,'libname','');
|
||||||
LibUnits:=ReadString(sec_libs,'libunits','');
|
LibUnits:=ReadString(ini_libs,'libunits','');
|
||||||
LibGcc:=ReadBool(sec_libs,'libgcc',false);
|
LibGcc:=ReadBool(ini_libs,'libgcc',false);
|
||||||
LibOther:=ReadBool(sec_libs,'libother',false);
|
LibOther:=ReadBool(ini_libs,'libother',false);
|
||||||
{ tools }
|
{ tools }
|
||||||
ToolsPPDep:=ReadBool(sec_tools,'toolppdep',true);
|
ToolsPPDep:=ReadBool(ini_tools,'toolppdep',true);
|
||||||
ToolsPPUMove:=ReadBool(sec_tools,'toolppumove',true);
|
ToolsPPUMove:=ReadBool(ini_tools,'toolppumove',true);
|
||||||
ToolsPPUFiles:=ReadBool(sec_tools,'toolppufiles',true);
|
ToolsPPUFiles:=ReadBool(ini_tools,'toolppufiles',true);
|
||||||
ToolsSed:=ReadBool(sec_tools,'toolsed',false);
|
ToolsSed:=ReadBool(ini_tools,'toolsed',false);
|
||||||
ToolsData2Inc:=ReadBool(sec_tools,'tooldata2inc',false);
|
ToolsData2Inc:=ReadBool(ini_tools,'tooldata2inc',false);
|
||||||
ToolsDiff:=ReadBool(sec_tools,'tooldiff',false);
|
ToolsDiff:=ReadBool(ini_tools,'tooldiff',false);
|
||||||
ToolsCmp:=ReadBool(sec_tools,'toolcmp',false);
|
ToolsCmp:=ReadBool(ini_tools,'toolcmp',false);
|
||||||
ToolsUpx:=ReadBool(sec_tools,'toolupx',true);
|
ToolsUpx:=ReadBool(ini_tools,'toolupx',true);
|
||||||
ToolsDate:=ReadBool(sec_tools,'tooldate',true);
|
ToolsDate:=ReadBool(ini_tools,'tooldate',true);
|
||||||
ToolsZip:=ReadBool(sec_tools,'toolzip',true);
|
ToolsZip:=ReadBool(ini_tools,'toolzip',true);
|
||||||
{ sections }
|
{ sections, but allow overriding the 'none' option to include a few sects only }
|
||||||
SectionInstall:=ReadBool(sec_sections,'install',true);
|
for sec:=low(tsections) to high(tsections) do
|
||||||
SectionZipInstall:=ReadBool(sec_sections,'zipinstall',true);
|
Section[sec]:=sectiondef[sec];
|
||||||
SectionClean:=ReadBool(sec_sections,'clean',true);
|
Section[sec_None]:=ReadBool(ini_sections,sectionstr[sec_none],sectiondef[sec_none]);
|
||||||
SectionInfo:=ReadBool(sec_sections,'info',true);
|
if Section[sec_None] then
|
||||||
SectionTools:=ReadBool(sec_sections,'tools',true);
|
FillChar(Section,sizeof(Section),0);
|
||||||
SectionLibs:=ReadBool(sec_sections,'libs',true);
|
for sec:=low(tsections) to high(tsections) do
|
||||||
SectionExts:=ReadBool(sec_sections,'exts',true);
|
Section[sec]:=ReadBool(ini_sections,sectionstr[sec],section[sec]);
|
||||||
SectionDirs:=ReadBool(sec_sections,'dirs',true);
|
{ turn on needed sections }
|
||||||
SectionCompile:=ReadBool(sec_sections,'compile',true);
|
if not TargetStringEmpty(TargetLoaders) then
|
||||||
SectionDepend:=ReadBool(sec_sections,'depend',true);
|
userini.section[sec_loaders]:=true;
|
||||||
SectionCommand:=ReadBool(sec_sections,'command',true);
|
if not TargetStringEmpty(TargetUnits) then
|
||||||
SectionNone:=ReadBool(sec_sections,'none',false);
|
userini.section[sec_units]:=true;
|
||||||
if SectionNone then
|
if not TargetStringEmpty(TargetPrograms) then
|
||||||
begin
|
userini.section[sec_exes]:=true;
|
||||||
SectionInstall:=false;
|
if not TargetStringEmpty(TargetExamples) then
|
||||||
SectionZipInstall:=false;
|
userini.section[sec_examples]:=true;
|
||||||
SectionClean:=false;
|
|
||||||
SectionInfo:=false;
|
|
||||||
SectionTools:=false;
|
|
||||||
SectionLibs:=false;
|
|
||||||
SectionExts:=false;
|
|
||||||
SectionDirs:=false;
|
|
||||||
SectionCompile:=false;
|
|
||||||
SectionDepend:=false;
|
|
||||||
SectionCommand:=false;
|
|
||||||
end;
|
|
||||||
{ info }
|
{ info }
|
||||||
InfoCfg:=ReadBool(sec_info,'infoconfig',true);
|
InfoCfg:=ReadBool(ini_info,'infoconfig',true);
|
||||||
InfoDirs:=ReadBool(sec_info,'infodirs',false);
|
InfoDirs:=ReadBool(ini_info,'infodirs',false);
|
||||||
InfoTools:=ReadBool(sec_info,'infotools',false);
|
InfoTools:=ReadBool(ini_info,'infotools',false);
|
||||||
InfoInstall:=ReadBool(sec_info,'infoinstall',true);
|
InfoInstall:=ReadBool(ini_info,'infoinstall',true);
|
||||||
InfoObjects:=ReadBool(sec_info,'infoobjects',true);
|
InfoObjects:=ReadBool(ini_info,'infoobjects',true);
|
||||||
{ rules }
|
{ rules }
|
||||||
PreSettings:=TStringList.Create;
|
PreSettings:=TStringList.Create;
|
||||||
ReadSectionRaw('presettings',PreSettings);
|
ReadSectionRaw('presettings',PreSettings);
|
||||||
@ -367,6 +405,13 @@ var
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure AddHead(const s:string);
|
||||||
|
begin
|
||||||
|
mf.Add('');
|
||||||
|
mf.Add('# '+s);
|
||||||
|
mf.Add('');
|
||||||
|
end;
|
||||||
|
|
||||||
procedure AddSection(b:boolean;s:string);
|
procedure AddSection(b:boolean;s:string);
|
||||||
begin
|
begin
|
||||||
if b then
|
if b then
|
||||||
@ -378,48 +423,72 @@ var
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure AddRule(s:string);
|
procedure AddRule(rule:integer);
|
||||||
var
|
var
|
||||||
i : integer;
|
i : integer;
|
||||||
|
hs : string;
|
||||||
begin
|
begin
|
||||||
i:=0;
|
i:=0;
|
||||||
while (i<userini.rules.Count) do
|
while (i<userini.rules.Count) do
|
||||||
begin
|
begin
|
||||||
if (userini.rules[i]<>'') and
|
if (length(userini.rules[i])>length(rulestr[rule])) and
|
||||||
(userini.rules[i][1]=s[1]) and
|
(userini.rules[i][1]=rulestr[rule][1]) and
|
||||||
(Copy(userini.rules[i],1,length(s))=s) then
|
((userini.rules[i][length(rulestr[rule])+1]=':') or
|
||||||
|
((length(userini.rules[i])>length(rulestr[rule])+1) and
|
||||||
|
(userini.rules[i][length(rulestr[rule])+2]=':'))) and
|
||||||
|
(Copy(userini.rules[i],1,length(rulestr[rule]))=rulestr[rule]) then
|
||||||
exit;
|
exit;
|
||||||
inc(i);
|
inc(i);
|
||||||
end;
|
end;
|
||||||
mf.Add(s+': fpc_'+s);
|
hs:='';
|
||||||
mf.Add('');
|
if userini.section[rule2sec[rule]] then
|
||||||
|
hs:=hs+' fpc_'+rulestr[rule];
|
||||||
|
if not TargetStringEmpty(userini.targetdirs) then
|
||||||
|
hs:=hs+' $(addsuffix _'+rulestr[rule]+',$(DIROBJECTS))';
|
||||||
|
if hs<>'' then
|
||||||
|
begin
|
||||||
|
mf.Add(rulestr[rule]+':'+hs);
|
||||||
|
mf.Add('');
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure AddTargets(const pre:string;var t:TTargetsString);
|
procedure AddTargets(const pre:string;var t:TTargetsString;wildcard:boolean);
|
||||||
var
|
var
|
||||||
i : integer;
|
i : integer;
|
||||||
begin
|
begin
|
||||||
if t[0]<>'' then
|
for i:=0 to targets do
|
||||||
mf.Add(pre+'='+t[0]);
|
|
||||||
for i:=1to targets do
|
|
||||||
if (t[i]<>'') then
|
if (t[i]<>'') then
|
||||||
begin
|
begin
|
||||||
mf.Add('ifeq ($(OS_TARGET),'+targetstr[i]+')');
|
if i<>0 then
|
||||||
|
mf.Add('ifeq ($(OS_TARGET),'+targetstr[i]+')');
|
||||||
if t[i]<>'' then
|
if t[i]<>'' then
|
||||||
mf.Add(pre+'+='+t[i]);
|
begin
|
||||||
mf.Add('endif');
|
if wildcard then
|
||||||
|
mf.Add(pre+'+=$(wildcard '+t[i]+')')
|
||||||
|
else
|
||||||
|
mf.Add(pre+'+='+t[i]);
|
||||||
|
end;
|
||||||
|
if i<>0 then
|
||||||
|
mf.Add('endif');
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure AddHead(const s:string);
|
procedure AddTargetDir(const s:string);
|
||||||
|
var
|
||||||
|
j : integer;
|
||||||
begin
|
begin
|
||||||
mf.Add('');
|
AddHead('Dir '+s);
|
||||||
mf.Add('# '+s);
|
for j:=1to rules do
|
||||||
mf.Add('');
|
begin
|
||||||
|
mf.Add(s+'_'+rulestr[j]+':');
|
||||||
|
mf.Add(#9+'$(MAKE) -C '+s+' '+rulestr[j]);
|
||||||
|
mf.Add('');
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
hs : string;
|
hs : string;
|
||||||
|
i,j : integer;
|
||||||
begin
|
begin
|
||||||
{ Open the Makefile }
|
{ Open the Makefile }
|
||||||
Verbose('Creating Makefile');
|
Verbose('Creating Makefile');
|
||||||
@ -465,29 +534,31 @@ begin
|
|||||||
|
|
||||||
{ Targets }
|
{ Targets }
|
||||||
AddHead('Targets');
|
AddHead('Targets');
|
||||||
AddTargets('LOADEROBJECTS',userini.targetloaders);
|
AddTargets('DIROBJECTS',userini.targetdirs,true);
|
||||||
AddTargets('UNITOBJECTS',userini.targetunits);
|
AddTargets('LOADEROBJECTS',userini.targetloaders,false);
|
||||||
AddTargets('EXEOBJECTS',userini.targetprograms);
|
AddTargets('UNITOBJECTS',userini.targetunits,false);
|
||||||
|
AddTargets('EXEOBJECTS',userini.targetprograms,false);
|
||||||
|
AddTargets('EXAMPLEOBJECTS',userini.targetexamples,false);
|
||||||
|
|
||||||
{ Clean }
|
{ Clean }
|
||||||
AddHead('Clean');
|
AddHead('Clean');
|
||||||
AddTargets('EXTRACLEANUNITS',userini.cleanunits);
|
AddTargets('EXTRACLEANUNITS',userini.cleanunits,false);
|
||||||
AddTargets('EXTRACLEANFILES',userini.cleanfiles);
|
AddTargets('EXTRACLEANFILES',userini.cleanfiles,false);
|
||||||
|
|
||||||
{ Install }
|
{ Install }
|
||||||
AddHead('Install');
|
AddHead('Install');
|
||||||
AddTargets('EXTRAINSTALLUNITS',userini.installunits);
|
AddTargets('EXTRAINSTALLUNITS',userini.installunits,false);
|
||||||
AddTargets('EXTRAINSTALLFILES',userini.installfiles);
|
AddTargets('EXTRAINSTALLFILES',userini.installfiles,false);
|
||||||
|
|
||||||
{ Defaults }
|
{ Defaults }
|
||||||
AddHead('Defaults');
|
AddHead('Defaults');
|
||||||
if userini.defaultunits then
|
|
||||||
Add('DEFAULTUNITS=1');
|
|
||||||
if userini.defaultoptions<>'' then
|
if userini.defaultoptions<>'' then
|
||||||
Add('override NEEDOPT='+userini.defaultoptions);
|
Add('override NEEDOPT='+userini.defaultoptions);
|
||||||
|
|
||||||
{ Dirs }
|
{ Dirs }
|
||||||
AddHead('Directories');
|
AddHead('Directories');
|
||||||
|
if userini.dirsources<>'' then
|
||||||
|
Add('vpath %$(PASEXT) '+userini.dirsources);
|
||||||
if userini.dirfpc<>'' then
|
if userini.dirfpc<>'' then
|
||||||
begin
|
begin
|
||||||
{ this dir can be set in the environment, it's more a default }
|
{ this dir can be set in the environment, it's more a default }
|
||||||
@ -544,7 +615,7 @@ begin
|
|||||||
Add('override NEEDOTHERLIB=1');
|
Add('override NEEDOTHERLIB=1');
|
||||||
|
|
||||||
{ Info }
|
{ Info }
|
||||||
if userini.SectionInfo then
|
if userini.Section[sec_Info] then
|
||||||
begin
|
begin
|
||||||
AddHead('Info');
|
AddHead('Info');
|
||||||
hs:='';
|
hs:='';
|
||||||
@ -571,7 +642,7 @@ begin
|
|||||||
Add('');
|
Add('');
|
||||||
|
|
||||||
{ write dirs }
|
{ write dirs }
|
||||||
if userini.sectiondirs then
|
if userini.section[sec_dirs] then
|
||||||
begin
|
begin
|
||||||
AddSection(true,'dir_default');
|
AddSection(true,'dir_default');
|
||||||
AddSection(userini.libgcc,'dir_gcclib');
|
AddSection(userini.libgcc,'dir_gcclib');
|
||||||
@ -580,12 +651,11 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
{ commandline }
|
{ commandline }
|
||||||
if userini.sectioncommand then
|
if userini.section[sec_command] then
|
||||||
begin
|
begin
|
||||||
Add('');
|
Add('');
|
||||||
AddSection(true,'command_begin');
|
AddSection(true,'command_begin');
|
||||||
AddSection(true,'command_rtl');
|
AddSection((userini.defaultoptions<>''),'command_needopt');
|
||||||
AddSection(true,'command_needopt');
|
|
||||||
AddSection((userini.dirfpc<>''),'command_fpcdir');
|
AddSection((userini.dirfpc<>''),'command_fpcdir');
|
||||||
AddSection((userini.dirunit<>'') or (userini.packages<>'') or (userini.packagefcl),'command_needunit');
|
AddSection((userini.dirunit<>'') or (userini.packages<>'') or (userini.packagefcl),'command_needunit');
|
||||||
AddSection((userini.dirlib<>''),'command_needlib');
|
AddSection((userini.dirlib<>''),'command_needlib');
|
||||||
@ -596,12 +666,11 @@ begin
|
|||||||
AddSection((userini.dirinc<>''),'command_inc');
|
AddSection((userini.dirinc<>''),'command_inc');
|
||||||
AddSection((userini.dirtarget<>''),'command_target');
|
AddSection((userini.dirtarget<>''),'command_target');
|
||||||
AddSection((userini.dirunittarget<>''),'command_unittarget');
|
AddSection((userini.dirunittarget<>''),'command_unittarget');
|
||||||
AddSection(true,'command_smartlink');
|
|
||||||
AddSection(true,'command_end');
|
AddSection(true,'command_end');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ write tools }
|
{ write tools }
|
||||||
if userini.sectiontools then
|
if userini.section[sec_tools] then
|
||||||
begin
|
begin
|
||||||
AddSection(true,'shelltools');
|
AddSection(true,'shelltools');
|
||||||
AddSection(true,'tool_default');
|
AddSection(true,'tool_default');
|
||||||
@ -618,37 +687,27 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
{ extensions }
|
{ extensions }
|
||||||
if userini.sectionexts then
|
if userini.section[sec_exts] then
|
||||||
AddSection(true,'extensions');
|
AddSection(true,'extensions');
|
||||||
|
|
||||||
{ add default rules }
|
{ add default rules }
|
||||||
AddSection(true,'defaultrules');
|
AddSection(true,'defaultrules');
|
||||||
AddRule('all');
|
for i:=1 to rules do
|
||||||
AddRule('smart');
|
AddRule(i);
|
||||||
AddRule('shared');
|
|
||||||
AddRule('showinstall');
|
|
||||||
AddRule('install');
|
|
||||||
AddRule('zipinstall');
|
|
||||||
AddRule('zipinstalladd');
|
|
||||||
AddRule('clean');
|
|
||||||
AddRule('clean_all');
|
|
||||||
AddRule('depend');
|
|
||||||
AddRule('info');
|
|
||||||
|
|
||||||
|
{ compile rules for making units/loaders/exes/examples }
|
||||||
|
AddSection(not TargetStringEmpty(userini.targetunits),'unitrules');
|
||||||
|
AddSection(not TargetStringEmpty(userini.targetprograms),'exerules');
|
||||||
|
AddSection(not TargetStringEmpty(userini.targetloaders),'loaderrules');
|
||||||
|
AddSection(not TargetStringEmpty(userini.targetexamples),'examplerules');
|
||||||
{ default fpc_ rules }
|
{ default fpc_ rules }
|
||||||
if userini.SectionCompile then
|
AddSection(userini.Section[sec_Compile],'compilerules');
|
||||||
AddSection(true,'compilerules');
|
AddSection(userini.Section[sec_Libs],'libraryrules');
|
||||||
if userini.SectionLibs then
|
AddSection(userini.Section[sec_Install],'installrules');
|
||||||
AddSection(true,'libraryrules');
|
AddSection(userini.Section[sec_ZipInstall],'zipinstallrules');
|
||||||
if userini.SectionInstall then
|
AddSection(userini.Section[sec_Clean],'cleanrules');
|
||||||
AddSection(true,'installrules');
|
AddSection(userini.Section[sec_Depend],'dependrules');
|
||||||
if userini.SectionZipInstall then
|
if userini.Section[sec_Info] then
|
||||||
AddSection(true,'zipinstallrules');
|
|
||||||
if userini.SectionClean then
|
|
||||||
AddSection(true,'cleanrules');
|
|
||||||
if userini.SectionDepend then
|
|
||||||
AddSection(true,'dependrules');
|
|
||||||
if userini.SectionInfo then
|
|
||||||
begin
|
begin
|
||||||
AddSection(true,'inforules');
|
AddSection(true,'inforules');
|
||||||
AddSection(userini.infocfg,'info_cfg');
|
AddSection(userini.infocfg,'info_cfg');
|
||||||
@ -658,6 +717,27 @@ begin
|
|||||||
AddSection(userini.infoinstall,'info_install');
|
AddSection(userini.infoinstall,'info_install');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ Target dirs }
|
||||||
|
if not TargetStringEmpty(userini.targetdirs) then
|
||||||
|
begin
|
||||||
|
for j:=0 to targets do
|
||||||
|
if (userini.targetdirs[j]<>'') then
|
||||||
|
begin
|
||||||
|
if j<>0 then
|
||||||
|
mf.Add('ifeq ($(OS_TARGET),'+targetstr[j]+')');
|
||||||
|
hs:=userini.targetdirs[j];
|
||||||
|
repeat
|
||||||
|
i:=pos(' ',hs);
|
||||||
|
if i=0 then
|
||||||
|
i:=length(hs)+1;
|
||||||
|
AddTargetDir(Copy(hs,1,i-1));
|
||||||
|
system.delete(hs,1,i);
|
||||||
|
until hs='';
|
||||||
|
if j<>0 then
|
||||||
|
mf.Add('endif');
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
{ insert users rules }
|
{ insert users rules }
|
||||||
if userini.rules.count>0 then
|
if userini.rules.count>0 then
|
||||||
begin
|
begin
|
||||||
@ -694,7 +774,11 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.7 1999-11-23 09:43:35 peter
|
Revision 1.8 1999-11-24 23:53:00 peter
|
||||||
|
* packages
|
||||||
|
* lot of other changes
|
||||||
|
|
||||||
|
Revision 1.7 1999/11/23 09:43:35 peter
|
||||||
+ internal .ini file
|
+ internal .ini file
|
||||||
+ packages support
|
+ packages support
|
||||||
* ppufiles,data2inc support
|
* ppufiles,data2inc support
|
||||||
|
Loading…
Reference in New Issue
Block a user