~ubuntu-branches/debian/lenny/fpc/lenny

« back to all changes in this revision

Viewing changes to fpcsrc/ide/Makefile.fpc

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-05-17 17:12:11 UTC
  • mfrom: (3.1.9 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080517171211-9qi33xhd9evfa0kg
Tags: 2.2.0-dfsg1-9
[ Torsten Werner ]
* Add Mazen Neifer to Uploaders field.

[ Mazen Neifer ]
* Moved FPC sources into a version dependent directory from /usr/share/fpcsrc
  to /usr/share/fpcsrc/${FPCVERSION}. This allow installing more than on FPC
  release.
* Fixed far call issue in compiler preventing building huge binearies.
  (closes: #477743)
* Updated building dependencies, recomennded and suggested packages.
* Moved fppkg to fp-utils as it is just a helper tool and is not required by
  compiler.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
#   $Id: Makefile.fpc,v 1.32 2005/05/05 12:59:59 peter Exp $
 
3
#
 
4
#   Makefile.fpc for FP IDE
 
5
#
 
6
 
 
7
[package]
 
8
name=ide
 
9
version=2.2.0
 
10
 
 
11
[target]
 
12
dirs=compiler
 
13
programs=fp
 
14
rst=fpstrings
 
15
 
 
16
[install]
 
17
datadir=$(INSTALL_BASEDIR)/ide
 
18
fpcpackage=y
 
19
 
 
20
[compiler]
 
21
options=-Sg
 
22
 
 
23
[require]
 
24
packages=fv gdbint regexpr
 
25
packages_go32v2=graph
 
26
libc=y
 
27
 
 
28
[default]
 
29
fpcdir=..
 
30
 
 
31
[prerules]
 
32
#
 
33
# Automatic detection if libgdb.a is present
 
34
#
 
35
 
 
36
# set default value for PPC_TARGET
 
37
ifndef PPC_TARGET
 
38
PPC_TARGET=$(CPU_TARGET)
 
39
endif
 
40
 
 
41
# do not add -d$(CPU_TARGET)
 
42
override NOCPUDEF=1
 
43
# Use PPC_TARGET instead
 
44
override FPCOPT+= -d$(PPC_TARGET)
 
45
 
 
46
ifndef NOGDB
 
47
 
 
48
# Try to find GDB library
 
49
# Look for a valid GDBLIBDIR environment variable
 
50
ifdef GDBLIBDIR
 
51
override LIBGDBFILE:=$(firstword $(wildcard $(addsuffix /libgdb.a,$(GDBLIBDIR))))
 
52
endif
 
53
 
 
54
# Use default dirs if not available
 
55
ifeq ($(LIBGDBFILE),)
 
56
# Default locations <target>/<cpu> (linux) or <target> (win32,go32v2) only
 
57
override GDBLIBDIR=$(wildcard $(FPCDIR)/libgdb/$(OS_TARGET)/$(CPU_TARGET))
 
58
ifeq ($(GDBLIBDIR),)
 
59
override GDBLIBDIR=$(FPCDIR)/libgdb/$(OS_TARGET)
 
60
endif
 
61
# Detect if libgdb.a is available
 
62
override LIBGDBFILE:=$(firstword $(wildcard $(addsuffix /libgdb.a,$(GDBLIBDIR))))
 
63
endif
 
64
 
 
65
# Disable GDB when no libgdb.a found
 
66
ifeq ($(LIBGDBFILE),)
 
67
GDB=
 
68
else
 
69
GDB=1
 
70
endif
 
71
 
 
72
ifdef GDB
 
73
# The gdbint is already included due the gdbint package dependency
 
74
override LIBDIR+=$(GDBLIBDIR)
 
75
endif
 
76
 
 
77
else
 
78
 
 
79
# Disable
 
80
GDB=
 
81
 
 
82
endif  #NOGDB
 
83
 
 
84
 
 
85
[rules]
 
86
.NOTPARALLEL:
 
87
 
 
88
.PHONY: compilerunits compilerclean \
 
89
        nogdb gdb all \
 
90
        clean_compiler clean testgdb postgdbinfo
 
91
 
 
92
clean: fpc_cleanall
 
93
 
 
94
distclean: clean compilerclean
 
95
 
 
96
#
 
97
# GDB detection
 
98
#
 
99
ifndef NOGDB
 
100
 
 
101
ifdef GDB
 
102
testgdb:
 
103
        @$(ECHO) LibGDB found in $(LIBGDBFILE)
 
104
 
 
105
postgdbinfo:
 
106
        @$(ECHO) LibGDB was found, IDE has Debugger support
 
107
 
 
108
else
 
109
override COMPILER+=-dNODEBUG
 
110
testgdb:
 
111
        @$(ECHO) LibGDB not found
 
112
        @$(ECHO) LIBGDBFILE=$(LIBGDBFILE)
 
113
        @$(ECHO) GDBLIBDIR=$(GDBLIBDIR)
 
114
        @$(ECHO) $(wildcard $(addsuffix /libgdb.a,$(GDBLIBDIR)))
 
115
 
 
116
postgdbinfo:
 
117
        @$(ECHO) LibGDB was not found, IDE has no Debugger support
 
118
endif
 
119
 
 
120
else
 
121
testgdb:
 
122
        @$(ECHO) Building without Debugger
 
123
postgdbinfo:
 
124
        @$(ECHO) Debugger disabled, IDE has no Debugger support
 
125
override COMPILER+=-dNODEBUG
 
126
endif  # NOGDB
 
127
 
 
128
 
 
129
#
 
130
# Compiler
 
131
#
 
132
 
 
133
compilerunits : compiler/$(FPCMADE)
 
134
compiler/$(FPCMADE):
 
135
        $(MAKE) -C compiler all
 
136
 
 
137
compilerclean :
 
138
        $(MAKE) -C compiler clean
 
139
 
 
140
#
 
141
# Build targets
 
142
#
 
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
 
146
# to use.
 
147
#
 
148
fp$(EXEEXT): $(wildcard *.pas) $(wildcard *.inc)
 
149
 
 
150
buildfp:
 
151
        $(MAKE) compilerunits
 
152
        $(MAKE) testgdb
 
153
        $(MAKE) fpc_all
 
154
        $(MAKE) postgdbinfo
 
155
 
 
156
gdb:
 
157
#        $(MAKE) -C ../packages/base/gdbint
 
158
        $(MAKE) buildfp
 
159
 
 
160
nogdb:
 
161
        $(MAKE) buildfp NOGDB=1
 
162
 
 
163
#
 
164
# Default targets
 
165
#
 
166
 
 
167
# By default we try to create the ide with full debugging support,
 
168
all: gdb
 
169
 
 
170
# This is necessary because we don't have all units separate in the
 
171
# units targets
 
172
clean: cleanall
 
173
 
 
174
#
 
175
# Installation
 
176
#
 
177
 
 
178
ifndef UNIXHier
 
179
override INSTALL_DATADIR=$(INSTALL_BINDIR)
 
180
endif
 
181
 
 
182
install: fpc_install
 
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)
 
188
endif
 
189
        $(INSTALL) readme.ide $(INSTALL_DOCDIR)
 
190
 
 
191
 
 
192
#
 
193
# Misc
 
194
#
 
195
clean_compiler:
 
196
        $(MAKE) -C compiler clean
 
197
        $(MAKE) -C ../compiler ppuclean