# Hello, emacs: this is a -*- Makefile -*- # $Id: makefile.mgw,v 1.41.2.5 2009/02/11 10:00:32 mikulik Exp $ # # GNUPLOT Makefile for MinGW32 MinGW32 on WinNT and Win95/98/.. # This assumes that MinGW32 is used via the MSYS toolkit # (needed some changes to work around command line parsing gotchas) # # To compile gnuplot for WinXX: # # - compile the package: go to directory 'gnuplot' and therefrom run # make -C src -f ../config/makefile.mgw # # This makefile was tested with MSYS, MingW32 and Microsoft Help # Workshop 4.03. # # # ************** Begin of Configuration section ************************ # # Comment out the definition lines to disable the according features: # GIF, PNG, JPEG device drivers # Requires gd library. There are two possibilities how to configure these # drivers for use in gnuplot, depending on the gd version. See README.1ST for # more details. # # You should compile gnuplot with GD library v2.0 or newer. # This library writes PNG, GIF and JPEG images. # If libgd has been compiled with TrueType font support, then you can use # scaled TrueType fonts. If not, then uncomment FREETYPE. # Requires GD, PNG and Z libraries, optionally libfreetype. # In some cases, libfreetype can depend on additional libraries such as # fontconfig or iconv; then, uncomment GDAUTOCONFIGLIBS so that all of the # libraries needed for linking will be taken by running 'gdlib-config'. # NEWGD=1 JPEG=1 FREETYPE=1 #GDAUTOCONFIGLIBS=1 # PDF device driver # Requires PNG and Z libraries based on particular PDF library used, and # optionally also TIFF library according to # 1. defined PDF_NOTIFF: # 'Light' pdf library (produces wgnuplot.exe only 200 KB larger!) # You can get this pdf library by compiling it without PNG, GD and TIFF # support: change pdflib/p_intern.h and recompile the pdf library. # Gnuplot does not use the tiff routines, and gd/png are elsewhere. # 2. undefined PDF_NOTIFF: # Full pdf library (produces wgnuplot.exe 500 KB larger!) #PDF=1 #PDF_NOTIFF=1 # DEBUGging support # creates binaries suitable for debugging. Some bugs may come and go # as opposed to a production build since we lower the optimization level #DEBUG=1 # MOUSE support for the windows terminal MOUSE=1 # PIPES: define if you would prefer support of pipes undef Windows (e.g. # plot '$@ else # sequence of terminals according to "ls term/*.trm": allterm.h: $(CORETERM) @echo "Building allterm.h" @cat $(T)*.trm > allterm.c $(CPP) $(CFLAGS) -I$(T:/=) -DTERM_DRIVER_H -DTERM_HELP allterm.c | \ sed '/^ *$$/d;/^#/d' > allterm.h @rm -f allterm.c endif doc2tex.exe: $(D)doc2tex.c $(D)termdoc.c allterm.h $(LD) $(LDFLAGS) -o $@ -DWINDOWS_NO_GUI -DALL_TERM_DOC $(CFLAGS) \ -I. -I$(D:/=) -I$(T:/=) $(D)doc2tex.c $(D)termdoc.c else # Old version: generate documentation with only currently used terminals: doc2tex.exe: $(D)doc2tex.c $(D)termdoc.c $(LD) $(LDFLAGS) -o $@ -DWINDOWS_NO_GUI $(CFLAGS) -I. -I$(D) -I$(T) $^ endif gnuplot.tex: $(D)gnuplot.doc doc2tex.exe doc2tex $(D)gnuplot.doc gnuplot.tex # Call LaTeX three times to get the toc right. gnuplot.dvi: gnuplot.tex $(D)titlepag.tex cp gnuplot.tex $(D)gp_tex2.tex cp $(D)../VERSION $(D) cd $(D) && latex gp_tex2.tex && latex gp_tex2.tex && latex gp_tex2.tex mv $(D)gp_tex2.dvi gnuplot.dvi rm -f $(D)gp_tex2.* gnuplot.ps: gnuplot.dvi dvips -o gnuplot.ps gnuplot.dvi gnuplot.pdf: gnuplot.tex $(D)titlepag.tex cp gnuplot.tex $(D)gp_tex2.tex cp $(D)../VERSION $(D) cd $(D) && pdflatex gp_tex2.tex && pdflatex gp_tex2.tex && pdflatex gp_tex2.tex mv $(D)gp_tex2.pdf gnuplot.pdf rm -f $(D)gp_tex2.* # clean up temporary files clean: $(RM) config.h *.$(O) wgnuplot.map wgnuplot.res win/gnuplot.rtf $(RM) wxterminal/*.$(O) $(RM) doc2rtf.exe win/wgnuplib.res wgnuplib.map wgnuplot.lib $(RM) $(M)bf_test.exe *.ico geticon.exe allterm.h allterm.c $(RM) gnuplot.tex gnuplot.dvi gnuplot.ps gnuplot.pdf realclean: veryclean veryclean: clean $(RM) wgnuplot.exe wgnuplot.hlp wgnuplot.mnu wgnuplot.gid $(RM) $(M)binary[123] $(M)fit.log $(M)soundfit.par # now move the whole stuff to its destination install: default mkdir -p $(DESTDIR) cp wgnuplot.exe $(DESTDIR)/wgnuplot.exe cp win/wgnuplot.mnu $(DESTDIR)/wgnuplot.mnu cp wgnuplot.hlp $(DESTDIR)/wgnuplot.hlp cp pgnuplot.exe $(DESTDIR)/pgnuplot.exe mkdir -p $(DESTDIR)/share/PostScript cp ../term/PostScript/*.ps $(DESTDIR)/$(GNUPLOT_PS_DIR)