2000-07-13 12:28:31 +02:00
|
|
|
#
|
|
|
|
# Makefile.fpc for Lazarus for Free Pascal
|
|
|
|
#
|
|
|
|
|
2001-08-14 01:34:05 +02:00
|
|
|
[package]
|
|
|
|
name=lazarus
|
2008-09-30 16:00:51 +02:00
|
|
|
version=$(IDEVERSION)
|
2001-08-14 01:34:05 +02:00
|
|
|
|
|
|
|
[require]
|
2007-10-17 00:47:51 +02:00
|
|
|
packages=regexpr
|
2001-08-14 01:34:05 +02:00
|
|
|
|
|
|
|
[target]
|
2012-04-09 15:41:22 +02:00
|
|
|
programs=lazarus startlazarus lazbuild
|
|
|
|
dirs=
|
2000-07-13 12:28:31 +02:00
|
|
|
|
2001-08-14 01:34:05 +02:00
|
|
|
[compiler]
|
2001-08-22 22:46:37 +02:00
|
|
|
|
2001-08-14 01:34:05 +02:00
|
|
|
[clean]
|
2010-09-27 13:41:47 +02:00
|
|
|
files=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) $(wildcard *.lfm)
|
2000-07-13 12:28:31 +02:00
|
|
|
|
2001-02-14 22:06:35 +01:00
|
|
|
[install]
|
2004-05-30 16:02:31 +02:00
|
|
|
fpcpackage=n
|
2003-04-16 22:04:56 +02:00
|
|
|
basedir=share/lazarus
|
2001-08-14 01:34:05 +02:00
|
|
|
|
2001-08-22 22:46:37 +02:00
|
|
|
[dist]
|
|
|
|
destdir=$(BASEDIR)/dist
|
2001-02-14 22:06:35 +01:00
|
|
|
|
2001-08-22 22:46:37 +02:00
|
|
|
[prerules]
|
2005-05-06 14:05:52 +02:00
|
|
|
RCPP?=$(strip $(firstword cpp$(SRCEXEEXT)))
|
2004-08-29 11:39:52 +02:00
|
|
|
#
|
2020-07-15 10:18:38 +02:00
|
|
|
ifndef LAZARUS_INSTALL_DIR
|
2006-09-15 00:47:54 +02:00
|
|
|
LAZARUS_INSTALL_DIR=$(INSTALL_PREFIX)/share/lazarus
|
2006-09-15 10:55:16 +02:00
|
|
|
INSTALL_MAN_DIR=$(INSTALL_PREFIX)/share/man
|
2006-05-01 23:47:48 +02:00
|
|
|
ifneq ($(findstring $(OS_TARGET),win32 win64),)
|
2005-09-16 17:36:27 +02:00
|
|
|
LAZARUS_INSTALL_DIR=C:\lazarus
|
2006-05-04 21:53:44 +02:00
|
|
|
endif
|
|
|
|
ifneq ($(findstring $(OS_TARGET),freebsd),)
|
2020-07-15 10:18:38 +02:00
|
|
|
LAZARUS_INSTALL_DIR=$(INSTALL_PREFIX)/local/lazarus
|
2005-09-16 17:36:27 +02:00
|
|
|
endif
|
2020-07-15 10:18:38 +02:00
|
|
|
endif
|
|
|
|
ifndef INSTALL_MAN_DIR
|
|
|
|
INSTALL_MAN_DIR=$(INSTALL_PREFIX)/share/man
|
|
|
|
endif
|
|
|
|
|
2008-09-30 16:00:51 +02:00
|
|
|
ifneq ($(findstring $(OS_TARGET),win32 win64),)
|
|
|
|
IDEVERSION=$(shell .\tools\install\get_lazarus_version.bat)
|
|
|
|
else
|
|
|
|
IDEVERSION=$(shell ./tools/install/get_lazarus_version.sh)
|
|
|
|
endif
|
2005-09-16 17:36:27 +02:00
|
|
|
|
2004-08-29 11:39:52 +02:00
|
|
|
#-----------------------------------------------------------------------------
|
2000-07-13 12:28:31 +02:00
|
|
|
[rules]
|
2022-01-16 21:20:00 +01:00
|
|
|
.PHONY: help registration tools lcl basecomponents bigidecomponents lazbuild ide idebig cleanide bigide useride starter lhelp all clean purge distclean install
|
2012-03-13 15:34:25 +01:00
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
help:
|
2012-03-15 22:48:18 +01:00
|
|
|
@$(ECHO)
|
2012-04-09 15:41:22 +02:00
|
|
|
@$(ECHO) " Main targets"
|
2012-04-10 13:23:30 +02:00
|
|
|
@$(ECHO) " Without any target, target 'all' will be invoked."
|
2016-12-16 15:01:30 +01:00
|
|
|
@$(ECHO) " all build all needed, i.e. minimal IDE, lazbuild, startlazarus."
|
|
|
|
@$(ECHO) " clean deletes files that 'bigide' creates. It does not clean up all possible"
|
2014-02-18 11:38:56 +01:00
|
|
|
@$(ECHO) " targets. Clean other target: make clean LCL_PLATFORM=qt"
|
|
|
|
@$(ECHO) " distclean Clean all targets and common leftovers."
|
2012-04-09 15:41:22 +02:00
|
|
|
@$(ECHO) " lazbuild build lazbuild and lcl with nogui widgetset"
|
2013-03-04 10:47:24 +01:00
|
|
|
@$(ECHO) " bigide as all, except that the IDE is built with a lot of extra packages"
|
2012-04-09 15:41:22 +02:00
|
|
|
@$(ECHO) " useride calls lazbuild to build an IDE with your active profile, requires lazbuild"
|
2012-04-10 13:52:45 +02:00
|
|
|
@$(ECHO) " install installs Lazarus under $(LAZARUS_INSTALL_DIR)"
|
|
|
|
@$(ECHO) " You can change the directory by appending INSTALL_PREFIX=/some/path"
|
2012-03-15 22:48:18 +01:00
|
|
|
@$(ECHO)
|
2012-04-09 15:41:22 +02:00
|
|
|
@$(ECHO) " Sub targets"
|
|
|
|
@$(ECHO) " registration build package FCL"
|
2020-03-22 12:58:11 +01:00
|
|
|
@$(ECHO) " basecomponents build buildintf, lazcontrols, ideintf, synedit, debuggerintf, lazdebuggergdbmi"
|
2022-01-16 21:20:00 +01:00
|
|
|
@$(ECHO) " for the LCL_PLATFORM, requires lcl"
|
2012-04-09 15:41:22 +02:00
|
|
|
@$(ECHO) " bigidecomponents build many extra packages for the LCL_PLATFORM, requires basecomponents"
|
2023-08-14 16:46:31 +02:00
|
|
|
@$(ECHO) " tools build lazres, svn2revisioninc, updatepofiles, lrstolfm,"
|
|
|
|
@$(ECHO) " requires LCL with nogui widgetset"
|
2012-06-23 19:14:00 +02:00
|
|
|
@$(ECHO) " lhelp build lhelp, requires bigidecomponents"
|
2012-04-09 15:41:22 +02:00
|
|
|
@$(ECHO) " starter build startlazarus, requires basecomponents"
|
2024-07-15 09:58:47 +02:00
|
|
|
@$(ECHO) " ide build ide with minimum of packages"
|
2012-04-09 15:41:22 +02:00
|
|
|
@$(ECHO)
|
2017-10-18 09:48:54 +02:00
|
|
|
@$(ECHO) " Flags:"
|
|
|
|
@$(ECHO) " PP=/path/to/fpc use another compiler"
|
|
|
|
@$(ECHO) " USESVN2REVISIONINC=0 do not update ide/revision.inc"
|
|
|
|
@$(ECHO) " INSTALL_PREFIX=/usr used by 'install' as path prefix"
|
|
|
|
@$(ECHO) " FPC_DIR=/usr/share/fpcsrc/3.0.4 used by fpcmake when regenerating Makefiles"
|
2017-10-18 09:51:34 +02:00
|
|
|
@$(ECHO) " OPT='-vwnbq -gh' append these options when calling the compiler"
|
2017-10-18 09:48:54 +02:00
|
|
|
@$(ECHO)
|
2012-04-09 15:41:22 +02:00
|
|
|
@$(ECHO) " Usage examples:"
|
2012-03-15 22:48:18 +01:00
|
|
|
@$(ECHO)
|
2023-08-14 16:46:31 +02:00
|
|
|
@$(ECHO) " Updating git and build a minimal IDE, startlazarus and lazbuild:"
|
2012-03-15 22:48:18 +01:00
|
|
|
@$(ECHO) " make clean"
|
2023-08-14 16:46:31 +02:00
|
|
|
@$(ECHO) " git pull"
|
2012-03-15 22:48:18 +01:00
|
|
|
@$(ECHO) " make clean all"
|
|
|
|
@$(ECHO)
|
|
|
|
@$(ECHO) " Note: You can start lazarus with 'startlazarus'"
|
|
|
|
@$(ECHO) " Note: Use the IDE or lazbuild to compile your projects/packages."
|
|
|
|
@$(ECHO)
|
2022-01-16 21:20:00 +01:00
|
|
|
@$(ECHO) " Updating git and build an IDE with your last set of packages:"
|
|
|
|
@$(ECHO) " make distclean"
|
|
|
|
@$(ECHO) " git pull"
|
2012-04-09 15:41:22 +02:00
|
|
|
@$(ECHO) " make clean lazbuild useride"
|
2012-03-15 22:48:18 +01:00
|
|
|
@$(ECHO)
|
2012-04-09 15:41:22 +02:00
|
|
|
@$(ECHO) " Clean up:"
|
2022-01-16 21:20:00 +01:00
|
|
|
@$(ECHO) " git restore ."
|
|
|
|
@$(ECHO) " make distclean"
|
2012-04-10 13:52:45 +02:00
|
|
|
@$(ECHO)
|
|
|
|
@$(ECHO) " Install:"
|
|
|
|
@$(ECHO) " Note: You can use Lazarus without installing. Just start the lazarus executable."
|
|
|
|
@$(ECHO) " 1. Build Lazarus as normal user with one of the above commands."
|
|
|
|
@$(ECHO) " 2. Install as root into /usr"
|
|
|
|
@$(ECHO) " sudo make install"
|
|
|
|
@$(ECHO) " This installs startlazarus, lazarus-ide, lazbuild under /usr/bin"
|
|
|
|
@$(ECHO) " and copies the whole lazarus source directory to /usr/share/lazarus"
|
|
|
|
@$(ECHO)
|
2012-03-15 22:48:18 +01:00
|
|
|
@exit
|
2009-10-15 09:13:30 +02:00
|
|
|
|
2011-10-17 11:24:01 +02:00
|
|
|
#-----------------------------------------------------------------------------
|
2012-04-09 15:41:22 +02:00
|
|
|
# build package FCL (shared by all LCL_PLATFORMs)
|
|
|
|
registration:
|
|
|
|
$(MAKE) -C packager/registration
|
|
|
|
|
2022-01-17 12:48:59 +01:00
|
|
|
#-----------------------------------------------------------------------------
|
2023-08-14 16:46:31 +02:00
|
|
|
# build package LCLBase and LCL for LCL_PLATFORM
|
|
|
|
# requires lazutils and freetypelaz
|
2022-12-01 23:03:48 +01:00
|
|
|
lcl:
|
2012-04-09 15:41:22 +02:00
|
|
|
$(MAKE) -C lcl
|
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
2023-08-14 16:46:31 +02:00
|
|
|
# build required LCL packages needed by IDE for the LCL_PLATFORM
|
|
|
|
# requires lazbuild (the non lcl packages are shared)
|
2022-12-01 23:03:48 +01:00
|
|
|
basecomponents:
|
2023-08-14 16:46:31 +02:00
|
|
|
$(MAKE) -C components lazbuildlclpackages
|
|
|
|
$(MAKE) -C components idepackages
|
2023-06-11 22:10:45 +02:00
|
|
|
$(MAKE) -C ide/packages/ideconfig
|
2024-07-15 11:23:20 +02:00
|
|
|
$(MAKE) -C ide/packages/ideutils
|
2024-04-11 00:39:24 +02:00
|
|
|
$(MAKE) -C ide/packages/idepackager
|
|
|
|
$(MAKE) -C ide/packages/ideproject
|
2022-01-16 21:20:00 +01:00
|
|
|
$(MAKE) -C ide/packages/idedebugger
|
2012-04-09 15:41:22 +02:00
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# build a lot of extra packages for the LCL_PLATFORM
|
|
|
|
# requires basecomponents
|
|
|
|
bigidecomponents:
|
|
|
|
$(MAKE) -C components bigide
|
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# build lazres, svn2revisioninc, updatepofiles, lrstolfm
|
|
|
|
# requires codetools and LCL with nogui widgetset
|
|
|
|
tools:
|
|
|
|
$(MAKE) -C tools
|
|
|
|
|
2012-04-12 09:36:37 +02:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# create/update ide/revision.inc
|
|
|
|
# requires tools
|
2022-12-01 23:03:48 +01:00
|
|
|
revisioninc:
|
2012-04-12 09:36:37 +02:00
|
|
|
$(MAKE) -C ide revisioninc
|
|
|
|
|
2012-04-09 15:41:22 +02:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# build lazarus exe with minimum of packages for the LCL_PLATFORM
|
|
|
|
# requires basecomponents and tools
|
2022-12-01 23:03:48 +01:00
|
|
|
ide:
|
2012-04-09 15:41:22 +02:00
|
|
|
$(MAKE) -C ide ide
|
2006-01-20 15:48:22 +01:00
|
|
|
|
2022-01-16 21:20:00 +01:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# needed by old IDE below 2.3.1
|
|
|
|
idepkg: ide
|
|
|
|
|
2006-01-20 15:48:22 +01:00
|
|
|
#-----------------------------------------------------------------------------
|
2012-04-09 15:41:22 +02:00
|
|
|
# build lazarus exe with bigide packages for the LCL_PLATFORM
|
|
|
|
# requires bigidecomponents and tools
|
2006-01-20 15:48:22 +01:00
|
|
|
idebig:
|
2006-01-14 17:48:09 +01:00
|
|
|
$(MAKE) -C ide bigide
|
2006-01-02 21:39:49 +01:00
|
|
|
|
2012-03-14 18:44:23 +01:00
|
|
|
#-----------------------------------------------------------------------------
|
2012-04-09 15:41:22 +02:00
|
|
|
# calls lazbuild to build lazarus and packages with user's settings
|
|
|
|
# requires lazbuild
|
|
|
|
# ignores LCL_PLATFORM and OPTS
|
|
|
|
useride:
|
2020-04-25 13:45:04 +02:00
|
|
|
ifdef LAZBUILDJOBS
|
|
|
|
ifdef LCL_PLATFORM
|
|
|
|
./lazbuild$(SRCEXEEXT) --max-process-count=$(LAZBUILDJOBS) --lazarusdir=. --build-ide= --ws=$(LCL_PLATFORM)
|
|
|
|
else
|
|
|
|
./lazbuild$(SRCEXEEXT) --max-process-count=$(LAZBUILDJOBS) --lazarusdir=. --build-ide=
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
ifdef LCL_PLATFORM
|
|
|
|
./lazbuild$(SRCEXEEXT) --lazarusdir=. --build-ide= --ws=$(LCL_PLATFORM)
|
|
|
|
else
|
|
|
|
./lazbuild$(SRCEXEEXT) --lazarusdir=. --build-ide=
|
|
|
|
endif
|
|
|
|
endif
|
2012-03-14 18:44:23 +01:00
|
|
|
|
2004-08-29 11:39:52 +02:00
|
|
|
#-----------------------------------------------------------------------------
|
2005-07-30 01:24:38 +02:00
|
|
|
starter:
|
2006-01-14 17:48:09 +01:00
|
|
|
$(MAKE) -C ide starter
|
2004-08-27 20:12:06 +02:00
|
|
|
|
2006-09-09 22:02:57 +02:00
|
|
|
#-----------------------------------------------------------------------------
|
2023-08-14 16:46:31 +02:00
|
|
|
lazbuild: registration
|
|
|
|
$(MAKE) -C components lazbuildpackages
|
2012-04-09 15:41:22 +02:00
|
|
|
$(MAKE) -C lcl LCL_PLATFORM=nogui
|
2023-08-14 16:46:31 +02:00
|
|
|
$(MAKE) -C components lazbuildlclpackages LCL_PLATFORM=nogui
|
2012-04-09 15:41:22 +02:00
|
|
|
$(MAKE) -C tools
|
2023-06-11 22:10:45 +02:00
|
|
|
$(MAKE) -C ide/packages/ideconfig LCL_PLATFORM=nogui
|
2024-04-13 13:46:14 +02:00
|
|
|
$(MAKE) -C ide/packages/ideutils LCL_PLATFORM=nogui
|
2024-04-11 00:39:24 +02:00
|
|
|
$(MAKE) -C ide/packages/idepackager LCL_PLATFORM=nogui
|
|
|
|
$(MAKE) -C ide/packages/ideproject LCL_PLATFORM=nogui
|
2009-06-03 16:22:07 +02:00
|
|
|
$(MAKE) -C ide lazbuilder LCL_PLATFORM=nogui
|
2006-09-09 22:02:57 +02:00
|
|
|
|
2012-06-23 19:14:00 +02:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# build lhelp
|
|
|
|
# requires bigidecomponents
|
|
|
|
lhelp:
|
|
|
|
$(MAKE) -C components/chmhelp/lhelp
|
|
|
|
|
2005-09-16 10:42:20 +02:00
|
|
|
#-----------------------------------------------------------------------------
|
2012-04-09 15:41:22 +02:00
|
|
|
# build lazarus,lcl,lazbuild,startlazarus with base packages for the LCL_PLATFORM
|
2012-05-20 10:24:13 +02:00
|
|
|
all: lazbuild lcl basecomponents ide starter
|
2001-02-21 00:12:25 +01:00
|
|
|
|
2004-08-29 11:39:52 +02:00
|
|
|
#-----------------------------------------------------------------------------
|
2013-03-04 10:48:23 +01:00
|
|
|
# build lazarus,lcl,lazbuild,startlazarus,lhelp with bigide packages for the LCL_PLATFORM
|
2012-06-23 19:14:00 +02:00
|
|
|
bigide: lazbuild lcl basecomponents bigidecomponents idebig starter lhelp
|
2001-08-02 14:58:35 +02:00
|
|
|
|
2004-08-29 11:39:52 +02:00
|
|
|
#-----------------------------------------------------------------------------
|
2002-05-10 15:05:25 +02:00
|
|
|
cleanide:
|
2006-01-14 17:48:09 +01:00
|
|
|
$(MAKE) -C ide cleanide
|
2002-05-10 15:05:25 +02:00
|
|
|
|
2012-03-14 14:10:26 +01:00
|
|
|
cleanlaz: cleanide
|
2012-04-09 15:41:22 +02:00
|
|
|
$(MAKE) -C packager/registration clean
|
2012-03-14 14:10:26 +01:00
|
|
|
$(MAKE) -C lcl cleanall
|
2012-03-15 16:26:05 +01:00
|
|
|
$(MAKE) -C components clean
|
2022-12-07 17:45:13 +01:00
|
|
|
$(MAKE) -C ide/packages/ideconfig clean
|
2024-04-13 13:46:14 +02:00
|
|
|
$(MAKE) -C ide/packages/ideutils clean
|
2024-04-11 00:39:24 +02:00
|
|
|
$(MAKE) -C ide/packages/idepackager clean
|
|
|
|
$(MAKE) -C ide/packages/ideproject clean
|
2022-11-13 13:23:46 +01:00
|
|
|
$(MAKE) -C ide/packages/idedebugger clean
|
2005-06-30 13:23:55 +02:00
|
|
|
|
2012-03-30 10:30:36 +02:00
|
|
|
clean: cleanlaz
|
|
|
|
$(MAKE) -C . cleanlaz LCL_PLATFORM=nogui
|
2012-04-09 15:41:22 +02:00
|
|
|
$(MAKE) -C tools clean
|
2012-03-30 10:30:36 +02:00
|
|
|
|
|
|
|
cleanbigide: clean
|
|
|
|
|
2014-02-18 18:37:14 +01:00
|
|
|
purge:
|
|
|
|
$(MAKE) -C ide distclean
|
|
|
|
$(MAKE) -C packager/registration distclean
|
|
|
|
$(MAKE) -C lcl distclean
|
|
|
|
$(MAKE) -C components distclean
|
2022-12-07 17:45:13 +01:00
|
|
|
$(MAKE) -C ide/packages/ideconfig distclean
|
2024-04-13 13:46:14 +02:00
|
|
|
$(MAKE) -C ide/packages/ideutils distclean
|
2024-04-11 00:39:24 +02:00
|
|
|
$(MAKE) -C ide/packages/idepackager distclean
|
|
|
|
$(MAKE) -C ide/packages/ideproject distclean
|
2022-11-13 13:23:46 +01:00
|
|
|
$(MAKE) -C ide/packages/idedebugger distclean
|
2014-02-18 18:37:14 +01:00
|
|
|
$(MAKE) -C tools distclean
|
2008-02-16 12:09:45 +01:00
|
|
|
# $(MAKE) -C doceditor clean
|
2004-08-16 13:11:12 +02:00
|
|
|
|
2008-02-16 12:09:45 +01:00
|
|
|
cleanall: purge
|
|
|
|
|
2014-02-18 18:37:14 +01:00
|
|
|
distclean: purge
|
|
|
|
|
2006-09-15 00:47:54 +02:00
|
|
|
# create dirs
|
|
|
|
installbase:
|
2008-09-30 16:00:51 +02:00
|
|
|
ifneq ($(findstring $(OS_TARGET),win32 win64),)
|
2006-09-15 00:47:54 +02:00
|
|
|
|
|
|
|
else
|
2007-12-29 12:50:14 +01:00
|
|
|
$(MKDIR) $(INSTALL_PREFIX)/share
|
|
|
|
$(MKDIR) $(INSTALL_PREFIX)/share/lazarus
|
2014-09-06 20:55:56 +02:00
|
|
|
$(MKDIR) $(INSTALL_PREFIX)/share/applications
|
|
|
|
$(MKDIR) $(INSTALL_PREFIX)/share/pixmaps
|
|
|
|
$(MKDIR) $(INSTALL_PREFIX)/share/mime/packages
|
|
|
|
$(MKDIR) $(INSTALL_PREFIX)/share/icons/hicolor/48x48/mimetypes
|
2007-12-29 12:50:14 +01:00
|
|
|
$(MKDIR) $(INSTALL_BINDIR)
|
|
|
|
$(MKDIR) $(INSTALL_MAN_DIR)
|
|
|
|
$(MKDIR) $(INSTALL_MAN_DIR)/man1
|
2006-09-15 00:47:54 +02:00
|
|
|
endif
|
2005-09-16 17:36:27 +02:00
|
|
|
#-----------------------------------------------------------------------------
|
2014-09-06 20:55:56 +02:00
|
|
|
# Most "make" users expect 'make install' to copy the binaries to somewhere
|
2012-03-14 18:44:23 +01:00
|
|
|
# Copy the lazarus tree to the install directory and set some links
|
2012-10-17 12:45:56 +02:00
|
|
|
# Copy everything except for 'debian' to avoid recursion and other platform files
|
2014-09-06 20:55:56 +02:00
|
|
|
install: installbase
|
2012-10-17 12:42:03 +02:00
|
|
|
$(COPYTREE) packager debugger designer converter ide images languages lazarus.app units $(LAZARUS_INSTALL_DIR)
|
2014-09-06 20:55:56 +02:00
|
|
|
$(COPYTREE) components docs doceditor examples lcl test tools $(LAZARUS_INSTALL_DIR)
|
2014-09-06 20:59:12 +02:00
|
|
|
$(COPYTREE) Makefile* *.txt $(LAZARUS_INSTALL_DIR)
|
2008-09-30 16:00:51 +02:00
|
|
|
ifneq ($(findstring $(OS_TARGET),win32 win64),)
|
2020-07-16 00:20:06 +02:00
|
|
|
$(COPYTREE) lazarus$(SRCEXEEXT) startlazarus$(SRCEXEEXT) lazbuild$(SRCEXEEXT) $(LAZARUS_INSTALL_DIR)
|
2005-09-16 17:36:27 +02:00
|
|
|
else
|
2020-07-16 00:20:06 +02:00
|
|
|
$(INSTALLEXE) lazarus$(SRCEXEEXT) startlazarus$(SRCEXEEXT) lazbuild$(SRCEXEEXT) $(LAZARUS_INSTALL_DIR)
|
2014-09-06 20:55:56 +02:00
|
|
|
|
|
|
|
# symlinks (they must be relative!)
|
2020-07-16 00:20:06 +02:00
|
|
|
ln -sf ../$(INSTALL_BASEDIR)/lazarus$(SRCEXEEXT) $(INSTALL_PREFIX)/bin/lazarus-ide$(SRCEXEEXT)
|
|
|
|
ln -sf ../$(INSTALL_BASEDIR)/startlazarus$(SRCEXEEXT) $(INSTALL_PREFIX)/bin/startlazarus$(SRCEXEEXT)
|
|
|
|
ln -sf ../$(INSTALL_BASEDIR)/lazbuild$(SRCEXEEXT) $(INSTALL_PREFIX)/bin/lazbuild$(SRCEXEEXT)
|
|
|
|
ln -sf ../$(INSTALL_BASEDIR)/tools/lazres$(SRCEXEEXT) $(INSTALL_PREFIX)/bin/lazres$(SRCEXEEXT)
|
|
|
|
ln -sf ../$(INSTALL_BASEDIR)/tools/lrstolfm$(SRCEXEEXT) $(INSTALL_PREFIX)/bin/lrstolfm$(SRCEXEEXT)
|
|
|
|
ln -sf ../$(INSTALL_BASEDIR)/tools/updatepofiles$(SRCEXEEXT) $(INSTALL_PREFIX)/bin/updatepofiles$(SRCEXEEXT)
|
2014-09-06 20:55:56 +02:00
|
|
|
|
|
|
|
# man pages
|
|
|
|
$(MAKE) -C install/man install PREFIX=$(INSTALL_PREFIX) GINSTALL=$(GINSTALL)
|
|
|
|
|
|
|
|
# start menu item
|
|
|
|
$(INSTALL) install/lazarus.desktop $(INSTALL_PREFIX)/share/applications/lazarus.desktop
|
|
|
|
$(INSTALL) images/icons/lazarus128x128.png $(INSTALL_PREFIX)/share/pixmaps/lazarus.png
|
|
|
|
|
|
|
|
# mime types and icons
|
|
|
|
$(INSTALL) install/lazarus-mime.xml $(INSTALL_PREFIX)/share/mime/packages/lazarus.xml
|
|
|
|
$(INSTALL) images/mimetypes/*.png $(INSTALL_PREFIX)/share/icons/hicolor/48x48/mimetypes/
|
|
|
|
|
|
|
|
# create missing directories (needed when rebuilding IDE without write permission)
|
|
|
|
$(MKDIR) $(LAZARUS_INSTALL_DIR)/units/$(FULL_TARGET)/nogui
|
|
|
|
$(MKDIR) $(LAZARUS_INSTALL_DIR)/units/$(FULL_TARGET)/gtk
|
|
|
|
$(MKDIR) $(LAZARUS_INSTALL_DIR)/units/$(FULL_TARGET)/gtk2
|
2023-08-14 16:46:31 +02:00
|
|
|
$(MKDIR) $(LAZARUS_INSTALL_DIR)/units/$(FULL_TARGET)/gtk3
|
|
|
|
$(MKDIR) $(LAZARUS_INSTALL_DIR)/units/$(FULL_TARGET)/gtk4
|
2014-09-06 20:55:56 +02:00
|
|
|
$(MKDIR) $(LAZARUS_INSTALL_DIR)/units/$(FULL_TARGET)/qt
|
2022-04-28 09:34:54 +02:00
|
|
|
$(MKDIR) $(LAZARUS_INSTALL_DIR)/units/$(FULL_TARGET)/qt5
|
2022-11-11 16:18:11 +01:00
|
|
|
$(MKDIR) $(LAZARUS_INSTALL_DIR)/units/$(FULL_TARGET)/qt6
|
2014-09-06 20:55:56 +02:00
|
|
|
$(MKDIR) $(LAZARUS_INSTALL_DIR)/components/synedit/design/languages
|
2005-09-16 17:36:27 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
2012-04-09 15:41:22 +02:00
|
|
|
##########################################################################
|
|
|
|
# Debian
|
|
|
|
##########################################################################
|
|
|
|
|
2010-09-26 13:11:24 +02:00
|
|
|
# Build dir
|
|
|
|
ifndef BUILDDIR
|
|
|
|
BUILDDIR=$(BASEDIR)/build
|
|
|
|
endif
|
|
|
|
|
2008-01-04 12:37:41 +01:00
|
|
|
ifeq ($(OS_TARGET),linux)
|
2007-12-29 12:50:14 +01:00
|
|
|
|
2008-03-22 11:47:07 +01:00
|
|
|
ifndef DEBDIR
|
|
|
|
DEBDIR=debian
|
|
|
|
endif
|
|
|
|
|
2007-12-29 12:50:14 +01:00
|
|
|
# Link Tree
|
|
|
|
ifdef LINKISCOPY
|
|
|
|
ifndef LINKTREE
|
2010-11-27 02:19:39 +01:00
|
|
|
LINKTREE:=$(CPPROG) -Rfpl
|
2007-12-29 12:50:14 +01:00
|
|
|
endif
|
|
|
|
else
|
|
|
|
ifndef LINKTREE
|
|
|
|
LINKTREE:=$(CPPROG) -Rfpl
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2008-03-22 11:47:07 +01:00
|
|
|
ifneq ($(wildcard ${DEBDIR}/changelog),)
|
2007-12-29 12:50:14 +01:00
|
|
|
|
|
|
|
.PHONY: debcopy deb
|
|
|
|
|
2008-03-22 11:47:07 +01:00
|
|
|
DEBPACKAGEVERSION:=$(shell head -n 1 ${DEBDIR}/changelog | awk '{ print $$2 }' | tr -d '[()]')
|
2009-11-18 11:08:19 +01:00
|
|
|
DEBVERSION=$(firstword $(subst -, ,${DEBPACKAGEVERSION}))
|
|
|
|
DEBBUILD=$(lastword $(subst -, ,${DEBPACKAGEVERSION}))
|
2010-11-27 02:19:39 +01:00
|
|
|
DEBSRC=${PACKAGE_NAME}-${DEBVERSION}
|
2009-11-18 11:08:19 +01:00
|
|
|
DEBSRCDIR=${BUILDDIR}/${DEBSRC}
|
2010-11-27 02:19:39 +01:00
|
|
|
DEBSRC_ORIG=${PACKAGE_NAME}_${DEBVERSION}.orig
|
2009-08-12 10:29:34 +02:00
|
|
|
BUILDDATE=$(shell /bin/date --utc +%Y%m%d)
|
2009-11-18 11:08:19 +01:00
|
|
|
ifdef MENTORS
|
2009-11-13 21:56:50 +01:00
|
|
|
DEB_BUILDPKG_OPT=-sa
|
2009-11-18 11:08:19 +01:00
|
|
|
else
|
|
|
|
DEB_BUILDPKG_OPT=
|
|
|
|
endif
|
|
|
|
ifeq (${DEBBUILD},0)
|
|
|
|
DEBUSESVN=1
|
|
|
|
endif
|
|
|
|
ifeq (${DEBBUILD},1)
|
|
|
|
DEBUSESVN=1
|
|
|
|
endif
|
2009-11-18 15:38:05 +01:00
|
|
|
ifdef SNAPSHOT
|
|
|
|
DEBUSESVN=1
|
|
|
|
endif
|
2009-11-13 21:56:50 +01:00
|
|
|
ifndef SIGN
|
|
|
|
DEB_BUILDPKG_OPT+= -us -uc
|
|
|
|
endif
|
2007-12-29 12:50:14 +01:00
|
|
|
|
|
|
|
debcheck:
|
2009-04-29 23:08:00 +02:00
|
|
|
ifneq ($(DEBVERSION),$(PACKAGE_VERSION))
|
2011-02-11 22:53:40 +01:00
|
|
|
! ${ECHO} "Debian version ($(DEBVERSION)) is not correct, expect $(PACKAGE_VERSION)"
|
|
|
|
endif
|
|
|
|
ifeq ($(wildcard ${DEBSRC_ORIG}.tar.gz),)
|
|
|
|
ifndef DEBUSESVN
|
|
|
|
! ${ECHO} 'Need "${DEBSRC_ORIG}.tar.gz" to build for DEBBUILD = "${DEBBUILD}" > 1'
|
|
|
|
endif
|
2007-12-29 12:50:14 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
debcopy: distclean
|
2009-11-18 11:08:19 +01:00
|
|
|
${DELTREE} ${BUILDDIR}
|
2010-11-27 02:19:39 +01:00
|
|
|
${MKDIRTREE} ${DEBSRCDIR}
|
2009-11-18 11:08:19 +01:00
|
|
|
ifdef DEBUSESVN
|
2010-11-27 02:19:39 +01:00
|
|
|
$(LINKTREE) -t $(DEBSRCDIR) \
|
|
|
|
Makefile.fpc COPYING.* README.txt \
|
|
|
|
components \
|
|
|
|
converter \
|
|
|
|
debugger \
|
|
|
|
designer \
|
|
|
|
doceditor \
|
|
|
|
docs \
|
|
|
|
install \
|
|
|
|
examples \
|
|
|
|
ide \
|
|
|
|
images \
|
|
|
|
languages \
|
|
|
|
lazarus.app \
|
|
|
|
lcl \
|
|
|
|
packager \
|
|
|
|
test \
|
2011-01-30 18:14:14 +01:00
|
|
|
tools
|
2007-12-29 12:50:14 +01:00
|
|
|
# add ide/revision.inc
|
|
|
|
echo "const RevisionStr = '${SVNVERSION}';" > $(DEBSRCDIR)/ide/revision.inc
|
2009-11-18 11:08:19 +01:00
|
|
|
else
|
|
|
|
tar -C ${BUILDDIR} -zxf ${DEBSRC_ORIG}.tar.gz ${DEBSRC}
|
|
|
|
${DELTREE} $(DEBSRCDIR)/debian
|
|
|
|
endif
|
2009-10-28 16:21:16 +01:00
|
|
|
|
|
|
|
debsetup:
|
2010-11-27 02:19:39 +01:00
|
|
|
$(COPYTREE) ${DEBDIR} $(DEBSRCDIR)/debian
|
2009-10-28 16:21:16 +01:00
|
|
|
ifdef SNAPSHOT
|
2011-05-30 10:30:58 +02:00
|
|
|
sed -e 's/${DEBPACKAGEVERSION}/${DEBPACKAGEVERSION}~${BUILDDATE}/' -i $(DEBSRCDIR)/debian/changelog
|
2009-10-28 16:21:16 +01:00
|
|
|
endif
|
2007-12-29 12:50:14 +01:00
|
|
|
chmod 755 $(DEBSRCDIR)/debian/rules
|
2010-11-27 02:19:39 +01:00
|
|
|
find $(DEBSRCDIR) -name '.svn' | xargs ${DELTREE}
|
2007-12-29 12:50:14 +01:00
|
|
|
|
|
|
|
debbuild:
|
2009-11-13 21:56:50 +01:00
|
|
|
cd ${DEBSRCDIR} ; dpkg-buildpackage ${DEB_BUILDPKG_OPT}
|
2009-10-28 16:21:16 +01:00
|
|
|
|
|
|
|
debcheckpolicy:
|
|
|
|
ifdef LINTIAN
|
2010-11-27 02:19:39 +01:00
|
|
|
cd ${DEBSRCDIR} ; lintian -I -i ../*.changes
|
2009-10-28 16:21:16 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
debclean:
|
2009-11-18 11:08:19 +01:00
|
|
|
ifndef DEBUSESVN
|
2010-09-26 13:11:24 +02:00
|
|
|
${DEL} ${BUILDDIR}/${DEBSRC_ORIG}.tar.gz
|
2009-11-18 11:08:19 +01:00
|
|
|
endif
|
2009-04-29 23:08:00 +02:00
|
|
|
mv -v -t . \
|
|
|
|
$(DEBSRCDIR)/../*.changes \
|
|
|
|
$(DEBSRCDIR)/../*.deb \
|
|
|
|
$(DEBSRCDIR)/../*.dsc \
|
2009-10-28 16:21:16 +01:00
|
|
|
$(DEBSRCDIR)/../*.gz
|
2009-11-18 11:08:19 +01:00
|
|
|
${DELTREE} $(DEBSRCDIR)
|
2008-06-23 01:04:53 +02:00
|
|
|
rmdir $(BUILDDIR)
|
2007-12-29 12:50:14 +01:00
|
|
|
|
2009-10-28 16:21:16 +01:00
|
|
|
deb: debcheck debcopy deborigtargz debsetup debbuild debcheckpolicy debclean
|
|
|
|
|
|
|
|
deborigtargz:
|
2009-11-18 11:08:19 +01:00
|
|
|
ifdef DEBUSESVN
|
2009-10-28 16:21:16 +01:00
|
|
|
#$(MAKE) fpc_zipinstall USETAR=y ZIPTARGET=debcopy PACKDIR=$(DEBSRCDIR) FULLZIPNAME=${DEBSRC_ORIG}
|
|
|
|
tar -C ${BUILDDIR} -zcf ${BUILDDIR}/${DEBSRC_ORIG}.tar.gz --exclude-vcs ${DEBSRC}
|
2009-11-18 11:08:19 +01:00
|
|
|
else
|
|
|
|
${LINKTREE} ${DEBSRC_ORIG}.tar.gz ${BUILDDIR}/${DEBSRC_ORIG}.tar.gz
|
|
|
|
endif
|
2007-12-29 12:50:14 +01:00
|
|
|
|
|
|
|
endif # changelog found
|
|
|
|
|
|
|
|
endif
|