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

« back to all changes in this revision

Viewing changes to docs/videoex/Makefile

  • 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
 
#
3
 
# Makefile to compile all examples and convert them to LaTeX
4
 
5
 
#######################################################################
6
 
 
7
 
# Compiler
8
 
 
9
 
override PATH:=$(patsubst %/,%,$(subst \,/,$(PATH)))
10
 
ifneq ($(findstring darwin,$(OSTYPE)),)
11
 
inUnix=1 #darwin
12
 
SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))
13
 
else
14
 
ifeq ($(findstring ;,$(PATH)),)
15
 
inUnix=1
16
 
SEARCHPATH:=$(filter-out .,$(subst :, ,$(PATH)))
17
 
else
18
 
SEARCHPATH:=$(subst ;, ,$(PATH))
19
 
endif
20
 
endif
21
 
SEARCHPATH+=$(patsubst %/,%,$(subst \,/,$(dir $(MAKE))))
22
 
PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(SEARCHPATH))))
23
 
ifeq ($(PWD),)
24
 
PWD:=$(strip $(wildcard $(addsuffix /pwd,$(SEARCHPATH))))
25
 
ifeq ($(PWD),)
26
 
$(error You need the GNU utils package to use this Makefile)
27
 
else
28
 
PWD:=$(firstword $(PWD))
29
 
SRCEXEEXT=
30
 
endif
31
 
else
32
 
PWD:=$(firstword $(PWD))
33
 
SRCEXEEXT=.exe
34
 
endif
35
 
ifndef inUnix
36
 
ifeq ($(OS),Windows_NT)
37
 
inWinNT=1
38
 
else
39
 
ifdef OS2_SHELL
40
 
inOS2=1
41
 
endif
42
 
endif
43
 
else
44
 
ifneq ($(findstring cygdrive,$(PATH)),)
45
 
inCygWin=1
46
 
endif
47
 
endif
48
 
ifdef inUnix
49
 
SRCBATCHEXT=.sh
50
 
else
51
 
ifdef inOS2
52
 
SRCBATCHEXT=.cmd
53
 
else
54
 
SRCBATCHEXT=.bat
55
 
endif
56
 
endif
57
 
ifdef inUnix
58
 
PATHSEP=/
59
 
else
60
 
PATHSEP:=$(subst /,\,/)
61
 
ifdef inCygWin
62
 
PATHSEP=/
63
 
endif
64
 
endif
65
 
ifdef PWD
66
 
BASEDIR:=$(subst \,/,$(shell $(PWD)))
67
 
ifdef inCygWin
68
 
ifneq ($(findstring /cygdrive/,$(BASEDIR)),)
69
 
BASENODIR:=$(patsubst /cygdrive%,%,$(BASEDIR))
70
 
BASEDRIVE:=$(firstword $(subst /, ,$(BASENODIR)))
71
 
BASEDIR:=$(subst /cygdrive/$(BASEDRIVE)/,$(BASEDRIVE):/,$(BASEDIR))
72
 
endif
73
 
endif
74
 
else
75
 
BASEDIR=.
76
 
endif
77
 
ifdef inOS2
78
 
ifndef ECHO
79
 
ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
80
 
ifeq ($(ECHO),)
81
 
ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
82
 
ifeq ($(ECHO),)
83
 
ECHO=echo
84
 
else
85
 
ECHO:=$(firstword $(ECHO))
86
 
endif
87
 
else
88
 
ECHO:=$(firstword $(ECHO))
89
 
endif
90
 
endif
91
 
export ECHO
92
 
endif
93
 
override DEFAULT_FPCDIR=../..
94
 
ifndef FPC
95
 
ifdef PP
96
 
FPC=$(PP)
97
 
endif
98
 
endif
99
 
ifndef FPC
100
 
FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
101
 
ifneq ($(FPCPROG),)
102
 
FPCPROG:=$(firstword $(FPCPROG))
103
 
FPC:=$(shell $(FPCPROG) -PB)
104
 
ifneq ($(findstring Error,$(FPC)),)
105
 
override FPC=ppc386
106
 
endif
107
 
else
108
 
override FPC=ppc386
109
 
endif
110
 
endif
111
 
override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
112
 
override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
113
 
 
114
 
# Unit directory
115
 
# UNITDIR=/usr/lib/ppc/0.99.0/linuxunits
116
 
 
117
 
 
118
 
# Any options you wish to pass.
119
 
PPOPTS=
120
 
 
121
 
# Script to convert the programs to LaTeX examples which can be included.
122
 
PP2TEX=../pp2tex
123
 
 
124
 
# Script to collect all examples in 1 file.
125
 
MAKETEX=make1tex
126
 
 
127
 
#######################################################################
128
 
# No need to edit after this line.
129
 
#######################################################################
130
 
 
131
 
ifdef UNITDIR
132
 
PPOPTS:=$(PPOPTS) -Up$(UNITDIR);
133
 
endif
134
 
 
135
 
.SUFFIXES: .pp .tex
136
 
 
137
 
.PHONY: all tex clean
138
 
 
139
 
OBJECTS=ex1 ex2 ex3 ex4 ex5 ex6 ex7 ex8
140
 
# ex9
141
 
#        ex10 ex11 ex12 ex13  ex14 ex15 ex16 ex17 ex18
142
 
 
143
 
TEXOBJECTS=$(addsuffix .tex, $(OBJECTS))
144
 
override TEXOBJECTS:=$(TEXOBJECTS) vidutil.tex viddbg.tex
145
 
 
146
 
all : $(OBJECTS)
147
 
 
148
 
tex : $(TEXOBJECTS)
149
 
 
150
 
onetex : tex
151
 
        $(MAKETEX) $(TEXOBJECTS)
152
 
 
153
 
clean : 
154
 
        rm -f *.o *.s $(OBJECTS) $(TEXOBJECTS)
155
 
        rm -f vidutil.ppu vidutil.o viddbg.ppu viddbg.o Video.log
156
 
        rm -f *.ow *.sw *.exe *.dll
157
 
 
158
 
$(OBJECTS): %: %.pp vidutil.ppu
159
 
        $(FPC) $(PPOPTS) $*
160
 
 
161
 
$(TEXOBJECTS): %.tex: %.pp head.tex foot.tex
162
 
        $(PP2TEX) $*
163
 
 
164
 
vidutil.ppu: vidutil.pp
165
 
        $(FPC) $(PPOPTS) vidutil.pp