mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-25 14:09:11 +02:00
1142 lines
21 KiB
Makefile
1142 lines
21 KiB
Makefile
#
|
|
# Makefile generated by fpcmake v0.99.13 [2000/01/18]
|
|
#
|
|
|
|
defaultrule: info
|
|
|
|
#####################################################################
|
|
# 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$(EXEEXT)
|
|
else
|
|
FPC=ppc386$(EXEEXT)
|
|
endif
|
|
endif
|
|
endif
|
|
override FPC:=$(subst \,/,$(FPC))
|
|
|
|
# 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),)
|
|
override FPCDIR=wrong
|
|
endif
|
|
else
|
|
override FPCDIR=wrong
|
|
endif
|
|
|
|
# Default FPCDIR
|
|
ifeq ($(FPCDIR),wrong)
|
|
override FPCDIR=$(BASEDIR)
|
|
ifeq ($(wildcard $(FPCDIR)/rtl),)
|
|
override FPCDIR=wrong
|
|
endif
|
|
endif
|
|
|
|
# Detect FPCDIR
|
|
ifeq ($(FPCDIR),wrong)
|
|
ifdef inlinux
|
|
override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)
|
|
else
|
|
override FPCDIR:=$(subst /$(FPC)$(EXEEXT),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC)$(EXEEXT),$(SEARCHPATH))))))
|
|
endif
|
|
endif
|
|
|
|
#####################################################################
|
|
# User Settings
|
|
#####################################################################
|
|
|
|
|
|
# Targets
|
|
|
|
override DIROBJECTS+=$(wildcard compiler rtl utils fcl api fv packages ide)
|
|
|
|
# Clean
|
|
|
|
|
|
# Install
|
|
|
|
ZIPTARGET=install
|
|
|
|
# Defaults
|
|
|
|
|
|
# Directories
|
|
|
|
|
|
# Packages
|
|
|
|
|
|
# Libraries
|
|
|
|
|
|
#####################################################################
|
|
# Post Settings
|
|
#####################################################################
|
|
|
|
export RELEASE=1
|
|
|
|
#####################################################################
|
|
# 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
|
|
|
|
# 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 the some extra (data)files will be stored
|
|
ifndef DATAINSTALLDIR
|
|
DATAINSTALLDIR=$(BASEINSTALLDIR)
|
|
endif
|
|
|
|
#####################################################################
|
|
# Redirection
|
|
#####################################################################
|
|
|
|
# Release ? Then force OPT and don't use extra opts via commandline
|
|
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
|
|
#####################################################################
|
|
|
|
all: $(addsuffix _all,$(DIROBJECTS))
|
|
|
|
debug: $(addsuffix _debug,$(DIROBJECTS))
|
|
|
|
examples: $(addsuffix _examples,$(DIROBJECTS))
|
|
|
|
test: $(addsuffix _test,$(DIROBJECTS))
|
|
|
|
smart: $(addsuffix _smart,$(DIROBJECTS))
|
|
|
|
shared: $(addsuffix _shared,$(DIROBJECTS))
|
|
|
|
showinstall: $(addsuffix _showinstall,$(DIROBJECTS))
|
|
|
|
install: $(addsuffix _install,$(DIROBJECTS))
|
|
|
|
sourceinstall: $(addsuffix _sourceinstall,$(DIROBJECTS))
|
|
|
|
zipinstall: fpc_zipinstall
|
|
|
|
zipsourceinstall: fpc_zipsourceinstall
|
|
|
|
clean: $(addsuffix _clean,$(DIROBJECTS))
|
|
|
|
cleanall: $(addsuffix _cleanall,$(DIROBJECTS))
|
|
|
|
require: $(addsuffix _require,$(DIROBJECTS))
|
|
|
|
.PHONY: all debug examples test smart shared showinstall install sourceinstall zipinstall zipsourceinstall clean 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
|
|
|
|
#####################################################################
|
|
# 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_zipinstall compiler_zipsourceinstall compiler_clean 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_zipinstall:
|
|
$(MAKE) -C compiler zipinstall
|
|
|
|
compiler_zipsourceinstall:
|
|
$(MAKE) -C compiler zipsourceinstall
|
|
|
|
compiler_clean:
|
|
$(MAKE) -C compiler clean
|
|
|
|
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_zipinstall rtl_zipsourceinstall rtl_clean 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_zipinstall:
|
|
$(MAKE) -C rtl zipinstall
|
|
|
|
rtl_zipsourceinstall:
|
|
$(MAKE) -C rtl zipsourceinstall
|
|
|
|
rtl_clean:
|
|
$(MAKE) -C rtl clean
|
|
|
|
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_zipinstall utils_zipsourceinstall utils_clean 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_zipinstall:
|
|
$(MAKE) -C utils zipinstall
|
|
|
|
utils_zipsourceinstall:
|
|
$(MAKE) -C utils zipsourceinstall
|
|
|
|
utils_clean:
|
|
$(MAKE) -C utils clean
|
|
|
|
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_zipinstall fcl_zipsourceinstall fcl_clean 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_zipinstall:
|
|
$(MAKE) -C fcl zipinstall
|
|
|
|
fcl_zipsourceinstall:
|
|
$(MAKE) -C fcl zipsourceinstall
|
|
|
|
fcl_clean:
|
|
$(MAKE) -C fcl clean
|
|
|
|
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_zipinstall api_zipsourceinstall api_clean 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_zipinstall:
|
|
$(MAKE) -C api zipinstall
|
|
|
|
api_zipsourceinstall:
|
|
$(MAKE) -C api zipsourceinstall
|
|
|
|
api_clean:
|
|
$(MAKE) -C api clean
|
|
|
|
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_zipinstall fv_zipsourceinstall fv_clean 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_zipinstall:
|
|
$(MAKE) -C fv zipinstall
|
|
|
|
fv_zipsourceinstall:
|
|
$(MAKE) -C fv zipsourceinstall
|
|
|
|
fv_clean:
|
|
$(MAKE) -C fv clean
|
|
|
|
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_zipinstall packages_zipsourceinstall packages_clean 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_zipinstall:
|
|
$(MAKE) -C packages zipinstall
|
|
|
|
packages_zipsourceinstall:
|
|
$(MAKE) -C packages zipsourceinstall
|
|
|
|
packages_clean:
|
|
$(MAKE) -C packages clean
|
|
|
|
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_zipinstall ide_zipsourceinstall ide_clean 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_zipinstall:
|
|
$(MAKE) -C ide zipinstall
|
|
|
|
ide_zipsourceinstall:
|
|
$(MAKE) -C ide zipsourceinstall
|
|
|
|
ide_clean:
|
|
$(MAKE) -C ide clean
|
|
|
|
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
|
|
#####################################################################
|
|
|
|
#####################################################################
|
|
# Main targets
|
|
#####################################################################
|
|
|
|
.PHONY: compiler_cycle \
|
|
idezips ide_allzip ide_gdbzip ide_fullzip ide_fullgdbzip \
|
|
fclzip gtkzip fvzip compilerzip utilszip
|
|
|
|
info:
|
|
@echo
|
|
@echo Please use one of the following targets:
|
|
@echo
|
|
@echo $(DIROBJECTS)
|
|
@echo
|
|
@echo All targets can follow after a _ with:
|
|
@echo all,clean,install,staticinstall,sharedinstall
|
|
@echo
|
|
@echo example: make api_staticinstall
|
|
@exit
|
|
|
|
#####################################################################
|
|
# Dependencies
|
|
#####################################################################
|
|
|
|
#######################################
|
|
# Compiler
|
|
#######################################
|
|
|
|
compiler_cycle:
|
|
$(MAKE) -C compiler cycle
|
|
|
|
#######################################
|
|
# IDE
|
|
#######################################
|
|
|
|
ide_gdb:
|
|
$(MAKE) -C ide gdb
|
|
|
|
ide_full:
|
|
$(MAKE) -C ide full
|
|
|
|
ide_fullgdb:
|
|
$(MAKE) -C ide fullgdb
|
|
|
|
|
|
#######################################
|
|
# Install targets
|
|
#######################################
|
|
|
|
demo_install:
|
|
$(MAKE) -C demo installexamples
|
|
|
|
man_install:
|
|
$(MAKE) -C man installman
|
|
|
|
doc_install:
|
|
$(MAKE) -C doc installdoc
|
|
|
|
|
|
#######################################
|
|
# Packaging targets
|
|
#######################################
|
|
|
|
ifndef DESTZIPDIR
|
|
export DESTZIPDIR:=$(BASEDIR)
|
|
endif
|
|
|
|
idezips: clean ide_allzip ide_gdbzip ide_fullzip ide_fullgdbzip
|
|
|
|
ide_allzip:
|
|
$(MAKE) ide_clean
|
|
$(MAKE) ide_all
|
|
$(MAKE) -C ide/text zipinstall ZIPNAME=ide-fake-$(PACKAGESUFFIX)
|
|
ide_gdbzip:
|
|
$(MAKE) ide_clean
|
|
$(MAKE) ide_gdb
|
|
$(MAKE) -C ide/text zipinstall ZIPNAME=ide-gdb-$(PACKAGESUFFIX)
|
|
ide_fullzip:
|
|
$(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)
|
|
|
|
fvzip: rtl_clean
|
|
$(MAKE) api_clean
|
|
$(MAKE) fv_clean
|
|
$(MAKE) fv_all
|
|
$(MAKE) zipinstall ZIPTARGET='api_install fv_install' ZIPNAME=fv-$(PACKAGESUFFIX)
|
|
|
|
gtkzip: rtl_clean
|
|
$(MAKE) -C packages gtk_clean
|
|
$(MAKE) -C packages gtk_all
|
|
$(MAKE) -C packages gtk_zipinstall ZIPNAME=gtk-$(PACKAGESUFFIX)
|
|
|
|
compilerzip:
|
|
# compiler_clean rtl_clean
|
|
$(MAKE) rtl_all
|
|
$(MAKE) compiler_all
|
|
$(MAKE) zipinstall ZIPTARGET='compiler_install rtl_install' ZIPNAME=compiler-$(PACKAGESUFFIX)
|
|
|
|
fclzip: rtl_clean fcl_clean
|
|
$(MAKE) fcl_all
|
|
$(MAKE) fcl_zipinstall ZIPNAME=fcl-$(PACKAGESUFFIX)
|
|
|
|
utilszip: utils_clean rtl_clean fcl_clean
|
|
$(MAKE) utils_all
|
|
$(MAKE) utils_zipinstall ZIPNAME=utils-$(PACKAGESUFFIX)
|