mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 22:28:12 +02:00
100 lines
2.3 KiB
Makefile
100 lines
2.3 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
|
|
dirs=lcl components designer packager
|
|
exampledirs=examples
|
|
|
|
[compiler]
|
|
options=-gl
|
|
unitdir=lcl/units lcl/units/$(LCL_PLATFORM) \
|
|
components/units components/custom components/mpaslex \
|
|
designer designer/units debugger packager packager/units .
|
|
includedir=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))
|
|
|
|
[install]
|
|
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
|
|
# 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
|
|
|
|
[rules]
|
|
.PHONY: lcl components ide idepkg tools all clean
|
|
.SUFFIXES: .rc .res
|
|
|
|
%.res: %.rc
|
|
windres -i $< -o $@ --preprocessor $(RCPP)
|
|
|
|
ide:
|
|
ifeq ($(OS_TARGET), win32)
|
|
$(MAKE) lazarus.res
|
|
endif
|
|
$(MAKE) --assume-new=lazarus.pp lazarus$(EXEEXT)
|
|
|
|
idepkg:
|
|
$(MAKE) --assume-new=lazarus.pp lazarus$(EXEEXT) OPT='$(OPT) @$(LAZARUS_IDE_CONFIG)'
|
|
|
|
tools: lcl components
|
|
$(MAKE) -C tools
|
|
|
|
all: lcl components designer packager ide
|
|
|
|
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))
|
|
ifeq ($(OS_TARGET), win32)
|
|
$(DEL) $(wildcard *.res)
|
|
$(DEL) lazarus.owr
|
|
endif
|
|
|
|
clean: cleanall cleanide
|
|
# end.
|
|
|