# # Makefile.fpc for Lazarus for Free Pascal # [package] name=lazaruside version=0.9b [require] packages=fcl regexpr [target] programs=lazarus startlazarus lazbuild [compiler] options=-gl unittargetdir=../units/$(CPU_TARGET)-$(OS_TARGET) unitdir=../lcl/units/$(CPU_TARGET)-$(OS_TARGET) \ ../lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM) \ ../components/codetools/units/$(CPU_TARGET)-$(OS_TARGET) \ ../components/synedit/units/$(CPU_TARGET)-$(OS_TARGET) \ ../components/custom \ ../components/mpaslex \ ../ideintf/units/$(CPU_TARGET)-$(OS_TARGET) \ ../designer ../designer/jitform/units/$(CPU_TARGET)-$(OS_TARGET) \ ../debugger \ ../converter \ ../packager \ ../packager/units/$(CPU_TARGET)-$(OS_TARGET) \ ../units/$(CPU_TARGET)-$(OS_TARGET) \ . includedir=include include/$(OS_TARGET) ../images targetdir=.. [clean] files=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) \ $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) \ $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) \ $(wildcard ../designer/*$(OEXT)) $(wildcard ../designer/*$(PPUEXT)) \ $(wildcard ../debugger/*$(OEXT)) $(wildcard ../debugger/*$(PPUEXT)) \ $(wildcard ../converter/*$(OEXT)) $(wildcard ../converter/*$(PPUEXT)) \ $(wildcard ../packager/*$(OEXT)) $(wildcard ../packager/*$(PPUEXT)) \ $(wildcard ../*$(OEXT)) $(wildcard ../*$(PPUEXT)) \ $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) [install] fpcpackage=n basedir=share/lazarus/ide [dist] destdir=$(BASEDIR)/dist [prerules] RCPP?=$(firstword $(strip $(subst /,$(PATHSEP),$(wildcard $(addsuffix /cpp$(SRCEXEEXT),$(SEARCHPATH)))))) # # LCL Platform ifndef LCL_PLATFORM ifneq ($(findstring $(OS_TARGET),win32 win64),) LCL_PLATFORM=win32 else LCL_PLATFORM=gtk 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 ifneq ($(findstring $(OS_TARGET),win32 win64),) 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) # # Options to compile an IDE with a lot of packages BIG_IDE_OPTIONS=-dBigIDE $(LAZARUS_LIBPATHS) \ -Fu../components/rtticontrols/lib/$(CPU_TARGET)-$(OS_TARGET) \ -Fu../components/printers/lib/$(CPU_TARGET)-$(OS_TARGET) \ -Fu../components/printers/design/lib/$(CPU_TARGET)-$(OS_TARGET) \ -Fu../components/cgi/ide/lib/$(CPU_TARGET)-$(OS_TARGET) \ -Fu../components/cgi/lib/$(CPU_TARGET)-$(OS_TARGET) \ -Fu../components/tdbf/lib/$(CPU_TARGET)-$(OS_TARGET) \ -Fu../components/turbopower_ipro/units/$(CPU_TARGET)-$(OS_TARGET) \ -Fu../components/jpeg/lib/$(CPU_TARGET)-$(OS_TARGET) \ -Fu../components/fpcunit/lib/$(CPU_TARGET)-$(OS_TARGET) \ -Fu../components/fpcunit/ide/lib/$(CPU_TARGET)-$(OS_TARGET) \ -Fu../components/projecttemplates/lib/$(CPU_TARGET)-$(OS_TARGET) \ -Fu../components/sqldb/lib/$(CPU_TARGET)-$(OS_TARGET) \ -Fu../components/sdf/lib/$(CPU_TARGET)-$(OS_TARGET) \ -Fu../components/memds/lib/$(CPU_TARGET)-$(OS_TARGET) \ -Fu../components/tachart/lib/$(CPU_TARGET)-$(OS_TARGET) LAZBUILD_OPT=$(LAZARUS_LIBPATHS) # # apptype gui ifneq ($(findstring $(OS_TARGET),win32 win64),) LAZARUS_OPT+= -WG BIG_IDE_OPTIONS+= -WG endif # define EnableFakeMethods for win64 ifneq ($(findstring $(OS_TARGET),win64),) LAZARUS_OPT+= -dEnableFakeMethods BIG_IDE_OPTIONS+= -dEnableFakeMethods endif #----------------------------------------------------------------------------- [rules] .PHONY: ide idepkg bigide starter lazbuilder all clean cleanide purge .SUFFIXES: .rc .res %.res: %.rc windres -i $< -o $@ --preprocessor $(RCPP) #----------------------------------------------------------------------------- ide: $(COMPILER_UNITTARGETDIR) ifneq ($(USESVN2REVISIONINC),0) ifeq ($(wildcard ../tools/svn2revisioninc$(SRCEXEEXT)),) $(MAKE) -C ../tools svn2revisioninc$(SRCEXEEXT) OS_TARGET=$(OS_SOURCE) OPT='' endif ../tools/svn2revisioninc$(SRCEXEEXT) .. revision.inc endif 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='$(LAZARUS_OPT) $(OPT)' endif #----------------------------------------------------------------------------- idepkg: $(COMPILER_UNITTARGETDIR) $(MAKE) --assume-new=lazarus.pp lazarus$(EXEEXT) OPT='$(LAZARUS_OPT) $(OPT) @$(LAZARUS_IDE_CONFIG)' #----------------------------------------------------------------------------- bigide: $(COMPILER_UNITTARGETDIR) -$(DEL) $(COMPILER_UNITTARGETDIR)/pkgmanager$(PPUEXT) ifeq ($(OS_TARGET), win32) $(MAKE) lazarus.res endif $(MAKE) --assume-new=lazarus.pp lazarus$(EXEEXT) OPT='$(OPT) $(BIG_IDE_OPTIONS)' #----------------------------------------------------------------------------- starter: $(COMPILER_UNITTARGETDIR) 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='$(LAZARUS_OPT) $(OPT)' endif #----------------------------------------------------------------------------- lazbuilder: ifeq ($(LAZBUILD_OPT),) $(MAKE) --assume-new=lazbuild.lpr lazbuild$(EXEEXT) else $(MAKE) --assume-new=lazbuild.lpr lazbuild$(EXEEXT) OPT='$(LAZBUILD_OPT) $(OPT)' endif #----------------------------------------------------------------------------- all: ide starter lazbuilder #----------------------------------------------------------------------------- cleanide: -$(DEL) $(wildcard *$(OEXT)) -$(DEL) $(wildcard *$(PPUEXT)) -$(DEL) $(wildcard *$(RSTEXT)) -$(DEL) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) -$(DEL) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) -$(DEL) $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) -$(DEL) $(wildcard ../*$(OEXT)) -$(DEL) $(wildcard ../*$(PPUEXT)) -$(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 ../converter/*$(OEXT)) -$(DEL) $(wildcard ../converter/*$(PPUEXT)) -$(DEL) $(wildcard ../doceditor/*$(OEXT)) -$(DEL) $(wildcard ../doceditor/*$(PPUEXT)) ifeq ($(OS_TARGET), win32) -$(DEL) lazarus.res startlazarus.res -$(DEL) lazarus.or startlazarus.or endif cleanlaz: clean cleanide purge: cleanlaz #install: $(INSTALLTARGET) $(addsuffix _install,$(TARGET_DIRS)) # end.