######## PLOTICUS version 2.40 Copyright 1998-2008 Stephen C. Grubb http://ploticus.sourceforge.net ######## ######## Use this Makefile to build pl executable or libploticus. Root permission not required. ######## Answer the three questions below then do: make clean; make ######## Note that default settings should be ready to go for most linux platforms. ######## Problem reports and questions may be sent to ploticus@yahoogroups.com # defaults.. CC = gcc PLATFORM = UNIX RMCOM = rm -f NOX11 = -DNOX11 NOSWF = -DNOSWF EXE = pl #################################################################### ########## First question: ########## What do you wish to build? pl executable? libploticus? ########## Select ONE option below by activating the appropriate lines... ########## All other lines should be commented out. #################################################################### ############ Option 1: build the pl executable (unix), no X11 .... # NOX11 = -DNOX11 ############ Option 2: build the pl executable (unix), with X11 enabled .... # NOX11 = # XOBJ = x11.o interact.o ############ If you're choosing option 2, indicate where your X11 libs and header files are.. activate lines below as appropriate.. #### linux # XLIBS = -L/usr/local/lib -lX11 # XINCLUDEDIR = -I/usr/local/include #### alt linux # XLIBS = -lX11 # XINCLUDEDIR = -I/usr/include/X11 #### 64bit linux # XLIBS = -L/usr/local/lib64 -lX11 #### solaris # XLIBS = -L/usr/openwin/lib -lX11 # XINCLUDEDIR = -I/usr/openwin/include #### mac osx # CC = cc # XLIBS = -L/usr/local/lib -lX11 # XINCLUDEDIR = -I/usr/local/include #### cygwin # XLIBS = -L/usr/local/lib -lX11 # XINCLUDEDIR = -I/usr/local/include # PLATFORM = WIN32 ############ Option 3: build pl executable (native win32 pl.exe) # PLATFORM = WIN32 # RMCOM = del ############ Option 4: build static libploticus (unix) with png support LIBEXT = a ARCOM = ar r target: libploticus-static ############ Option 5: build shared libploticus (unix) ############ Note: untested ... suggestions welcome -sg # LIBEXT = a # FPIC = -fPIC # SONAME = libploticus.so.0 # SHAREFLAG = -shared -Wl,-soname,$(SONAME) # target: libploticus-so ############################################################################ ######### Second question: ######### Ploticus uses the GD library to create PNG, GIF, JPEG images. ######### This distribution includes GD13 (GIF), and GD16 (PNG) code. ######### You can choose to use one of these or you can choose to use your ######### own GD version, or you can choose to not use GD at all. ############################################################################ ########### Option 1: use bundled GD13 (pseudoGIF only). No additional lib dependencies. # exetarget: pl # GDOBJ = $(GD) $(GD13) ########### Option 2: use bundled GD16 (PNG only). Requires libpng and zlib. exetarget: plpng # GD16LIBS = -lpng -lz # GD16H = ZFLAG = -DWZ GD16LIBS = /home/scg/lib/libpng.a /home/scg/lib/libz.a GD16H = -I/home/scg/lib GDOBJ = $(GD) $(GD16) ########### Option 3: use your own GD resource. Requires GD 1.84+, libpng, zlib, libjpeg # exetarget: plgd18 # GD18LIBS = -lgd -lpng -lz -ljpeg # GD18H = # GDFREETYPE = # ZFLAG = -DWZ ########### Option 4: use your own GD resource with FreeType2 fonts enabled. ########### Requires GD 1.84+, libpng, zlib, libjpeg and libfreetype # exetarget: plgd18 # GD18LIBS = -lgd -lpng -lz -ljpeg -lfreetype # GD18H = # GDFREETYPE = -DGDFREETYPE # ZFLAG = -DWZ ########### Option 5: don't use GD at all. # exetarget: plnogd # NOGD = -DNOGD ################################################################ ######## Third question. ######## Other various settings you may want to make. ################################################################ #### For SWF (flash) output capability activate the following. If necessary change -lming to location of ming. #### Note, successful with ming 0.2a but not with later ming versions.. # MING = -lming #optional for non-standard location: MINGH = -I/home/scg/lib #### If you do a "make install", where do you want the executable(s) to be moved to? INSTALLBIN = /usr/local/bin #### For LOCALE support (non-roman alphabets & collation), uncomment the following.. # LOCALEOBJ = localef.o # LOCALE_FLAG = -DLOCALE #### SVG output is always available by default. #### If you want compressed SVG (.svgz), and you selected GD13 or no GD above, #### uncomment the following. You need to have zlib. If necessary change -lz to location of zlib. # ZLIB = -lz # ZFLAG = -DWZ #### To completely remove PostScript / EPS output capability, uncomment the following.. # NOPS = -DNOPS #### To completely remove SVG output capability, uncomment the following.. # NOSVG = -DNOSVG #### To see all possible compiler warnings, uncomment the following line.. WALL = -Wall ############################################################################### ######## Done. Now save this file and type: make clean; make ########### ######## ########### ############################################################################### ######## FYI... additional Makefile statement examples: ######## eg: GD16LIBS = /home/scg/lib/libpng.a /home/scg/lib/libz.a ######## eg: GD16H = -I/home/scg/lib ######## GD18LIBS = -L /home/scg/lib -lgd -lpng -lz -ljpeg -lfreetype ######## GD18H = -I/home/scg/lib/freetype-2.0.4/include -I/home/scg/lib/gd-1.8.4 ######## 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 ######## eg: MINGH = -I/home/scg/lib ######## eg: MING = /home/scg/lib/libming.a ############################################################################### ############################################################################### ############################################################################### ############################################################################### GD13 = grgd13.o devstuff13.o gd13.o GD16 = grgd16.o devstuff16.o gd16.o gd_io.o gd_io_dp.o gd_io_file.o gd_png.o GD = gdfontg.o gdfontl.o gdfontmb.o gdfonts.o gdfontt.o LIBS = $(XLIBS) -lm $(ADDLIBS) CFLAGS = $(FPIC) $(WALL) -DPLOTICUS -D$(PLATFORM) -DTDH_NOREC $(ZFLAG) $(LOCALE_FLAG) \ $(NOGD) $(NOX11) $(NOPS) $(NOSVG) $(NOSWF) $(XINCLUDEDIR) $(MINGH) OBJ = proc_annotate.o proc_areadef.o proc_axis.o proc_bars.o proc_rect.o proc_breakaxis.o \ proc_categories.o proc_curvefit.o proc_settings.o proc_drawcommands.o \ proc_getdata.o proc_image.o proc_legend.o proc_legendentry.o proc_line.o proc_lineplot.o \ proc_page.o proc_pie.o proc_print.o proc_boxplot.o proc_rangesweep.o proc_usedata.o \ 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 \ plhead.o execscriptfile.o execline.o lib.o details.o parse.o units.o preliminaries.o \ process_arg.o plvalue_subst.o cats.o fieldnames.o autorange.o nearest.o select.o datasets.o \ 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 \ condex.o dates.o dbinterface.o err.o functions.o glroutines.o reslimits.o secondaryops.o \ shell.o sinterp.o tdhkit.o times.o value.o value_subst.o variable.o custom.o \ $(LOCALEOBJ) # pl with gif support pl: pl.o $(OBJ) $(XOBJ) gd00files gd13files $(CC) pl.o $(OBJ) $(GD13) $(GD) $(XOBJ) $(LIBS) $(ZLIB) $(MING) -o $(EXE) # pl with png support plpng: pl.o $(OBJ) $(XOBJ) gd00files gd16files $(CC) pl.o $(OBJ) $(GD16) $(GD) $(XOBJ) $(GD16LIBS) $(LIBS) $(MING) -o $(EXE) # pl with jpeg support (user must supply gd 1.8+) plgd18: pl.o $(OBJ) $(XOBJ) gd18files $(CC) pl.o grgd.o devstuff.o $(OBJ) $(XOBJ) $(GD18LIBS) $(LIBS) $(MING) -o $(EXE) # pl with no GD support plnogd: pl.o $(OBJ) $(XOBJ) nogdfiles $(CC) pl.o devstuff.o $(OBJ) $(XOBJ) $(LIBS) $(ZLIB) $(MING) -o $(EXE) # libploticus.a with png libploticus-static: $(OBJ) api.o gd00files gd16files $(RMCOM) libploticus.$(LIBEXT) $(ARCOM) libploticus.$(LIBEXT) $(OBJ) api.o $(GD16) $(GD) # this one needs work... suggestions welcome libploticus-so: $(OBJ) $(GDOBJ) $(RMCOM) libploticus.$(LIBEXT) $(CC) $(SHAREFLAG) -o libploticus.$(LIBEXT) $(OBJ) $(GDOBJ) gd00files: $(CC) -I./gd13 -I./ -c gdfontg.c gdfontl.c gdfontmb.c gdfonts.c gdfontt.c echo "done with gd00files" > gd00files gd13files: $(CC) -c $(WALL) grgd.c -DGD13 -DPLOTICUS -I./gd13 -o grgd13.o $(CC) -c $(CFLAGS) devstuff.c -DGD13 -o devstuff13.o $(CC) -c gd13.c -I./gd13 echo "done with gd13files" > gd13files gd16files: $(CC) -c $(WALL) grgd.c -DGD16 -DPLOTICUS -I./ -I./gd16 -o grgd16.o $(CC) -c $(CFLAGS) devstuff.c -DGD16 -o devstuff16.o $(CC) -c -I./gd16 -I./ $(GD16H) gd16.c gd_io.c gd_io_dp.c gd_io_file.c gd_png.c echo "done with gd16files" > gd16files gd18files: $(CC) -c grgd.c devstuff.c -DGD18 $(GDFREETYPE) $(GD18H) $(CFLAGS) nogdfiles: $(CC) -c devstuff.c $(CFLAGS) devgrgd: $(CC) -c $(WALL) grgd.c -DGD13 -DPLOTICUS -I./gd13 -o grgd13.o touch pcode.c make install: cp $(EXE) $(INSTALLBIN) clean: $(RMCOM) *.o gd??files distclean: clean $(RMCOM) $(EXE)