mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-10 13:28:21 +02:00
150 lines
4.1 KiB
Makefile
150 lines
4.1 KiB
Makefile
#
|
|
# Makefile.fpc for Lazarus for Free Pascal
|
|
#
|
|
|
|
[package]
|
|
name=lazarus
|
|
version=0.9b
|
|
|
|
[require]
|
|
packages=fcl regexpr
|
|
# Adding lcl codetools synedit, adds the source paths.
|
|
|
|
[target]
|
|
programs=lazarus startlazarus
|
|
dirs=lcl components packager/registration ideintf designer packager
|
|
exampledirs=examples
|
|
|
|
[compiler]
|
|
options=-gl
|
|
unitdir=lcl/units/$(CPU_TARGET)/$(OS_TARGET) \
|
|
lcl/units/$(CPU_TARGET)/$(OS_TARGET)/$(LCL_PLATFORM) \
|
|
components/units/$(CPU_TARGET)/$(OS_TARGET) \
|
|
components/custom components/mpaslex \
|
|
ideintf/units/$(CPU_TARGET)/$(OS_TARGET) \
|
|
designer designer/units debugger \
|
|
packager packager/units/$(CPU_TARGET)/$(OS_TARGET) .
|
|
includedir=debugger designer packager include include/$(OS_TARGET)
|
|
targetdir=.
|
|
|
|
[clean]
|
|
files=$(wildcard ./designer/*$(OEXT)) $(wildcard ./designer/*$(PPUEXT)) \
|
|
$(wildcard ./debugger/*$(OEXT)) $(wildcard ./debugger/*$(PPUEXT)) \
|
|
$(wildcard ./packager/*$(OEXT)) $(wildcard ./packager/*$(PPUEXT)) \
|
|
$(wildcard ./doceditor/*$(OEXT)) $(wildcard ./doceditor/*$(PPUEXT))
|
|
|
|
[install]
|
|
fpcpackage=n
|
|
basedir=share/lazarus
|
|
|
|
[dist]
|
|
destdir=$(BASEDIR)/dist
|
|
|
|
[prerules]
|
|
RCPP?=$(strip $(firstword $(wildcard $(addsuffix /cpp$(SRCEXEEXT), $(SEARCHPATH)))))
|
|
#
|
|
# LCL Platform
|
|
ifndef LCL_PLATFORM
|
|
ifeq ($(OS_TARGET),win32)
|
|
LCL_PLATFORM=win32
|
|
else
|
|
LCL_PLATFORM=gtk
|
|
override COMPILER_UNITDIR+=lcl/nonwin32
|
|
endif
|
|
endif
|
|
export LCL_PLATFORM
|
|
#
|
|
# LibPaths
|
|
ifeq ($(OS_TARGET),darwin)
|
|
LAZARUS_LIBPATHS=-Fl/usr/X11R6/lib -Fl/sw/lib
|
|
endif
|
|
#
|
|
# user config
|
|
ifndef LAZARUS_CONFIG_DIR
|
|
ifeq ($(OS_TARGET),win32)
|
|
LAZARUS_CONFIG_DIR=.
|
|
else
|
|
LAZARUS_CONFIG_DIR=$(HOME)/.lazarus
|
|
endif
|
|
endif
|
|
export LAZARUS_CONFIG_DIR
|
|
#
|
|
# idemake.cfg
|
|
LAZARUS_IDE_CONFIG=$(LAZARUS_CONFIG_DIR)/idemake.cfg
|
|
LAZARUS_OPT=$(LAZARUS_LIBPATHS)
|
|
|
|
#
|
|
# apptype gui
|
|
ifeq ($(OS_TARGET),win32)
|
|
LAZARUS_OPT+= -WG
|
|
endif
|
|
|
|
#-----------------------------------------------------------------------------
|
|
[rules]
|
|
.PHONY: lcl components packager/registration ideintf packager ide idepkg starter tools all clean cleanide purge
|
|
.SUFFIXES: .rc .res
|
|
|
|
%.res: %.rc
|
|
windres -i $< -o $@ --preprocessor $(RCPP)
|
|
|
|
#-----------------------------------------------------------------------------
|
|
ide:
|
|
ifeq ($(OS_TARGET), win32)
|
|
$(MAKE) lazarus.res
|
|
endif
|
|
ifeq ($(LAZARUS_OPT),)
|
|
$(MAKE) --assume-new=lazarus.pp lazarus$(EXEEXT)
|
|
else
|
|
$(MAKE) --assume-new=lazarus.pp lazarus$(EXEEXT) OPT='$(OPT) $(LAZARUS_OPT)'
|
|
endif
|
|
|
|
#-----------------------------------------------------------------------------
|
|
idepkg:
|
|
$(MAKE) --assume-new=lazarus.pp lazarus$(EXEEXT) OPT='$(OPT) $(LAZARUS_OPT) @$(LAZARUS_IDE_CONFIG)'
|
|
|
|
#-----------------------------------------------------------------------------
|
|
starter:
|
|
ifeq ($(OS_TARGET), win32)
|
|
$(MAKE) startlazarus.res
|
|
endif
|
|
ifeq ($(LAZARUS_OPT),)
|
|
$(MAKE) --assume-new=startlazarus.lpr startlazarus$(EXEEXT)
|
|
else
|
|
$(MAKE) --assume-new=startlazarus.lpr startlazarus$(EXEEXT) OPT='$(OPT) $(LAZARUS_OPT)'
|
|
endif
|
|
|
|
#-----------------------------------------------------------------------------
|
|
tools: lcl components
|
|
$(MAKE) -C tools
|
|
|
|
#-----------------------------------------------------------------------------
|
|
all: lcl components packager/registration ideintf designer packager ide starter
|
|
|
|
#-----------------------------------------------------------------------------
|
|
cleanide:
|
|
-$(DEL) $(wildcard *$(OEXT))
|
|
-$(DEL) $(wildcard *$(PPUEXT))
|
|
-$(DEL) $(wildcard *$(RSTEXT))
|
|
-$(DEL) $(wildcard ./designer/*$(OEXT))
|
|
-$(DEL) $(wildcard ./designer/*$(PPUEXT))
|
|
-$(DEL) $(wildcard ./debugger/*$(OEXT))
|
|
-$(DEL) $(wildcard ./debugger/*$(PPUEXT))
|
|
-$(DEL) $(wildcard ./packager/*$(OEXT))
|
|
-$(DEL) $(wildcard ./packager/*$(PPUEXT))
|
|
-$(DEL) $(wildcard ./doceditor/*$(OEXT))
|
|
-$(DEL) $(wildcard ./doceditor/*$(PPUEXT))
|
|
ifeq ($(OS_TARGET), win32)
|
|
-$(DEL) $(wildcard *.res)
|
|
-$(DEL) lazarus.owr
|
|
endif
|
|
|
|
clean: cleanall cleanide
|
|
|
|
purge: cleanall cleanide
|
|
$(MAKE) -C examples clean
|
|
$(MAKE) -C tools clean
|
|
|
|
#install: $(INSTALLTARGET) $(addsuffix _install,$(TARGET_DIRS))
|
|
# end.
|
|
|