123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722 |
- #
- # Makefile generated by fpcmake v1.00 [2000/12/19]
- #
- defaultrule: all
- #####################################################################
- # Autodetect OS (Linux or Dos or Windows NT or OS/2)
- # define inUnix when running under Unix (Linux,FreeBSD)
- # define inWinNT when running under WinNT
- # define inOS2 when running under OS/2
- #####################################################################
- # 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
- inUnix=1
- PWD:=$(firstword $(PWD))
- endif
- else
- PWD:=$(firstword $(PWD))
- endif
- # Detect NT - NT sets OS to Windows_NT
- # Detect OS/2 - OS/2 has OS2_SHELL defined
- ifndef inUnix
- ifeq ($(OS),Windows_NT)
- inWinNT=1
- else
- ifdef OS2_SHELL
- inOS2=1
- endif
- endif
- endif
- # The extension of executables
- ifdef inUnix
- SRCEXEEXT=
- else
- SRCEXEEXT=.exe
- endif
- # The path which is searched separated by spaces
- ifdef inUnix
- 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
- FPC=ppc386
- endif
- endif
- override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
- override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
- # 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
- #####################################################################
- # 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 inUnix
- 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 fake text)
- # Clean
- # Install
- PACKAGENAME=ide
- 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$(SRCEXEEXT),$(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 inUnix
- INSTALL:=install -c -m 644
- else
- INSTALL:=$(COPY)
- endif
- endif
- # To install programs
- ifndef INSTALLEXE
- ifdef inUnix
- INSTALLEXE:=install -c -m 755
- else
- INSTALLEXE:=$(COPY)
- endif
- endif
- # To make a directory.
- ifndef MKDIR
- ifdef inUnix
- 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 inUnix
- PPAS=ppas.sh
- else
- ifdef inOS2
- PPAS=ppas.cmd
- else
- PPAS=ppas.bat
- endif
- endif
- # ldconfig to rebuild .so cache
- ifdef inUnix
- LDCONFIG=ldconfig
- else
- LDCONFIG=
- endif
- # ZipProg, you can't use Zip as the var name (PFV)
- ifndef ZIPPROG
- ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH))))
- ifeq ($(ZIPPROG),)
- ZIPPROG=
- else
- ZIPPROG:=$(firstword $(ZIPPROG))
- endif
- endif
- export ZIPPROG
- ZIPOPT=-9
- ZIPEXT=.zip
- # Tar
- ifndef TARPROG
- TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(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 Directories
- #####################################################################
- # Linux and freebsd use unix dirs with /usr/bin, /usr/lib
- # When zipping use the target as default, when normal install then
- # use the source os as default
- ifdef ZIPNAME
- # Zipinstall
- ifeq ($(OS_TARGET),linux)
- UNIXINSTALLDIR=1
- endif
- ifeq ($(OS_TARGET),freebsd)
- UNIXINSTALLDIR=1
- endif
- else
- # Normal install
- ifeq ($(OS_SOURCE),linux)
- UNIXINSTALLDIR=1
- endif
- ifeq ($(OS_SOURCE),freebsd)
- UNIXINSTALLDIR=1
- endif
- endif
- # set the prefix directory where to install everything
- ifndef PREFIXINSTALLDIR
- ifdef UNIXINSTALLDIR
- 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 UNIXINSTALLDIR
- BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
- else
- BASEINSTALLDIR=$(PREFIXINSTALLDIR)
- endif
- endif
- # set the directory where to install the binaries
- ifndef BININSTALLDIR
- ifdef UNIXINSTALLDIR
- 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 UNIXINSTALLDIR
- LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
- else
- LIBINSTALLDIR=$(UNITINSTALLDIR)
- endif
- endif
- # Where the source files will be stored
- ifndef SOURCEINSTALLDIR
- ifdef UNIXINSTALLDIR
- 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 UNIXINSTALLDIR
- 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 UNIXINSTALLDIR
- 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 inUnix
- 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,text)
- install: $(addsuffix _install,text)
- sourceinstall: fpc_sourceinstall
- zipinstall: fpc_zipinstall
- zipsourceinstall: fpc_zipsourceinstall
- clean: $(addsuffix _clean,$(DIROBJECTS))
- distclean: $(addsuffix _distclean,$(DIROBJECTS))
- cleanall: $(addsuffix _cleanall,$(DIROBJECTS))
- require: $(addsuffix _require,$(DIROBJECTS))
- .PHONY: debug smart shared showinstall install sourceinstall zipinstall zipsourceinstall clean distclean cleanall require
- #####################################################################
- # SourceInstall rules
- #####################################################################
- .PHONY: fpc_sourceinstall
- ifndef SOURCETOPDIR
- SOURCETOPDIR=$(BASEDIR)
- endif
- fpc_sourceinstall: clean
- $(MKDIR) $(SOURCEINSTALLDIR)
- $(COPYTREE) $(SOURCETOPDIR) $(SOURCEINSTALLDIR)
- #####################################################################
- # 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
- ifeq ($(OS_TARGET),os2)
- PACKAGESUFFIX=emx
- endif
- endif
- # Temporary path to pack a file
- ifndef PACKDIR
- ifndef inUnix
- 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 inUnix
- 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) cf$(TAROPT) $(DESTZIPDIR)/$(ZIPNAME)$(TAREXT) * ; cd $(BASEDIR)
- else
- $(DEL) $(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT)
- cd $(PACKDIR) ; $(ZIPPROG) -Dr $(ZIPOPT) $(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT) * ; cd $(BASEDIR)
- endif
- $(DELTREE) $(PACKDIR)
- endif
- .PHONY: fpc_zipsourceinstall
- fpc_zipsourceinstall:
- $(MAKE) fpc_zipinstall ZIPTARGET=sourceinstall PACKAGESUFFIX=src
- #####################################################################
- # Directories
- #####################################################################
- OBJECTDIRFAKE=1
- OBJECTDIRTEXT=1
- # Dir fake
- ifdef OBJECTDIRFAKE
- .PHONY: fake_all fake_debug fake_examples fake_test fake_smart fake_shared fake_showinstall fake_install fake_sourceinstall fake_exampleinstall fake_zipinstall fake_zipsourceinstall fake_zipexampleinstall fake_clean fake_distclean fake_cleanall fake_require fake_info
- fake_all:
- $(MAKE) -C fake all
- fake_debug:
- $(MAKE) -C fake debug
- fake_examples:
- $(MAKE) -C fake examples
- fake_test:
- $(MAKE) -C fake test
- fake_smart:
- $(MAKE) -C fake smart
- fake_shared:
- $(MAKE) -C fake shared
- fake_showinstall:
- $(MAKE) -C fake showinstall
- fake_install:
- $(MAKE) -C fake install
- fake_sourceinstall:
- $(MAKE) -C fake sourceinstall
- fake_exampleinstall:
- $(MAKE) -C fake exampleinstall
- fake_zipinstall:
- $(MAKE) -C fake zipinstall
- fake_zipsourceinstall:
- $(MAKE) -C fake zipsourceinstall
- fake_zipexampleinstall:
- $(MAKE) -C fake zipexampleinstall
- fake_clean:
- $(MAKE) -C fake clean
- fake_distclean:
- $(MAKE) -C fake distclean
- fake_cleanall:
- $(MAKE) -C fake cleanall
- fake_require:
- $(MAKE) -C fake require
- fake_info:
- $(MAKE) -C fake info
- endif
- # Dir text
- ifdef OBJECTDIRTEXT
- .PHONY: text_all text_debug text_examples text_test text_smart text_shared text_showinstall text_install text_sourceinstall text_exampleinstall text_zipinstall text_zipsourceinstall text_zipexampleinstall text_clean text_distclean text_cleanall text_require text_info
- text_all:
- $(MAKE) -C text all
- text_debug:
- $(MAKE) -C text debug
- text_examples:
- $(MAKE) -C text examples
- text_test:
- $(MAKE) -C text test
- text_smart:
- $(MAKE) -C text smart
- text_shared:
- $(MAKE) -C text shared
- text_showinstall:
- $(MAKE) -C text showinstall
- text_install:
- $(MAKE) -C text install
- text_sourceinstall:
- $(MAKE) -C text sourceinstall
- text_exampleinstall:
- $(MAKE) -C text exampleinstall
- text_zipinstall:
- $(MAKE) -C text zipinstall
- text_zipsourceinstall:
- $(MAKE) -C text zipsourceinstall
- text_zipexampleinstall:
- $(MAKE) -C text zipexampleinstall
- text_clean:
- $(MAKE) -C text clean
- text_distclean:
- $(MAKE) -C text distclean
- text_cleanall:
- $(MAKE) -C text cleanall
- text_require:
- $(MAKE) -C text require
- text_info:
- $(MAKE) -C text info
- endif
- #####################################################################
- # Local Makefile
- #####################################################################
- ifneq ($(wildcard fpcmake.loc),)
- include fpcmake.loc
- endif
- #####################################################################
- # Users rules
- #####################################################################
- .PHONY: gdb full fullgdb clean_compiler
- all:
- $(MAKE) -C text all
- gdb:
- $(MAKE) -C text all GDB=1
- full:
- $(MAKE) -C text all FULL=1 "NEEDOPT+=-Sg -dGDB -dBROWSERCOL"
- fullgdb:
- $(MAKE) -C text all FULL=1 GDB=1 "NEEDOPT+=-Sg -dGDB -dBROWSERCOL"
- #
- # Misc
- #
- clean_compiler:
- $(MAKE) -C ../compiler clean
|