lazarus/ide/Makefile.fpc
2005-08-11 20:31:56 +00:00

155 lines
4.4 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/units ../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)
#
# apptype gui
ifeq ($(OS_TARGET),win32)
LAZARUS_OPT+= -WG
endif
#-----------------------------------------------------------------------------
[rules]
.PHONY: ide idepkg starter all clean cleanide purge
.SUFFIXES: .rc .res
%.res: %.rc
windres -i $< -o $@ --preprocessor $(RCPP)
#-----------------------------------------------------------------------------
ide: $(COMPILER_UNITTARGETDIR)
ifeq ($(OS_TARGET), win32)
$(MAKE) lazarus.res
endif
ifeq ($(LAZARUS_OPT),)
$(MAKE) --assume-new=../lazarus$(EXEEXT) lazarus$(EXEEXT)
else
$(MAKE) --assume-new=../lazarus$(EXEEXT) lazarus$(EXEEXT) OPT='$(LAZARUS_OPT) $(OPT)'
endif
#-----------------------------------------------------------------------------
idepkg: $(COMPILER_UNITTARGETDIR)
$(MAKE) --assume-new=../lazarus$(EXEEXT) 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$(EXEEXT) startlazarus$(EXEEXT)
else
$(MAKE) --assume-new=../startlazarus$(EXEEXT) 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.