Debian Codegraph @

src/mkapi

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