Debian Codegraph @

src/Makefile

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