1
######## PLOTICUS version 2.41 Copyright 1998-2009 Stephen C. Grubb http://ploticus.sourceforge.net
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 ploticus@yahoogroups.com
19
####################################################################
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
####################################################################
27
############ Option 1: build the pl executable (unix), no X11 ....
32
############ Option 2: build the pl executable (unix), with X11 enabled ....
34
XOBJ = x11.o interact.o
36
############ ...AND... activate the lines below for your platform... (X11 libs & header files)
38
# XLIBS = -L/usr/X11R6/lib -lX11
39
# XINCLUDEDIR = -I/usr/X11R6/include
42
# XINCLUDEDIR = -I/usr/include/X11
44
# XLIBS = -L/usr/X11R6/lib64 -lX11
46
XLIBS = -L/usr/openwin/lib -lX11
47
XINCLUDEDIR = -I/usr/openwin/include
49
# CC = cc -arch ppc -arch i386
50
# XLIBS = -L/usr/X11R6/lib -lX11
51
# XINCLUDEDIR = -I/usr/X11R6/include
53
# XLIBS = -L/usr/X11R6/lib -lX11
54
# XINCLUDEDIR = -I/usr/X11R6/include
59
############ Option 3: build pl executable (native win32 pl.exe)
65
############ Option 4: build static libploticus (unix) with PNG support (remember to also select PNG in Setting 2)
68
# target: libploticus-static
69
#### and if you want X11 enabled uncomment the following line..
70
# XOBJ = x11.o interact.o
74
############ Option 5: build shared libploticus (unix)
75
############ Note: untested by me ... suggestions welcome -sg
78
# SONAME = libploticus.so.0
79
# SHAREFLAG = -shared -Wl,-soname,$(SONAME)
80
# target: libploticus-so
84
############################################################################
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
############################################################################
93
########### Option 1: use bundled GD16 (PNG only). Requires libpng and zlib.
95
## #GD16LIBS = -lpng -lz
98
# GD16LIBS = /home/scg/lib/libpng.a /home/scg/lib/libz.a
99
# GD16H = -I/home/scg/lib
101
########### Option 2: use bundled GD13 (GIF only). No additional lib dependencies.
104
########### Option 3: use your own GD resource. Requires GD 1.84+, libpng, zlib, libjpeg
106
# GD18LIBS = -lgd -lpng -lz -ljpeg
111
########### Option 4: use your own GD resource with FreeType2 fonts enabled.
112
########### Requires GD 1.84+, libpng, zlib, libjpeg and libfreetype
114
# GD18LIBS = -lgd -lpng -lz -ljpeg -lfreetype
116
# GDFREETYPE = -DGDFREETYPE
119
########### Option 5: don't use GD at all.
125
################################################################
126
######## Third question.
127
######## Other various settings you may want to make.
128
################################################################
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..
134
#optional for non-standard location: MINGH = -I/home/scg/lib
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.
141
#### If you do a "make install", where do you want the executable(s) to be moved to?
142
INSTALLBIN = /usr/local/bin
145
#### For LOCALE support (non-roman alphabets & collation), uncomment the following..
146
# LOCALEOBJ = localef.o
147
# LOCALE_FLAG = -DLOCALE
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.
155
#### To completely remove PostScript / EPS output capability, uncomment the following..
158
#### To completely remove SVG output capability, uncomment the following..
161
#### To see all possible compiler warnings, uncomment the following line..
166
###############################################################################
167
######## Done. Now save this file and type: make clean; make ###########
169
###############################################################################
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
180
###############################################################################
181
###############################################################################
182
###############################################################################
183
###############################################################################
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
190
LIBS = $(XLIBS) -lm $(ADDLIBS)
192
CFLAGS = $(FPIC) $(WALL) -DPLOTICUS -D$(PLATFORM) -DTDH_NOREC $(ZFLAG) $(LOCALE_FLAG) \
193
$(NOGD) $(NOX11) $(NOPS) $(NOSVG) $(NOSWF) $(XINCLUDEDIR) $(MINGH)
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 \
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)
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)
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)
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)
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)
229
# this one needs work... suggestions welcome
230
libploticus-so: $(OBJ) $(GDOBJ)
231
$(RMCOM) libploticus.$(LIBEXT)
232
$(CC) $(SHAREFLAG) -o libploticus.$(LIBEXT) $(OBJ) $(GDOBJ)
236
$(CC) $(FPIC) -I./gd13 -I./ -c gdfontg.c gdfontl.c gdfontmb.c gdfonts.c gdfontt.c
237
echo "done with gd00files" > gd00files
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
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
252
$(CC) -c grgd.c devstuff.c -DGD18 $(GDFREETYPE) $(GD18H) $(CFLAGS)
255
$(CC) -c devstuff.c $(CFLAGS)
258
$(CC) -c $(WALL) grgd.c -DGD13 -DPLOTICUS -I./gd13 -o grgd13.o
265
cp $(EXE) $(INSTALLBIN)
268
$(RMCOM) *.o gd??files
275
######## PLOTICUS Copyright 1998-2009 Stephen C. Grubb http://ploticus.sourceforge.net