summaryrefslogtreecommitdiff
path: root/packages/graph/Makefile.fpc
blob: 24ff6a6b0ba9b45e3abdf7236fdbd2aabb143647 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
#
#   Makefile.fpc for Free Component Library
#

[package]
name=graph
version=2.2.2

[require]
libc=y
packages_linux_i386=sdl
packages_linux_powerpc=sdl
packages_freebsd_i386=sdl
packages_win32=sdl
packages_darwin_powerpc=sdl
packages_darwin_i386=sdl

# clean package units
[clean]
units=$(GGIGRAPH_UNIT) $(GRAPH_UNIT)

[target]
dirs=
units=
units_linux=$(GRAPH_UNIT) $(GGIGRAPH_UNIT)
units_freebsd=graph $(GGIGRAPH_UNIT)
units_win32=graph wincrt winmouse
units_go32v2=graph
units_amiga=graph
units_i386_linux=sdlgraph
units_powerpc_linux=sdlgraph
units_i386_freebsd=sdlgraph
units_win32=sdlgraph
units_powerpc_darwin=sdlgraph
units_i386_darwin=sdlgraph

[compiler]
options=-S2
includedir=src/$(OS_TARGET) src/inc
includedir_linux=src/unix
includedir_freebsd=src/unix
includedir_darwin=src/unix
includedir_netbsd=src/unix
includedir_openbsd=src/unix
sourcedir=src/$(OS_TARGET) src/inc tests examples

[install]
fpcpackage=y

[default]
fpcdir=../..

[shared]
build=n

[prerules]
GRAPHDIR=src/inc
UNIXINC=src/unix

ifndef USELIBGGI
USELIBGGI=NO
endif

GGIGRAPH_UNIT=ggigraph
GRAPH_UNIT=graph
GRAPHUNIT_DIR=src/$(OS_TARGET)

ifeq ($(OS_TARGET),linux)
GRAPHUNIT_DIR=src/unix
UNIXINCDEPS=$(UNIXINC)/graph16.inc

ifeq ($(CPU_TARGET),powerpc64)
GGIGRAPH_UNIT=
endif

ifneq ($(CPU_TARGET),i386)
GRAPH_UNIT=
endif
endif

ifeq ($(OS_TARGET),freebsd)
GRAPHUNIT_DIR=src/unix
UNIXINCDEPS=$(UNIXINC)/graph16.inc
endif

[rules]
include src/inc/makefile.inc
GRAPHINCDEPS=$(addprefix $(GRAPHDIR)/,$(GRAPHINCNAMES)) $(UNIXINCDEPS)

graph$(PPUEXT) : graph.pp $(GRAPHINCDEPS)
        $(COMPILER) -I$(GRAPHDIR) $(GRAPHUNIT_DIR)/graph.pp

ggigraph$(PPUEXT) : $(UNIXINC)/ggigraph.pp $(GRAPHINCDEPS)
        $(COMPILER) -I$(GRAPHDIR) $(UNIXINC)/ggigraph.pp

winmouse$(PPUEXT) : src/win32/winmouse.pp graph$(PPUEXT)
	$(COMPILER) src/win32/winmouse.pp

wincrt$(PPUEXT) : src/win32/wincrt.pp graph$(PPUEXT)
        $(COMPILER) src/win32/wincrt.pp

sdlgraph$(PPUEXT) : src/sdlgraph/sdlgraph.pp $(GRAPHINCDEPS)
        $(COMPILER) -I$(GRAPHDIR) src/sdlgraph/sdlgraph.pp

.NOTPARALLEL: