2
# $Id: Makefile.fpc,v 1.32 2005/05/05 12:59:59 peter Exp $
4
# Makefile.fpc for FP IDE
17
datadir=$(INSTALL_BASEDIR)/ide
24
packages=fv gdbint regexpr
33
# Automatic detection if libgdb.a is present
36
# set default value for PPC_TARGET
38
PPC_TARGET=$(CPU_TARGET)
41
# do not add -d$(CPU_TARGET)
43
# Use PPC_TARGET instead
44
override FPCOPT+= -d$(PPC_TARGET)
48
# Try to find GDB library
49
# Look for a valid GDBLIBDIR environment variable
51
override LIBGDBFILE:=$(firstword $(wildcard $(addsuffix /libgdb.a,$(GDBLIBDIR))))
54
# Use default dirs if not available
56
# Default locations <target>/<cpu> (linux) or <target> (win32,go32v2) only
57
override GDBLIBDIR=$(wildcard $(FPCDIR)/libgdb/$(OS_TARGET)/$(CPU_TARGET))
59
override GDBLIBDIR=$(FPCDIR)/libgdb/$(OS_TARGET)
61
# Detect if libgdb.a is available
62
override LIBGDBFILE:=$(firstword $(wildcard $(addsuffix /libgdb.a,$(GDBLIBDIR))))
65
# Disable GDB when no libgdb.a found
73
# The gdbint is already included due the gdbint package dependency
74
override LIBDIR+=$(GDBLIBDIR)
88
.PHONY: compilerunits compilerclean \
90
clean_compiler clean testgdb postgdbinfo
94
distclean: clean compilerclean
103
@$(ECHO) LibGDB found in $(LIBGDBFILE)
106
@$(ECHO) LibGDB was found, IDE has Debugger support
109
override COMPILER+=-dNODEBUG
111
@$(ECHO) LibGDB not found
112
@$(ECHO) LIBGDBFILE=$(LIBGDBFILE)
113
@$(ECHO) GDBLIBDIR=$(GDBLIBDIR)
114
@$(ECHO) $(wildcard $(addsuffix /libgdb.a,$(GDBLIBDIR)))
117
@$(ECHO) LibGDB was not found, IDE has no Debugger support
122
@$(ECHO) Building without Debugger
124
@$(ECHO) Debugger disabled, IDE has no Debugger support
125
override COMPILER+=-dNODEBUG
133
compilerunits : compiler/$(FPCMADE)
135
$(MAKE) -C compiler all
138
$(MAKE) -C compiler clean
143
# building happends in 2 steps, first the packages, compiler
144
# dirs are build. In the second step the IDE is build. This is
145
# required because it needs to detect which compiler version
148
fp$(EXEEXT): $(wildcard *.pas) $(wildcard *.inc)
151
$(MAKE) compilerunits
157
# $(MAKE) -C ../packages/base/gdbint
161
$(MAKE) buildfp NOGDB=1
167
# By default we try to create the ide with full debugging support,
170
# This is necessary because we don't have all units separate in the
179
override INSTALL_DATADIR=$(INSTALL_BINDIR)
183
$(MKDIR) $(INSTALL_DATADIR)
184
$(MKDIR) $(INSTALL_DOCDIR)
185
$(INSTALL) fp.ans $(wildcard *.pt) $(wildcard *.tdf) $(INSTALL_DATADIR)
186
ifeq ($(OS_TARGET),win32)
187
$(INSTALL) fp32.ico $(INSTALL_DATADIR)
189
$(INSTALL) readme.ide $(INSTALL_DOCDIR)
196
$(MAKE) -C compiler clean
197
$(MAKE) -C ../compiler ppuclean