Debian Codegraph @

src/Makefile

raw ◀ ▶
Source reconstructed at patch state 2 of 3 — not the installed (fully patched) source.
3 Debian patches touch this file
1 ######## PLOTICUS version 2.42 Copyright 1998-2009 Stephen C. Grubb
2 ######## http://ploticus.sourceforge.net
3 ########
4 ######## Use this Makefile to build ploticus executable or libploticus.
5 ######## Root permission is not required.
6 ######## Configure the 3 settings below then do: make clean; make
7 ######## Default settings should be ready to go for most linux platforms.
8 ######## Problem reports and questions may be sent to [email protected]
9
10
11 # defaults..
12 CC = gcc
13 PLATFORM = UNIX
14 RMCOM = rm -f
15 NOX11 = -DNOX11
16 NOSWF = -DNOSWF
17 EXE = ploticus
18 LIBEXT = a
19 FPIC =
20 ARCOM = ar r
21 SHARELIBEXT = so.0.0.0
22 SONAME = libploticus.so.0
23 SHAREFLAG = -shared -Wl,-soname,$(SONAME)
24
25
26
27 ####################################################################
28 ########## Setting 1:
29 ########## What do you wish to build? ploticus executable? libploticus?
30 ########## Select ONE option below by activating the appropriate lines...
31 ########## All other lines should be commented out.
32 ####################################################################
33
34
35 ############ Option 1: build the ploticus executable (unix), no X11 ....
36 # NOX11 = -DNOX11
37
38
39
40 ############ Option 2: build the ploticus executable (unix), with X11 enabled ....
41 NOX11 =
42 XOBJ = x11.o interact.o
43
44 ############ ...AND... activate the lines below for your platform... (X11 libs & header files)
45 #### linux
46 # XLIBS = -L/usr/X11R6/lib -lX11
47 # XINCLUDEDIR = -I/usr/X11R6/include
48 #### alt linux
49 XLIBS = -lX11
50 XINCLUDEDIR = -I/usr/include/X11
51 #### 64bit linux
52 # XLIBS = -L/usr/X11R6/lib64 -lX11
53 #### solaris
54 # XLIBS = -L/usr/openwin/lib -lX11
55 # XINCLUDEDIR = -I/usr/openwin/include
56 #### mac osx
57 # CC = cc -arch ppc -arch i386
58 # XLIBS = -L/usr/X11R6/lib -lX11
59 # XINCLUDEDIR = -I/usr/X11R6/include
60 #### cygwin
61 # XLIBS = -L/usr/X11R6/lib -lX11
62 # XINCLUDEDIR = -I/usr/X11R6/include
63 # PLATFORM = WIN32
64
65
66
67 ############ Option 3: build ploticus executable (native win32 ploticus.exe)
68 # PLATFORM = WIN32
69 # RMCOM = del
70
71
72
73 ############ Option 4: build static libploticus (unix) with PNG support (remember to also select PNG in Setting 2)
74 # LIBEXT = a
75 # ARCOM = ar r
76 # target: libploticus-static
77 #### and if you want X11 enabled uncomment the following line..
78 # XOBJ = x11.o interact.o
79
80
81
82 ############ Option 5: build shared libploticus (unix)
83 ############ Note: untested by me ... suggestions welcome -sg
84 # LIBEXT = a
85 # FPIC = -fPIC
86 # SONAME = libploticus.so.0
87 # SHAREFLAG = -shared -Wl,-soname,$(SONAME)
88 # target: libploticus-so
89
90
91
92 ############################################################################
93 ######### Setting 2:
94 ######### Ploticus uses the GD library to create PNG, GIF, JPEG images.
95 ######### This distribution includes GD13 (GIF), and GD16 (PNG) code.
96 ######### You can choose to use one of these or you can choose to use your
97 ######### own GD version, or you can choose to not use GD at all.
98 ############################################################################
99
100
101 ########### Option 1: use bundled GD16 (PNG only). Requires libpng and zlib.
102 # exetarget: plpng
103 # GD16LIBS = -lpng -lz
104 # GD16H = -I/usr/local/include
105 # ZFLAG = -DWZ
106 ### Leave the following commented unless libs not in usual places
107 ### GD16LIBS = /home/scg/lib/libpng.a /home/scg/lib/libz.a
108 ### GD16H = -I/home/scg/lib
109
110 ########### Option 2: use bundled GD13 (GIF only). No additional lib dependencies.
111 # exetarget: ploticus
112
113 ########### Option 3: use your own GD resource. Requires GD 1.84+, libpng, zlib, libjpeg
114 # exetarget: plgd18
115 # GD18LIBS = -lgd -lpng -lz -ljpeg
116 # GD18H =
117 # GDFREETYPE =
118 # ZFLAG = -DWZ
119
120 ########### Option 4: use your own GD resource with FreeType2 (ttf) fonts enabled.
121 ########### Requires GD 1.84+, libpng, zlib, libjpeg and libfreetype
122 exetarget: plgd18
123 GD18LIBS = -lgd -lpng -lz -ljpeg -lfreetype
124 GD18H =
125 GDFREETYPE = -DGDFREETYPE
126 ZFLAG = -DWZ
127
128 ########### Option 5: don't use GD at all.
129 # exetarget: plnogd
130 # NOGD = -DNOGD
131
132
133
134 ################################################################
135 ######## Settings 3:
136 ######## Other various settings you may want to make.
137 ################################################################
138
139
140 #### For SWF (flash) output capability activate the following. If necessary change -lming to location of ming.
141 #### Note, successful with ming 0.2a but not with later ming versions..
142 # MING = -lming
143 #optional for non-standard location: MINGH = -I/home/scg/lib
144
145
146 #### To set a hard-coded directory for prefabs files,
147 #### edit the PREFABS_DIR define in pl.h before doing the build.
148 #### If the installer does this, users won't be required to have
149 #### PLOTICUS_PREFABS environment variable defined.
150
151
152 #### If you do a "make install", where do you want the executable(s) to be moved to?
153 INSTALLBIN = /usr/local/bin
154
155
156 #### For LOCALE support (non-roman alphabets & collation), uncomment the following..
157 LOCALEOBJ = localef.o
158 LOCALE_FLAG = -DLOCALE
159
160 #### SVG output is always available by default.
161 #### If you want compressed SVG (.svgz), and you selected GD13 or no GD above,
162 #### uncomment the following. You need to have zlib. If necessary change -lz to location of zlib.
163 # ZLIB = -lz
164 # ZFLAG = -DWZ
165
166 #### To completely remove PostScript / EPS output capability, uncomment the following..
167 # NOPS = -DNOPS
168
169 #### To completely remove SVG output capability, uncomment the following..
170 # NOSVG = -DNOSVG
171
172 #### To see all possible compiler warnings, uncomment the following line..
173 WALL = -Wall -g
174
175
176
177 ###############################################################################
178 ######## Done. Now save this file and type: make clean; make ###########
179 ######## ###########
180 ###############################################################################
181
182 ######## FYI... additional Makefile statement examples:
183 ######## eg: GD16LIBS = /home/scg/lib/libpng.a /home/scg/lib/libz.a
184 ######## eg: GD16H = -I/home/scg/lib
185 ######## GD18LIBS = -L /home/scg/lib -lgd -lpng -lz -ljpeg -lfreetype
186 ######## GD18H = -I/home/scg/lib/freetype-2.0.4/include -I/home/scg/lib/gd-1.8.4
187 ######## eg: GD18H = -I/home/scg/lib/gd-1.8.4 -I/home/scg/lib/jpeg-6b -I/home/scg/lib -I/home/scg/lib/freetype-2.0.4/include
188 ######## eg: MINGH = -I/home/scg/lib
189 ######## eg: MING = /home/scg/lib/libming.a
190
191 ###############################################################################
192 ###############################################################################
193 ###############################################################################
194 ###############################################################################
195
196
197 GD13 = grgd13.o devstuff13.o gd13.o
198 GD16 = grgd16.o devstuff16.o gd16.o gd_io.o gd_io_dp.o gd_io_file.o gd_png.o
199 GD = gdfontg.o gdfontl.o gdfontmb.o gdfonts.o gdfontt.o
200
201 LIBS = $(XLIBS) -lm $(ADDLIBS)
202
203 DPKG_CFLAGS := $(CFLAGS) # defined by dpkg-buildflags
204 CFLAGS = $(FPIC) $(WALL) -DPLOTICUS -D$(PLATFORM) -DTDH_NOREC $(ZFLAG) $(LOCALE_FLAG) \
205 $(NOGD) $(NOX11) $(NOPS) $(NOSVG) $(NOSWF) $(XINCLUDEDIR) $(MINGH) \
206 $(DPKG_CFLAGS)
207
208 OBJ = proc_annotate.o proc_areadef.o proc_axis.o proc_bars.o proc_rect.o proc_breakaxis.o \
209 proc_categories.o proc_curvefit.o proc_settings.o proc_drawcommands.o \
210 proc_getdata.o proc_image.o proc_legend.o proc_legendentry.o proc_line.o proc_lineplot.o \
211 proc_page.o proc_pie.o proc_print.o proc_boxplot.o proc_rangesweep.o proc_usedata.o proc_pvalue.o \
212 proc_scatterplot.o proc_vector.o proc_symbol.o proc_processdata.o proc_tabulate.o proc_venndisk.o clickmap.o proc_tree.o proc_catlines.o \
213 plhead.o execscriptfile.o execline.o lib.o details.o parse.o units.o preliminaries.o \
214 process_arg.o plvalue_subst.o cats.o fieldnames.o autorange.o nearest.o select.o datasets.o \
215 color.o plg.o init.o arrow.o mark.o block.o pcode.o ps.o svg.o swf.o stub.o winscale.o lineclip.o smoothfit.o ttest.o \
216 condex.o dates.o dbinterface.o err.o functions.o glroutines.o reslimits.o secondaryops.o \
217 shell.o sinterp.o tdhkit.o times.o value.o value_subst.o variable.o custom.o \
218 $(LOCALEOBJ)
219
220
221 # pl with gif support
222 pl: pl.o $(OBJ) $(XOBJ) gd00files gd13files
223 $(CC) $(LDFLAGS) pl.o $(OBJ) $(GD13) $(GD) $(XOBJ) $(LIBS) $(ZLIB) $(MING) -o $(EXE)
224
225 # pl with png support
226 plpng: pl.o $(OBJ) $(XOBJ) gd00files gd16files
227 $(CC) $(LDFLAGS) pl.o $(OBJ) $(GD16) $(GD) $(XOBJ) $(GD16LIBS) $(LIBS) $(MING) -o $(EXE)
228
229 # pl with jpeg support (user must supply gd 1.8+)
230 plgd18: pl.o $(OBJ) $(XOBJ) gd18files
231 $(CC) $(LDFLAGS) pl.o grgd.o devstuff.o $(OBJ) $(XOBJ) $(GD18LIBS) $(LIBS) $(MING) -o $(EXE)
232
233 # pl with no GD support
234 plnogd: pl.o $(OBJ) $(XOBJ) nogdfiles
235 $(CC) $(LDFLAGS) pl.o devstuff.o $(OBJ) $(XOBJ) $(LIBS) $(ZLIB) $(MING) -o $(EXE)
236
237 # libploticus.a with png
238 libploticus-static: $(OBJ) $(XOBJ) api.o gd00files gd16files
239 $(RMCOM) libploticus.$(LIBEXT)
240 $(ARCOM) libploticus.$(LIBEXT) $(OBJ) $(XOBJ) api.o $(GD16) $(GD)
241
242 # this one needs work... suggestions welcome
243 libploticus-so: $(OBJ) $(GDOBJ) $(XOBJ) api.o gd00files gd16files
244 $(RMCOM) libploticus.$(SHARELIBEXT)
245 $(CC) $(LDFLAGS) $(SHAREFLAG) -o libploticus.$(SHARELIBEXT) $(OBJ) $(GDOBJ) $(XOBJ) api.o $(GD16) $(GD) -lz -lm -lpng -lX11
246
247
248 gd00files:
249 $(CC) $(FPIC) -I./gd13 -I./ -c gdfontg.c gdfontl.c gdfontmb.c gdfonts.c gdfontt.c
250 echo "done with gd00files" > gd00files
251
252 gd13files:
253 $(CC) -c $(WALL) grgd.c -DGD13 -DPLOTICUS -I./gd13 -o grgd13.o
254 $(CC) -c $(CFLAGS) $(CPPFLAGS) devstuff.c -DGD13 -o devstuff13.o
255 $(CC) -c gd13.c -I./gd13
256 echo "done with gd13files" > gd13files
257
258 gd16files:
259 $(CC) -c $(WALL) $(FPIC) grgd.c -DGD16 -DPLOTICUS -I./ -I./gd16 -o grgd16.o
260 $(CC) -c $(CFLAGS) $(CPPFLAGS) $(FPIC) devstuff.c -DGD16 -o devstuff16.o
261 $(CC) -c $(FPIC) -I./gd16 -I./ $(GD16H) gd16.c gd_io.c gd_io_dp.c gd_io_file.c gd_png.c
262 echo "done with gd16files" > gd16files
263
264 gd18files:
265 $(CC) -c grgd.c devstuff.c -DGD18 $(GDFREETYPE) $(GD18H) $(CFLAGS) $(CPPFLAGS)
266
267 nogdfiles:
268 $(CC) -c devstuff.c $(CFLAGS) $(CPPFLAGS)
269
270 devgrgd:
271 $(CC) -c $(WALL) grgd.c -DGD13 -DPLOTICUS -I./gd13 -o grgd13.o
272 touch pcode.c
273 make
274
275
276
277 install:
278 cp $(EXE) $(INSTALLBIN)
279
280 clean:
281 $(RMCOM) *.o gd??files
282
283 distclean: clean
284 $(RMCOM) $(EXE) libploticus.$(LIBEXT) libploticus.$(SHARELIBEXT)
285
286
287 ########
288 ######## PLOTICUS Copyright 1998-2009 Stephen C. Grubb http://ploticus.sourceforge.net
289 ########