Debian Codegraph @

src/Makefile_orig

raw
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 =
97 # ZFLAG = -DWZ
98 # GD16LIBS = /home/scg/lib/libpng.a /home/scg/lib/libz.a
99 # GD16H = -I/home/scg/lib
100
101 ########### Option 2: use bundled GD13 (GIF only). No additional lib dependencies.
102 exetarget: pl
103
104 ########### Option 3: use your own GD resource. Requires GD 1.84+, libpng, zlib, libjpeg
105 # exetarget: plgd18
106 # GD18LIBS = -lgd -lpng -lz -ljpeg
107 # GD18H =
108 # GDFREETYPE =
109 # ZFLAG = -DWZ
110
111 ########### Option 4: use your own GD resource with FreeType2 fonts enabled.
112 ########### Requires GD 1.84+, libpng, zlib, libjpeg and libfreetype
113 # exetarget: plgd18
114 # GD18LIBS = -lgd -lpng -lz -ljpeg -lfreetype
115 # GD18H =
116 # GDFREETYPE = -DGDFREETYPE
117 # ZFLAG = -DWZ
118
119 ########### Option 5: don't use GD at all.
120 # exetarget: plnogd
121 # NOGD = -DNOGD
122
123
124
125 ################################################################
126 ######## Third question.
127 ######## Other various settings you may want to make.
128 ################################################################
129
130
131 #### For SWF (flash) output capability activate the following. If necessary change -lming to location of ming.
132 #### Note, successful with ming 0.2a but not with later ming versions..
133 # MING = -lming
134 #optional for non-standard location: MINGH = -I/home/scg/lib
135
136
137 #### To set a hard-coded directory for prefabs files, edit the PREFABS_DIR define in pl.h before doing the build.
138 #### If the installer does this, users won't be required to have PLOTICUS_PREFABS environment variable defined.
139
140
141 #### If you do a "make install", where do you want the executable(s) to be moved to?
142 INSTALLBIN = /usr/local/bin
143
144
145 #### For LOCALE support (non-roman alphabets & collation), uncomment the following..
146 # LOCALEOBJ = localef.o
147 # LOCALE_FLAG = -DLOCALE
148
149 #### SVG output is always available by default.
150 #### If you want compressed SVG (.svgz), and you selected GD13 or no GD above,
151 #### uncomment the following. You need to have zlib. If necessary change -lz to location of zlib.
152 # ZLIB = -lz
153 # ZFLAG = -DWZ
154
155 #### To completely remove PostScript / EPS output capability, uncomment the following..
156 # NOPS = -DNOPS
157
158 #### To completely remove SVG output capability, uncomment the following..
159 # NOSVG = -DNOSVG
160
161 #### To see all possible compiler warnings, uncomment the following line..
162 WALL = -Wall
163
164
165
166 ###############################################################################
167 ######## Done. Now save this file and type: make clean; make ###########
168 ######## ###########
169 ###############################################################################
170
171 ######## FYI... additional Makefile statement examples:
172 ######## eg: GD16LIBS = /home/scg/lib/libpng.a /home/scg/lib/libz.a
173 ######## eg: GD16H = -I/home/scg/lib
174 ######## GD18LIBS = -L /home/scg/lib -lgd -lpng -lz -ljpeg -lfreetype
175 ######## GD18H = -I/home/scg/lib/freetype-2.0.4/include -I/home/scg/lib/gd-1.8.4
176 ######## 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
177 ######## eg: MINGH = -I/home/scg/lib
178 ######## eg: MING = /home/scg/lib/libming.a
179
180 ###############################################################################
181 ###############################################################################
182 ###############################################################################
183 ###############################################################################
184
185
186 GD13 = grgd13.o devstuff13.o gd13.o
187 GD16 = grgd16.o devstuff16.o gd16.o gd_io.o gd_io_dp.o gd_io_file.o gd_png.o
188 GD = gdfontg.o gdfontl.o gdfontmb.o gdfonts.o gdfontt.o
189
190 LIBS = $(XLIBS) -lm $(ADDLIBS)
191
192 CFLAGS = $(FPIC) $(WALL) -DPLOTICUS -D$(PLATFORM) -DTDH_NOREC $(ZFLAG) $(LOCALE_FLAG) \
193 $(NOGD) $(NOX11) $(NOPS) $(NOSVG) $(NOSWF) $(XINCLUDEDIR) $(MINGH)
194
195 OBJ = proc_annotate.o proc_areadef.o proc_axis.o proc_bars.o proc_rect.o proc_breakaxis.o \
196 proc_categories.o proc_curvefit.o proc_settings.o proc_drawcommands.o \
197 proc_getdata.o proc_image.o proc_legend.o proc_legendentry.o proc_line.o proc_lineplot.o \
198 proc_page.o proc_pie.o proc_print.o proc_boxplot.o proc_rangesweep.o proc_usedata.o proc_pvalue.o \
199 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 \
200 plhead.o execscriptfile.o execline.o lib.o details.o parse.o units.o preliminaries.o \
201 process_arg.o plvalue_subst.o cats.o fieldnames.o autorange.o nearest.o select.o datasets.o \
202 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 \
203 condex.o dates.o dbinterface.o err.o functions.o glroutines.o reslimits.o secondaryops.o \
204 shell.o sinterp.o tdhkit.o times.o value.o value_subst.o variable.o custom.o \
205 $(LOCALEOBJ)
206
207
208 # pl with gif support
209 pl: pl.o $(OBJ) $(XOBJ) gd00files gd13files
210 $(CC) pl.o $(OBJ) $(GD13) $(GD) $(XOBJ) $(LIBS) $(ZLIB) $(MING) -o $(EXE)
211
212 # pl with png support
213 plpng: pl.o $(OBJ) $(XOBJ) gd00files gd16files
214 $(CC) pl.o $(OBJ) $(GD16) $(GD) $(XOBJ) $(GD16LIBS) $(LIBS) $(MING) -o $(EXE)
215
216 # pl with jpeg support (user must supply gd 1.8+)
217 plgd18: pl.o $(OBJ) $(XOBJ) gd18files
218 $(CC) pl.o grgd.o devstuff.o $(OBJ) $(XOBJ) $(GD18LIBS) $(LIBS) $(MING) -o $(EXE)
219
220 # pl with no GD support
221 plnogd: pl.o $(OBJ) $(XOBJ) nogdfiles
222 $(CC) pl.o devstuff.o $(OBJ) $(XOBJ) $(LIBS) $(ZLIB) $(MING) -o $(EXE)
223
224 # libploticus.a with png
225 libploticus-static: $(OBJ) $(XOBJ) api.o gd00files gd16files
226 $(RMCOM) libploticus.$(LIBEXT)
227 $(ARCOM) libploticus.$(LIBEXT) $(OBJ) $(XOBJ) api.o $(GD16) $(GD)
228
229 # this one needs work... suggestions welcome
230 libploticus-so: $(OBJ) $(GDOBJ)
231 $(RMCOM) libploticus.$(LIBEXT)
232 $(CC) $(SHAREFLAG) -o libploticus.$(LIBEXT) $(OBJ) $(GDOBJ)
233
234
235 gd00files:
236 $(CC) $(FPIC) -I./gd13 -I./ -c gdfontg.c gdfontl.c gdfontmb.c gdfonts.c gdfontt.c
237 echo "done with gd00files" > gd00files
238
239 gd13files:
240 $(CC) -c $(WALL) grgd.c -DGD13 -DPLOTICUS -I./gd13 -o grgd13.o
241 $(CC) -c $(CFLAGS) devstuff.c -DGD13 -o devstuff13.o
242 $(CC) -c gd13.c -I./gd13
243 echo "done with gd13files" > gd13files
244
245 gd16files:
246 $(CC) -c $(WALL) $(FPIC) grgd.c -DGD16 -DPLOTICUS -I./ -I./gd16 -o grgd16.o
247 $(CC) -c $(CFLAGS) $(FPIC) devstuff.c -DGD16 -o devstuff16.o
248 $(CC) -c $(FPIC) -I./gd16 -I./ $(GD16H) gd16.c gd_io.c gd_io_dp.c gd_io_file.c gd_png.c
249 echo "done with gd16files" > gd16files
250
251 gd18files:
252 $(CC) -c grgd.c devstuff.c -DGD18 $(GDFREETYPE) $(GD18H) $(CFLAGS)
253
254 nogdfiles:
255 $(CC) -c devstuff.c $(CFLAGS)
256
257 devgrgd:
258 $(CC) -c $(WALL) grgd.c -DGD13 -DPLOTICUS -I./gd13 -o grgd13.o
259 touch pcode.c
260 make
261
262
263
264 install:
265 cp $(EXE) $(INSTALLBIN)
266
267 clean:
268 $(RMCOM) *.o gd??files
269
270 distclean: clean
271 $(RMCOM) $(EXE)
272
273
274 ########
275 ######## PLOTICUS Copyright 1998-2009 Stephen C. Grubb http://ploticus.sourceforge.net
276 ########