| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685 |
- #
- # Makefile generated by fpcmake v0.99.15 [2000/07/02]
- #
- defaultrule: help
- #####################################################################
- # Autodetect OS (Linux or Dos or Windows NT)
- # define inlinux when running under linux
- # define inWinNT when running under WinNT
- #####################################################################
- # We need only / in the path
- override PATH:=$(subst \,/,$(PATH))
- # Search for PWD and determine also if we are under linux
- PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(subst ;, ,$(PATH)))))
- ifeq ($(PWD),)
- PWD:=$(strip $(wildcard $(addsuffix /pwd,$(subst :, ,$(PATH)))))
- ifeq ($(PWD),)
- nopwd:
- @echo You need the GNU utils package to use this Makefile!
- @echo Get ftp://ftp.freepascal.org/pub/fpc/dist/go32v2/utilgo32.zip
- @exit
- else
- inlinux=1
- endif
- else
- PWD:=$(firstword $(PWD))
- endif
- # Detect NT - NT sets OS to Windows_NT
- ifndef inlinux
- ifeq ($(OS),Windows_NT)
- inWinNT=1
- endif
- endif
- # Detect OS/2 - OS/2 has OS2_SHELL defined
- ifndef inlinux
- ifndef inWinNT
- ifdef OS2_SHELL
- inOS2=1
- endif
- endif
- endif
- # The extension of executables
- ifdef inlinux
- EXEEXT=
- else
- EXEEXT=.exe
- endif
- # The path which is searched separated by spaces
- ifdef inlinux
- SEARCHPATH=$(subst :, ,$(PATH))
- else
- SEARCHPATH=$(subst ;, ,$(PATH))
- endif
- # Base dir
- ifdef PWD
- BASEDIR:=$(shell $(PWD))
- else
- BASEDIR=.
- endif
- #####################################################################
- # FPC version/target Detection
- #####################################################################
- # What compiler to use ?
- ifndef FPC
- # Compatibility with old makefiles
- ifdef PP
- FPC=$(PP)
- else
- ifdef inOS2
- FPC=ppos2
- else
- FPC=ppc386
- endif
- endif
- endif
- override FPC:=$(subst $(EXEEXT),,$(FPC))
- override FPC:=$(subst \,/,$(FPC))$(EXEEXT)
- # Target OS
- ifndef OS_TARGET
- OS_TARGET:=$(shell $(FPC) -iTO)
- endif
- # Source OS
- ifndef OS_SOURCE
- OS_SOURCE:=$(shell $(FPC) -iSO)
- endif
- # Target CPU
- ifndef CPU_TARGET
- CPU_TARGET:=$(shell $(FPC) -iTP)
- endif
- # Source CPU
- ifndef CPU_SOURCE
- CPU_SOURCE:=$(shell $(FPC) -iSP)
- endif
- # FPC version
- ifndef FPC_VERSION
- FPC_VERSION:=$(shell $(FPC) -iV)
- endif
- export FPC OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FPC_VERSION
- #####################################################################
- # Pre Settings
- #####################################################################
- OLDFPCDIR:=$(FPCDIR)
- checkfpcdir:
- ifdef OLDFPCDIR
- ifneq ($(OLDFPCDIR),)
- @echo ---------------------------------------------------------
- @echo
- @echo You must unset FPCDIR to use this the packaging rules.
- @echo
- @echo ---------------------------------------------------------
- @cantcontinuewithfpcdir
- endif
- endif
- # Check if install/ subdir is available
- ifneq ($(wildcard install),)
- CVSINSTALL=install
- else
- CVSINSTALL=.
- endif
- # All target
- ifdef SNAPSHOT
- ALLTARGET=all
- else
- ifndef ALLTARGET
- ifeq ($(OS_TARGET),win32)
- ALLTARGET=smart
- else
- ifeq ($(OS_TARGET),go32v2)
- ALLTARGET=smart
- else
- ALLTARGET=all
- endif
- endif
- endif
- endif
- # Stop with an error?
- ifdef SNAPSHOT
- NOSTOP=-
- else
- NOSTOP=
- endif
- # Prefix for units
- ifeq ($(OS_TARGET),linux)
- PKGPRE=units
- else
- PKGPRE=u
- endif
- # Test dir if none specified
- ifndef PREFIXINSTALLDIR
- ifdef inlinux
- PREFIXINSTALLDIR=/tmp/pptest
- else
- PREFIXINSTALLDIR=/pptest
- endif
- endif
- # Always compile for release
- override RELEASE=1
- export RELEASE
- # We want to have the resulting .zips in the current dir
- ifndef DESTZIPDIR
- export DESTZIPDIR:=$(BASEDIR)
- endif
- # Temporary path to pack a file
- BASEPACKDIR=$(BASEDIR)/basepack
- # Use new ppc386
- PPNEW=$(BASEDIR)/compiler/ppc386$(EXEEXT)
- # Don't use ppufiles for win32 becuase of commandline length problems
- ifneq ($(OS_TARGET),win32)
- PPUFILESNEW=$(BASEDIR)/utils/ppufiles$(EXEEXT)
- endif
- # Build/install options
- BUILDOPTS=FPC=$(PPNEW) RELEASE=1
- INSTALLOPTS=FPC=$(PPNEW) ZIPDESTDIR=$(BASEDIR)
- ifdef PPUFILESNEW
- override INSTALLOPT+=PPUFILES=$(PPUFILESNEW)
- endif
- # Compile also IDE (check for ide and fv dir)
- ifneq ($(wildcard ide),)
- ifneq ($(wildcard fv),)
- ifeq ($(OS_TARGET),go32v2)
- IDE=1
- endif
- ifeq ($(OS_TARGET),win32)
- IDE=1
- endif
- ifeq ($(OS_TARGET),linux)
- IDE=1
- endif
- endif
- endif
- #####################################################################
- # FPCDIR Setting
- #####################################################################
- # Test FPCDIR to look if the RTL dir exists
- ifdef FPCDIR
- override FPCDIR:=$(subst \,/,$(FPCDIR))
- ifeq ($(wildcard $(FPCDIR)/rtl),)
- ifeq ($(wildcard $(FPCDIR)/units),)
- override FPCDIR=wrong
- endif
- endif
- else
- override FPCDIR=wrong
- endif
- # Detect FPCDIR
- ifeq ($(FPCDIR),wrong)
- ifdef inlinux
- override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
- ifeq ($(wildcard $(FPCDIR)/units),)
- override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)
- endif
- else
- override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))))
- override FPCDIR:=$(FPCDIR)/..
- ifeq ($(wildcard $(FPCDIR)/rtl),)
- ifeq ($(wildcard $(FPCDIR)/units),)
- override FPCDIR:=$(FPCDIR)/..
- ifeq ($(wildcard $(FPCDIR)/rtl),)
- ifeq ($(wildcard $(FPCDIR)/units),)
- override FPCDIR=c:/pp
- endif
- endif
- endif
- endif
- endif
- endif
- #####################################################################
- # User Settings
- #####################################################################
- # Targets
- override DIROBJECTS+=$(wildcard compiler rtl utils fcl api fv packages ide)
- # Clean
- # Install
- ZIPTARGET=install
- # Defaults
- # Directories
- # Packages
- # Libraries
- #####################################################################
- # Shell tools
- #####################################################################
- # echo
- ifndef ECHO
- ECHO:=$(strip $(wildcard $(addsuffix /gecho$(EXEEXT),$(SEARCHPATH))))
- ifeq ($(ECHO),)
- ECHO:=$(strip $(wildcard $(addsuffix /echo$(EXEEXT),$(SEARCHPATH))))
- ifeq ($(ECHO),)
- ECHO:=echo
- ECHOE:=echo
- else
- ECHO:=$(firstword $(ECHO))
- ECHOE=$(ECHO) -E
- endif
- else
- ECHO:=$(firstword $(ECHO))
- ECHOE=$(ECHO) -E
- endif
- endif
- # To copy pograms
- ifndef COPY
- COPY:=cp -fp
- endif
- # Copy a whole tree
- ifndef COPYTREE
- COPYTREE:=cp -rfp
- endif
- # To move pograms
- ifndef MOVE
- MOVE:=mv -f
- endif
- # Check delete program
- ifndef DEL
- DEL:=rm -f
- endif
- # Check deltree program
- ifndef DELTREE
- DELTREE:=rm -rf
- endif
- # To install files
- ifndef INSTALL
- ifdef inlinux
- INSTALL:=install -m 644
- else
- INSTALL:=$(COPY)
- endif
- endif
- # To install programs
- ifndef INSTALLEXE
- ifdef inlinux
- INSTALLEXE:=install -m 755
- else
- INSTALLEXE:=$(COPY)
- endif
- endif
- # To make a directory.
- ifndef MKDIR
- ifdef inlinux
- MKDIR:=install -m 755 -d
- else
- MKDIR:=ginstall -m 755 -d
- endif
- endif
- export ECHO ECHOE COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
- #####################################################################
- # Default Tools
- #####################################################################
- # assembler, redefine it if cross compiling
- ifndef AS
- AS=as
- endif
- # linker, but probably not used
- ifndef LD
- LD=ld
- endif
- # ppas.bat / ppas.sh
- ifdef inlinux
- PPAS=ppas.sh
- else
- ifdef inOS2
- PPAS=ppas.cmd
- else
- PPAS=ppas.bat
- endif
- endif
- # ldconfig to rebuild .so cache
- ifdef inlinux
- LDCONFIG=ldconfig
- else
- LDCONFIG=
- endif
- # ppufiles
- ifndef PPUFILES
- PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
- ifeq ($(PPUFILES),)
- PPUFILES=
- else
- PPUFILES:=$(firstword $(PPUFILES))
- endif
- endif
- export PPUFILES
- # Look if UPX is found for go32v2 and win32. We can't use $UPX becuase
- # upx uses that one itself (PFV)
- ifndef UPXPROG
- ifeq ($(OS_TARGET),go32v2)
- UPXPROG:=1
- endif
- ifeq ($(OS_TARGET),win32)
- UPXPROG:=1
- endif
- ifdef UPXPROG
- UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(EXEEXT),$(SEARCHPATH))))
- ifeq ($(UPXPROG),)
- UPXPROG=
- else
- UPXPROG:=$(firstword $(UPXPROG))
- endif
- else
- UPXPROG=
- endif
- endif
- export UPXPROG
- # gdate/date
- ifndef DATE
- DATE:=$(strip $(wildcard $(addsuffix /date$(EXEEXT),$(SEARCHPATH))))
- ifeq ($(DATE),)
- DATE:=$(strip $(wildcard $(addsuffix /gdate$(EXEEXT),$(SEACHPATH))))
- ifeq ($(DATE),)
- DATE=
- else
- DATE:=$(firstword $(DATE))
- endif
- else
- DATE:=$(firstword $(DATE))
- endif
- endif
- export DATE
- ifdef DATE
- DATESTR:=$(shell $(DATE) +%Y%m%d)
- else
- DATESTR=
- endif
- # ZipProg, you can't use Zip as the var name (PFV)
- ifndef ZIPPROG
- ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(EXEEXT),$(SEARCHPATH))))
- ifeq ($(ZIPPROG),)
- ZIPPROG=
- else
- ZIPPROG:=$(firstword $(ZIPPROG))
- endif
- endif
- export ZIPPROG
- ZIPOPT=-9
- ZIPEXT=.zip
- # Tar
- ifndef TARPROG
- TARPROG:=$(strip $(wildcard $(addsuffix /tar$(EXEEXT),$(SEARCHPATH))))
- ifeq ($(TARPROG),)
- TARPROG=
- else
- TARPROG:=$(firstword $(TARPROG))
- endif
- endif
- export TARPROG
- ifeq ($(USETAR),bz2)
- TAROPT=vI
- TAREXT=.tar.bz2
- else
- TAROPT=vz
- TAREXT=.tar.gz
- endif
- #####################################################################
- # Default extensions
- #####################################################################
- # Default needed extensions (Go32v2,Linux)
- LOADEREXT=.as
- PPLEXT=.ppl
- PPUEXT=.ppu
- OEXT=.o
- ASMEXT=.s
- SMARTEXT=.sl
- STATICLIBEXT=.a
- SHAREDLIBEXT=.so
- RSTEXT=.rst
- FPCMADE=fpcmade
- # Go32v1
- ifeq ($(OS_TARGET),go32v1)
- PPUEXT=.pp1
- OEXT=.o1
- ASMEXT=.s1
- SMARTEXT=.sl1
- STATICLIBEXT=.a1
- SHAREDLIBEXT=.so1
- FPCMADE=fpcmade.v1
- endif
- # Go32v2
- ifeq ($(OS_TARGET),go32v2)
- FPCMADE=fpcmade.dos
- endif
- # Linux
- ifeq ($(OS_TARGET),linux)
- FPCMADE=fpcmade.lnx
- endif
- # Win32
- ifeq ($(OS_TARGET),win32)
- PPUEXT=.ppw
- OEXT=.ow
- ASMEXT=.sw
- SMARTEXT=.slw
- STATICLIBEXT=.aw
- SHAREDLIBEXT=.dll
- FPCMADE=fpcmade.w32
- endif
- # OS/2
- ifeq ($(OS_TARGET),os2)
- PPUEXT=.ppo
- ASMEXT=.so2
- OEXT=.oo2
- SMARTEXT=.so
- STATICLIBEXT=.ao2
- SHAREDLIBEXT=.dll
- FPCMADE=fpcmade.os2
- endif
- # library prefix
- LIBPREFIX=lib
- ifeq ($(OS_TARGET),go32v2)
- LIBPREFIX=
- endif
- ifeq ($(OS_TARGET),go32v1)
- LIBPREFIX=
- endif
- # determine which .pas extension is used
- ifndef PASEXT
- ifdef EXEOBJECTS
- override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(EXEOBJECTS)))))
- else
- override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(UNITOBJECTS)))))
- endif
- ifeq ($(TESTPAS),)
- PASEXT=.pp
- else
- PASEXT=.pas
- endif
- endif
- #####################################################################
- # Default Directories
- #####################################################################
- # set the prefix directory where to install everything
- ifndef PREFIXINSTALLDIR
- ifdef inlinux
- PREFIXINSTALLDIR=/usr
- else
- PREFIXINSTALLDIR=/pp
- endif
- endif
- export PREFIXINSTALLDIR
- # Where to place the resulting zip files
- ifndef DESTZIPDIR
- DESTZIPDIR:=$(BASEDIR)
- endif
- export DESTZIPDIR
- #####################################################################
- # Install Directories
- #####################################################################
- # set the base directory where to install everything
- ifndef BASEINSTALLDIR
- ifdef inlinux
- BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
- else
- BASEINSTALLDIR=$(PREFIXINSTALLDIR)
- endif
- endif
- # set the directory where to install the binaries
- ifndef BININSTALLDIR
- ifdef inlinux
- BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
- else
- BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
- endif
- endif
- # set the directory where to install the units.
- ifndef UNITINSTALLDIR
- UNITINSTALLDIR=$(BASEINSTALLDIR)/units/$(OS_TARGET)
- ifdef UNITSUBDIR
- UNITINSTALLDIR:=$(UNITINSTALLDIR)/$(UNITSUBDIR)
- endif
- endif
- # Where to install shared libraries
- ifndef LIBINSTALLDIR
- ifdef inlinux
- LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
- else
- LIBINSTALLDIR=$(UNITINSTALLDIR)
- endif
- endif
- # Where the source files will be stored
- ifndef SOURCEINSTALLDIR
- ifdef inlinux
- SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
- else
- SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
- endif
- ifdef SOURCESUBDIR
- SOURCEINSTALLDIR:=$(SOURCEINSTALLDIR)/$(SOURCESUBDIR)
- endif
- endif
- # Where the doc files will be stored
- ifndef DOCINSTALLDIR
- ifdef inlinux
- DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc-$(FPC_VERSION)
- else
- DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
- endif
- endif
- # Where to install the examples, under linux we use the doc dir
- # because the copytree command will create a subdir itself
- ifndef EXAMPLEINSTALLDIR
- ifdef inlinux
- EXAMPLEINSTALLDIR=$(DOCINSTALLDIR)/examples
- else
- EXAMPLEINSTALLDIR=$(BASEINSTALLDIR)/examples
- endif
- ifdef EXAMPLESUBDIR
- EXAMPLEINSTALLDIR:=$(EXAMPLEINSTALLDIR)/$(EXAMPLESUBDIR)
- endif
- endif
- # Where the some extra (data)files will be stored
- ifndef DATAINSTALLDIR
- DATAINSTALLDIR=$(BASEINSTALLDIR)
- endif
- #####################################################################
- # Redirection
- #####################################################################
- ifndef REDIRFILE
- REDIRFILE=log
- endif
- ifdef REDIR
- ifndef inlinux
- override FPC=redir -eo $(FPC)
- endif
- # set the verbosity to max
- override FPCOPT+=-va
- override REDIR:= >> $(REDIRFILE)
- endif
- #####################################################################
- # Standard rules
- #####################################################################
- debug: $(addsuffix _debug,$(DIROBJECTS))
- smart: $(addsuffix _smart,$(DIROBJECTS))
- shared: $(addsuffix _shared,$(DIROBJECTS))
- showinstall: $(addsuffix _showinstall,$(DIROBJECTS))
- cleanall: fpc_cleanall $(addsuffix _cleanall,$(DIROBJECTS))
- require: $(addsuffix _require,$(DIROBJECTS))
- .PHONY: debug smart shared showinstall cleanall require
- #####################################################################
- # Zip
- #####################################################################
- .PHONY: fpc_zipinstall
- # Create suffix to add
- ifndef PACKAGESUFFIX
- PACKAGESUFFIX=$(OS_TARGET)
- ifeq ($(OS_TARGET),go32v2)
- PACKAGESUFFIX=go32
- endif
- ifeq ($(OS_TARGET),win32)
- PACKAGESUFFIX=w32
- endif
- endif
- # Temporary path to pack a file
- ifndef PACKDIR
- ifndef inlinux
- PACKDIR=$(BASEDIR)/pack_tmp
- else
- PACKDIR=/tmp/fpc-pack
- endif
- endif
- # Maybe create default zipname from packagename
- ifndef ZIPNAME
- ifdef PACKAGENAME
- ZIPNAME=$(PACKAGEPREFIX)$(PACKAGENAME)$(PACKAGESUFFIX)
- endif
- endif
- # Use tar by default under linux
- ifndef USEZIP
- ifdef inlinux
- USETAR=1
- endif
- endif
- fpc_zipinstall:
- ifndef ZIPNAME
- @$(ECHO) "Please specify ZIPNAME!"
- @exit 1
- else
- $(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
- ifdef USETAR
- $(DEL) $(DESTZIPDIR)/$(ZIPNAME)$(TAREXT)
- cd $(PACKDIR) ; $(TARPROG) c$(TAROPT) --file $(DESTZIPDIR)/$(ZIPNAME)$(TAREXT) * ; cd $(BASEDIR)
- else
- $(DEL) $(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT)
- cd $(PACKDIR) ; $(ZIPPROG) -Dr $(ZIPOPT) $(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT) * ; cd $(BASEDIR)
- endif
- $(DELTREE) $(PACKDIR)
- endif
- #####################################################################
- # Clean rules
- #####################################################################
- .PHONY: fpc_clean fpc_cleanall fpc_distclean
- ifdef EXTRACLEANUNITS
- override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
- endif
- ifdef CLEANPPUFILES
- ifdef PPUFILES
- CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
- else
- CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
- endif
- endif
- fpc_clean: $(CLEANTARGET)
- ifdef CLEANEXEFILES
- -$(DEL) $(CLEANEXEFILES)
- endif
- ifdef CLEANPPUFILES
- -$(DEL) $(CLEANPPUFILES)
- endif
- ifneq ($(CLEANPPULINKFILES),)
- -$(DEL) $(CLEANPPULINKFILES)
- endif
- ifdef CLEANRSTFILES
- -$(DEL) $(CLEANRSTFILES)
- endif
- ifdef EXTRACLEANFILES
- -$(DEL) $(EXTRACLEANFILES)
- endif
- ifdef LIBNAME
- -$(DEL) $(LIBNAME) $(LIBFULLNAME)
- endif
- -$(DEL) $(FPCMADE) $(PPAS) link.res $(FPCEXTFILE) $(REDIRFILE)
- fpc_distclean: fpc_clean
- fpc_cleanall: $(CLEANTARGET)
- ifdef CLEANEXEFILES
- -$(DEL) $(CLEANEXEFILES)
- endif
- -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
- -$(DELTREE) *$(SMARTEXT)
- -$(DEL) $(FPCMADE) $(PPAS) link.res $(FPCEXTFILE) $(REDIRFILE)
- #####################################################################
- # Directories
- #####################################################################
- OBJECTDIRCOMPILER=1
- OBJECTDIRRTL=1
- OBJECTDIRUTILS=1
- OBJECTDIRFCL=1
- OBJECTDIRAPI=1
- OBJECTDIRFV=1
- OBJECTDIRPACKAGES=1
- OBJECTDIRIDE=1
- # Dir compiler
- ifdef OBJECTDIRCOMPILER
- .PHONY: compiler_all compiler_debug compiler_examples compiler_test compiler_smart compiler_shared compiler_showinstall compiler_install compiler_sourceinstall compiler_exampleinstall compiler_zipinstall compiler_zipsourceinstall compiler_zipexampleinstall compiler_clean compiler_distclean compiler_cleanall compiler_require compiler_info
- compiler_all:
- $(MAKE) -C compiler all
- compiler_debug:
- $(MAKE) -C compiler debug
- compiler_examples:
- $(MAKE) -C compiler examples
- compiler_test:
- $(MAKE) -C compiler test
- compiler_smart:
- $(MAKE) -C compiler smart
- compiler_shared:
- $(MAKE) -C compiler shared
- compiler_showinstall:
- $(MAKE) -C compiler showinstall
- compiler_install:
- $(MAKE) -C compiler install
- compiler_sourceinstall:
- $(MAKE) -C compiler sourceinstall
- compiler_exampleinstall:
- $(MAKE) -C compiler exampleinstall
- compiler_zipinstall:
- $(MAKE) -C compiler zipinstall
- compiler_zipsourceinstall:
- $(MAKE) -C compiler zipsourceinstall
- compiler_zipexampleinstall:
- $(MAKE) -C compiler zipexampleinstall
- compiler_clean:
- $(MAKE) -C compiler clean
- compiler_distclean:
- $(MAKE) -C compiler distclean
- compiler_cleanall:
- $(MAKE) -C compiler cleanall
- compiler_require:
- $(MAKE) -C compiler require
- compiler_info:
- $(MAKE) -C compiler info
- endif
- # Dir rtl
- ifdef OBJECTDIRRTL
- .PHONY: rtl_all rtl_debug rtl_examples rtl_test rtl_smart rtl_shared rtl_showinstall rtl_install rtl_sourceinstall rtl_exampleinstall rtl_zipinstall rtl_zipsourceinstall rtl_zipexampleinstall rtl_clean rtl_distclean rtl_cleanall rtl_require rtl_info
- rtl_all:
- $(MAKE) -C rtl all
- rtl_debug:
- $(MAKE) -C rtl debug
- rtl_examples:
- $(MAKE) -C rtl examples
- rtl_test:
- $(MAKE) -C rtl test
- rtl_smart:
- $(MAKE) -C rtl smart
- rtl_shared:
- $(MAKE) -C rtl shared
- rtl_showinstall:
- $(MAKE) -C rtl showinstall
- rtl_install:
- $(MAKE) -C rtl install
- rtl_sourceinstall:
- $(MAKE) -C rtl sourceinstall
- rtl_exampleinstall:
- $(MAKE) -C rtl exampleinstall
- rtl_zipinstall:
- $(MAKE) -C rtl zipinstall
- rtl_zipsourceinstall:
- $(MAKE) -C rtl zipsourceinstall
- rtl_zipexampleinstall:
- $(MAKE) -C rtl zipexampleinstall
- rtl_clean:
- $(MAKE) -C rtl clean
- rtl_distclean:
- $(MAKE) -C rtl distclean
- rtl_cleanall:
- $(MAKE) -C rtl cleanall
- rtl_require:
- $(MAKE) -C rtl require
- rtl_info:
- $(MAKE) -C rtl info
- endif
- # Dir utils
- ifdef OBJECTDIRUTILS
- .PHONY: utils_all utils_debug utils_examples utils_test utils_smart utils_shared utils_showinstall utils_install utils_sourceinstall utils_exampleinstall utils_zipinstall utils_zipsourceinstall utils_zipexampleinstall utils_clean utils_distclean utils_cleanall utils_require utils_info
- utils_all:
- $(MAKE) -C utils all
- utils_debug:
- $(MAKE) -C utils debug
- utils_examples:
- $(MAKE) -C utils examples
- utils_test:
- $(MAKE) -C utils test
- utils_smart:
- $(MAKE) -C utils smart
- utils_shared:
- $(MAKE) -C utils shared
- utils_showinstall:
- $(MAKE) -C utils showinstall
- utils_install:
- $(MAKE) -C utils install
- utils_sourceinstall:
- $(MAKE) -C utils sourceinstall
- utils_exampleinstall:
- $(MAKE) -C utils exampleinstall
- utils_zipinstall:
- $(MAKE) -C utils zipinstall
- utils_zipsourceinstall:
- $(MAKE) -C utils zipsourceinstall
- utils_zipexampleinstall:
- $(MAKE) -C utils zipexampleinstall
- utils_clean:
- $(MAKE) -C utils clean
- utils_distclean:
- $(MAKE) -C utils distclean
- utils_cleanall:
- $(MAKE) -C utils cleanall
- utils_require:
- $(MAKE) -C utils require
- utils_info:
- $(MAKE) -C utils info
- endif
- # Dir fcl
- ifdef OBJECTDIRFCL
- .PHONY: fcl_all fcl_debug fcl_examples fcl_test fcl_smart fcl_shared fcl_showinstall fcl_install fcl_sourceinstall fcl_exampleinstall fcl_zipinstall fcl_zipsourceinstall fcl_zipexampleinstall fcl_clean fcl_distclean fcl_cleanall fcl_require fcl_info
- fcl_all:
- $(MAKE) -C fcl all
- fcl_debug:
- $(MAKE) -C fcl debug
- fcl_examples:
- $(MAKE) -C fcl examples
- fcl_test:
- $(MAKE) -C fcl test
- fcl_smart:
- $(MAKE) -C fcl smart
- fcl_shared:
- $(MAKE) -C fcl shared
- fcl_showinstall:
- $(MAKE) -C fcl showinstall
- fcl_install:
- $(MAKE) -C fcl install
- fcl_sourceinstall:
- $(MAKE) -C fcl sourceinstall
- fcl_exampleinstall:
- $(MAKE) -C fcl exampleinstall
- fcl_zipinstall:
- $(MAKE) -C fcl zipinstall
- fcl_zipsourceinstall:
- $(MAKE) -C fcl zipsourceinstall
- fcl_zipexampleinstall:
- $(MAKE) -C fcl zipexampleinstall
- fcl_clean:
- $(MAKE) -C fcl clean
- fcl_distclean:
- $(MAKE) -C fcl distclean
- fcl_cleanall:
- $(MAKE) -C fcl cleanall
- fcl_require:
- $(MAKE) -C fcl require
- fcl_info:
- $(MAKE) -C fcl info
- endif
- # Dir api
- ifdef OBJECTDIRAPI
- .PHONY: api_all api_debug api_examples api_test api_smart api_shared api_showinstall api_install api_sourceinstall api_exampleinstall api_zipinstall api_zipsourceinstall api_zipexampleinstall api_clean api_distclean api_cleanall api_require api_info
- api_all:
- $(MAKE) -C api all
- api_debug:
- $(MAKE) -C api debug
- api_examples:
- $(MAKE) -C api examples
- api_test:
- $(MAKE) -C api test
- api_smart:
- $(MAKE) -C api smart
- api_shared:
- $(MAKE) -C api shared
- api_showinstall:
- $(MAKE) -C api showinstall
- api_install:
- $(MAKE) -C api install
- api_sourceinstall:
- $(MAKE) -C api sourceinstall
- api_exampleinstall:
- $(MAKE) -C api exampleinstall
- api_zipinstall:
- $(MAKE) -C api zipinstall
- api_zipsourceinstall:
- $(MAKE) -C api zipsourceinstall
- api_zipexampleinstall:
- $(MAKE) -C api zipexampleinstall
- api_clean:
- $(MAKE) -C api clean
- api_distclean:
- $(MAKE) -C api distclean
- api_cleanall:
- $(MAKE) -C api cleanall
- api_require:
- $(MAKE) -C api require
- api_info:
- $(MAKE) -C api info
- endif
- # Dir fv
- ifdef OBJECTDIRFV
- .PHONY: fv_all fv_debug fv_examples fv_test fv_smart fv_shared fv_showinstall fv_install fv_sourceinstall fv_exampleinstall fv_zipinstall fv_zipsourceinstall fv_zipexampleinstall fv_clean fv_distclean fv_cleanall fv_require fv_info
- fv_all:
- $(MAKE) -C fv all
- fv_debug:
- $(MAKE) -C fv debug
- fv_examples:
- $(MAKE) -C fv examples
- fv_test:
- $(MAKE) -C fv test
- fv_smart:
- $(MAKE) -C fv smart
- fv_shared:
- $(MAKE) -C fv shared
- fv_showinstall:
- $(MAKE) -C fv showinstall
- fv_install:
- $(MAKE) -C fv install
- fv_sourceinstall:
- $(MAKE) -C fv sourceinstall
- fv_exampleinstall:
- $(MAKE) -C fv exampleinstall
- fv_zipinstall:
- $(MAKE) -C fv zipinstall
- fv_zipsourceinstall:
- $(MAKE) -C fv zipsourceinstall
- fv_zipexampleinstall:
- $(MAKE) -C fv zipexampleinstall
- fv_clean:
- $(MAKE) -C fv clean
- fv_distclean:
- $(MAKE) -C fv distclean
- fv_cleanall:
- $(MAKE) -C fv cleanall
- fv_require:
- $(MAKE) -C fv require
- fv_info:
- $(MAKE) -C fv info
- endif
- # Dir packages
- ifdef OBJECTDIRPACKAGES
- .PHONY: packages_all packages_debug packages_examples packages_test packages_smart packages_shared packages_showinstall packages_install packages_sourceinstall packages_exampleinstall packages_zipinstall packages_zipsourceinstall packages_zipexampleinstall packages_clean packages_distclean packages_cleanall packages_require packages_info
- packages_all:
- $(MAKE) -C packages all
- packages_debug:
- $(MAKE) -C packages debug
- packages_examples:
- $(MAKE) -C packages examples
- packages_test:
- $(MAKE) -C packages test
- packages_smart:
- $(MAKE) -C packages smart
- packages_shared:
- $(MAKE) -C packages shared
- packages_showinstall:
- $(MAKE) -C packages showinstall
- packages_install:
- $(MAKE) -C packages install
- packages_sourceinstall:
- $(MAKE) -C packages sourceinstall
- packages_exampleinstall:
- $(MAKE) -C packages exampleinstall
- packages_zipinstall:
- $(MAKE) -C packages zipinstall
- packages_zipsourceinstall:
- $(MAKE) -C packages zipsourceinstall
- packages_zipexampleinstall:
- $(MAKE) -C packages zipexampleinstall
- packages_clean:
- $(MAKE) -C packages clean
- packages_distclean:
- $(MAKE) -C packages distclean
- packages_cleanall:
- $(MAKE) -C packages cleanall
- packages_require:
- $(MAKE) -C packages require
- packages_info:
- $(MAKE) -C packages info
- endif
- # Dir ide
- ifdef OBJECTDIRIDE
- .PHONY: ide_all ide_debug ide_examples ide_test ide_smart ide_shared ide_showinstall ide_install ide_sourceinstall ide_exampleinstall ide_zipinstall ide_zipsourceinstall ide_zipexampleinstall ide_clean ide_distclean ide_cleanall ide_require ide_info
- ide_all:
- $(MAKE) -C ide all
- ide_debug:
- $(MAKE) -C ide debug
- ide_examples:
- $(MAKE) -C ide examples
- ide_test:
- $(MAKE) -C ide test
- ide_smart:
- $(MAKE) -C ide smart
- ide_shared:
- $(MAKE) -C ide shared
- ide_showinstall:
- $(MAKE) -C ide showinstall
- ide_install:
- $(MAKE) -C ide install
- ide_sourceinstall:
- $(MAKE) -C ide sourceinstall
- ide_exampleinstall:
- $(MAKE) -C ide exampleinstall
- ide_zipinstall:
- $(MAKE) -C ide zipinstall
- ide_zipsourceinstall:
- $(MAKE) -C ide zipsourceinstall
- ide_zipexampleinstall:
- $(MAKE) -C ide zipexampleinstall
- ide_clean:
- $(MAKE) -C ide clean
- ide_distclean:
- $(MAKE) -C ide distclean
- ide_cleanall:
- $(MAKE) -C ide cleanall
- ide_require:
- $(MAKE) -C ide require
- ide_info:
- $(MAKE) -C ide info
- endif
- #####################################################################
- # Local Makefile
- #####################################################################
- ifneq ($(wildcard fpcmake.loc),)
- include fpcmake.loc
- endif
- #####################################################################
- # Users rules
- #####################################################################
- # These values can change
- unexport FPC_VERSION OS_SOURCE
- #####################################################################
- # Main targets
- #####################################################################
- .PHONY: help checkfpcdir
- help:
- @echo
- @echo Directory targets:
- @echo
- @echo $(DIROBJECTS)
- @echo
- @echo Packing targets are:
- @echo
- @echo go32v2zip,win32zip,linuxzip,sourcezip
- @echo
- @exit
- #####################################################################
- # Dependencies
- #####################################################################
- #######################################
- # Compiler
- #######################################
- .PHONY: compiler_cycle
- compiler_cycle:
- $(MAKE) -C compiler cycle
- #######################################
- # IDE
- #######################################
- .PHONY: ide_comp ide_full
- ide_comp:
- $(MAKE) -C compiler ppuclean
- $(MAKE) -C ide full
- # Look if libgdb.a is available then use fullgdb
- ifneq ($(wildcard packages/gdbint/libgdb/$(OS_TARGET)/libgdb.a),)
- ide_full:
- $(MAKE) -C compiler ppuclean
- $(MAKE) -C ide fullgdb
- else
- ide_full:
- $(MAKE) -C compiler ppuclean
- $(MAKE) -C ide full
- endif
- #######################################
- # Install targets
- #######################################
- demo_install:
- $(MAKE) -C $(CVSINSTALL)/demo sourceinstall
- man_install:
- $(MAKE) -C $(CVSINSTALL)/man installman
- doc_install:
- $(MAKE) -C $(CVSINSTALL)/doc installdoc
- #######################################
- # Packaging targets
- #######################################
- idezips: ide_fullzip ide_fullgdbzip optcompinstall optcompzip
- ide_compzip:
- $(MAKE) compiler_clean
- $(MAKE) ide_clean
- $(MAKE) ide_full
- $(MAKE) -C ide/text zipinstall ZIPNAME=ide-comp-$(PACKAGESUFFIX)
- ide_fullgdbzip:
- $(MAKE) ide_clean
- $(MAKE) ide_fullgdb
- $(MAKE) -C ide/text zipinstall ZIPNAME=ide-full-$(PACKAGESUFFIX)
- optcompinstall:
- $(MAKE) compiler_cycle OPT=-dNEWOPTIMIZATIONS
- $(MAKE) compiler_install
- $(MAKE) rtl_install
- optcompzip:
- $(MAKE) fpc_zipinstall PACKAGENAME=optcomp ZIPTARGET=optcompinstall
- ##########################################################################
- # Install
- ##########################################################################
- .PHONY: installer installersrc
- INSTALLERBUILDDIR=fpinst
- installer:
- $(COPYTREE) $(CVSINSTALL)/fpinst $(INSTALLERBUILDDIR)
- $(MAKE) -C $(INSTALLERBUILDDIR) all RELEASE=1
- $(MOVE) $(INSTALLERBUILDDIR)/install.exe .
- ifdef UPXPROG
- -$(UPXPROG) install.exe
- endif
- $(DELTREE) $(INSTALLERBUILDDIR)
- installersrc:
- $(COPYTREE) $(CVSINSTALL)/fpinst $(INSTALLERBUILDDIR)
- $(MAKE) -C $(INSTALLERBUILDDIR) zipsourceinstall
- $(DELTREE) $(INSTALLERBUILDDIR)
- ##########################################################################
- # Packaging
- ##########################################################################
- .PHONY: all clean distclean build install installbase zipinstall zipinstallbase zipinstallfcl \
- zipinstallpackages
- export RELEASE DESTZIPDIR
- all: build
- clean: $(addsuffix _distclean,$(DIROBJECTS))
- $(DEL) build-stamp.$(OS_TARGET)
- distclean: clean
- build: build-stamp.$(OS_TARGET)
- build-stamp.$(OS_TARGET):
- # create new compiler
- ifeq ($(OS_TARGET),win32)
- -$(MAKE) compiler_cycle
- else
- $(MAKE) compiler_cycle
- endif
- # clean
- $(MAKE) rtl_clean
- $(MAKE) api_clean
- $(MAKE) fcl_clean
- $(MAKE) packages_clean
- $(MAKE) utils_clean
- ifdef IDE
- $(MAKE) fv_clean
- $(MAKE) ide_clean
- endif
- # build everything
- $(MAKE) rtl_$(ALLTARGET) $(BUILDOPTS)
- $(MAKE) api_$(ALLTARGET) $(BUILDOPTS)
- $(MAKE) fcl_$(ALLTARGET) $(BUILDOPTS)
- $(MAKE) packages_$(ALLTARGET) $(BUILDOPTS)
- $(MAKE) utils_all $(BUILDOPTS)
- ifdef IDE
- -$(MAKE) ide_full $(BUILDOPTS)
- endif
- $(ECHO) Build > build-stamp.$(OS_TARGET)
- installbase: build-stamp.$(OS_TARGET)
- # create dirs
- $(MKDIR) $(BASEINSTALLDIR)
- $(MKDIR) $(DOCINSTALLDIR)
- $(MKDIR) $(BININSTALLDIR)
- ifndef SNAPSHOT
- # readme & whatsnew and docs
- $(COPY) $(CVSINSTALL)/doc/*.txt $(CVSINSTALL)/doc/copying* $(CVSINSTALL)/doc/faq.* $(DOCINSTALLDIR)
- # bingo32 (cwsdpmi,wmemu387.dxe)
- ifeq ($(OS_TARGET),go32v2)
- $(COPY) $(CVSINSTALL)/bingo32/* $(BININSTALLDIR)
- endif
- # binw32 (cygwin1.dll)
- ifeq ($(OS_TARGET),win32)
- $(COPY) $(CVSINSTALL)/binw32/* $(BININSTALLDIR)
- endif
- # manpages for linux
- ifeq ($(OS_TARGET),linux)
- $(MAKE) -C $(CVSINSTALL)/man installman
- endif
- endif
- # install generated things
- $(MAKE) compiler_install $(INSTALLOPTS)
- $(MAKE) rtl_install $(INSTALLOPTS)
- install: build-stamp.$(OS_TARGET)
- $(MAKE) installbase $(INSTALLOPTS)
- $(MAKE) utils_install $(INSTALLOPTS)
- $(MAKE) api_install $(INSTALLOPTS)
- $(MAKE) fcl_install $(INSTALLOPTS)
- $(MAKE) packages_install $(INSTALLOPTS)
- ifdef IDE
- $(NOSTOP)$(MAKE) ide_install $(BUILDOPTS)
- endif
- # install examples
- ifndef SNAPSHOT
- $(MAKE) fcl_exampleinstall $(INSTALLOPTS)
- $(MAKE) api_exampleinstall $(INSTALLOPTS)
- $(MAKE) packages_exampleinstall $(INSTALLOPTS)
- endif
- zipinstall: build-stamp.$(OS_TARGET)
- $(MAKE) fpc_zipinstall ZIPTARGET=installbase PACKAGENAME=base $(INSTALLOPTS)
- $(MAKE) utils_zipinstall $(INSTALLOPTS)
- $(MAKE) api_zipinstall $(INSTALLOPTS) PACKAGEPREFIX=$(PKGPRE)
- $(MAKE) fcl_zipinstall $(INSTALLOPTS) PACKAGEPREFIX=$(PKGPRE)
- $(MAKE) packages_zipinstall $(INSTALLOPTS) PACKAGEPREFIX=$(PKGPRE)
- ifdef IDE
- $(NOSTOP)$(MAKE) ide_zipinstall $(INSTALLOPTS)
- endif
- ifndef SNAPSHOT
- $(MAKE) fcl_zipexampleinstall $(INSTALLOPTS) PACKAGEPREFIX=$(PKGPRE)
- $(MAKE) api_zipexampleinstall $(INSTALLOPTS) PACKAGEPREFIX=$(PKGPRE)
- $(MAKE) packages_zipexampleinstall $(INSTALLOPTS) PACKAGEPREFIX=$(PKGPRE)
- endif
- ##########################################################################
- # Docs
- ##########################################################################
- .PHONY: docspdf docs docsrcinstall docsrc
- docspdf:
- $(MAKE) -C docs pdfinstall
- docs:
- $(MAKE) fpc_zipinstall ZIPTARGET=docspdf ZIPNAME=docs
- docsrcinstall:
- $(MAKE) -C docs clean
- $(MKDIR) $(SOURCEINSTALLDIR)
- $(COPYTREE) docs $(SOURCEINSTALLDIR)
- docsrc:
- $(MAKE) fpc_zipinstall ZIPTARGET=docsrcinstall ZIPNAME=docsrc
- ##########################################################################
- # Demos
- ##########################################################################
- .PHONY: demozip
- demozip:
- $(MAKE) -C $(CVSINSTALL)/demo zipsourceinstall ZIPNAME=demo
- ##########################################################################
- # Source targets
- ##########################################################################
- .PHONY: sourcebase sourcezip
- sourcebase:
- # base Makefiles needed for sources
- $(MKDIR) $(SOURCEINSTALLDIR)
- $(MKDIR) $(SOURCEINSTALLDIR)/rtl
- $(MKDIR) $(SOURCEINSTALLDIR)/packages
- $(COPY) Makefile* $(SOURCEINSTALLDIR)
- $(COPY) rtl/Makefile* $(SOURCEINSTALLDIR)/rtl
- $(COPY) packages/Makefile* $(SOURCEINSTALLDIR)/packages
- sourcezip:
- $(MAKE) fpc_zipinstall ZIPTARGET=sourcebase ZIPNAME=basesrc
- $(MAKE) compiler_zipsourceinstall
- $(MAKE) rtl_zipsourceinstall
- $(MAKE) api_zipsourceinstall
- $(MAKE) fcl_zipsourceinstall
- $(MAKE) packages_zipsourceinstall
- $(MAKE) utils_zipsourceinstall
- $(MAKE) ide_zipsourceinstall
- # $(MAKE) installersrc
- # $(MAKE) docsrc
- ##########################################################################
- # OS targets
- ##########################################################################
- .PHONY: go32v2 win32 linux go32v2zip win32zip linuxzip
- go32v2: checkfpcdir
- $(MAKE) install OS_TARGET=go32v2
- win32: checkfpcdir
- $(MAKE) install OS_TARGET=win32
- linux: checkfpcdir
- $(MAKE) install OS_TARGET=linux
- go32v2zip: checkfpcdir
- $(MAKE) zipinstall OS_TARGET=go32v2
- win32zip: checkfpcdir
- $(MAKE) zipinstall OS_TARGET=win32
- linuxzip: checkfpcdir
- $(MAKE) zipinstall OS_TARGET=linux
- ##########################################################################
- # Debian / RPM
- ##########################################################################
- .PHONY: debcopy deb rpmcopy rpm
- DEBSRCDIR:=/usr/src/fpc-$(FPC_VERSION)
- debcopy: distclean
- rm -rf $(DEBSRCDIR)
- install -d $(DEBSRCDIR)
- $(COPYTREE) compiler $(DEBSRCDIR)
- $(COPYTREE) rtl $(DEBSRCDIR)
- $(COPYTREE) fcl $(DEBSRCDIR)
- $(COPYTREE) api $(DEBSRCDIR)
- $(COPYTREE) packages $(DEBSRCDIR)
- $(COPYTREE) utils $(DEBSRCDIR)
- $(COPYTREE) logs $(DEBSRCDIR)
- $(COPYTREE) docs $(DEBSRCDIR)
- $(COPYTREE) base/Makefile* $(DEBSRCDIR)
- $(COPYTREE) $(CVSINSTALL)/debian $(DEBSRCDIR)
- $(COPYTREE) $(CVSINSTALL)/man $(DEBSRCDIR)
- $(COPYTREE) $(CVSINSTALL)/doc $(DEBSRCDIR)
- $(COPYTREE) $(CVSINSTALL)/demo $(DEBSRCDIR)
- find $(DEBSRCDIR) -name 'CVS*' | xargs -n1 rm -rf
- chmod 755 $(DEBSRCDIR)/debian/rules
- deb: checkfpcdir debcopy
- cd $(DEBSRCDIR) ; debian/rules binary
- REDHATDIR=/usr/src/redhat
- RPMSOURCESDIR:=$(REDHATDIR)/SOURCES
- RPMSPECDIR:=$(REDHATDIR)/SPECS
- RPMSRCDIR:=$(RPMSOURCESDIR)/fpc
- DOCSRCDIR:=$(RPMSOURCESDIR)/fpcdoc
- rpmcopy: distclean
- install -d $(REDHATDIR)
- install -d $(RPMSPECDIR)
- install -d $(RPMSOURCESDIR)
- # fpc.rpm
- rm -rf $(RPMSRCDIR)
- cp $(CVSINSTALL)/fpc-$(FPC_VERSION).spec $(RPMSPECDIR)
- install -d $(RPMSRCDIR)
- $(COPYTREE) compiler $(RPMSRCDIR)
- $(COPYTREE) rtl $(RPMSRCDIR)
- $(COPYTREE) fcl $(RPMSRCDIR)
- $(COPYTREE) api $(RPMSRCDIR)
- $(COPYTREE) packages $(RPMSRCDIR)
- $(COPYTREE) utils $(RPMSRCDIR)
- $(COPYTREE) logs $(RPMSRCDIR)
- $(COPYTREE) base/Makefile* $(RPMSRCDIR)
- $(COPYTREE) $(CVSINSTALL)/man $(RPMSRCDIR)
- $(COPYTREE) $(CVSINSTALL)/doc $(RPMSRCDIR)
- $(COPYTREE) $(CVSINSTALL)/demo $(RPMSRCDIR)
- find $(RPMSRCDIR) -name 'CVS*' | xargs -n1 rm -rf
- cd $(RPMSRCDIR) ; tar cvz * > $(RPMSOURCESDIR)/fpc-$(FPC_VERSION)-src.tar.gz
- # fpc-docs.rpm
- rm -rf $(DOCSRCDIR)
- cp $(CVSINSTALL)/fpc-docs-$(FPC_VERSION).spec $(RPMSPECDIR)
- install -d $(DOCSRCDIR)
- $(COPYTREE) docs $(DOCSRCDIR)
- find $(DOCSRCDIR) -name 'CVS*' | xargs -n1 rm -rf
- cd $(DOCSRCDIR) ; tar cvz * > $(RPMSOURCESDIR)/fpc-docs-$(FPC_VERSION)-src.tar.gz
- rpm: checkfpcdir rpmcopy
- cd $(RPMSPECDIR) ; rpm -ba fpc-$(FPC_VERSION).spec
- cd $(RPMSPECDIR) ; rpm -ba fpc-docs-$(FPC_VERSION).spec
|