lazarus/ide/Makefile.fpc
mattias eb89b838b9 fixed output dir of jitform.pas
git-svn-id: trunk@7942 -
2005-10-09 12:08:40 +00:00

174 lines
4.8 KiB
Makefile

#
# Makefile.fpc for Lazarus for Free Pascal
#
[package]
name=lazaruside
version=0.9b
[require]
packages=fcl regexpr
[target]
programs=lazarus startlazarus
[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 \
../packager \
../packager/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 ../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
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)
#
# big ide
ifdef LAZARUS_BIG
#LAZARUS_IDE_CONFIG=bigidemake.cfg
#LAZARUS_CONFIG_DIR=.
#LAZARUS_BIG_COMPONENT_DIRS=rtticontrols
endif
#
# apptype gui
ifeq ($(OS_TARGET),win32)
LAZARUS_OPT+= -WG
endif
#-----------------------------------------------------------------------------
[rules]
.PHONY: ide idepkg idebig starter 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)'
#-----------------------------------------------------------------------------
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
#-----------------------------------------------------------------------------
all: ide starter
#-----------------------------------------------------------------------------
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 ./doceditor/*$(OEXT))
-$(DEL) $(wildcard ./doceditor/*$(PPUEXT))
ifeq ($(OS_TARGET), win32)
-$(DEL) $(wildcard *.res)
-$(DEL) lazarus.owr
endif
cleanlaz: clean cleanide
purge: cleanlaz
#install: $(INSTALLTARGET) $(addsuffix _install,$(TARGET_DIRS))
# end.