# Hey, Emacs, this is a -*- Makefile -*-
#
# GNUPLOT Makefile for Cygwin on WinNT and Win95/98/2000
#
# To compile gnuplot for WinXX:
#
# - check the beginning of this file settings you may want to change
# You'll have to tell it where to find the Help Compiler, among other
# things.
# - compile the package: go to directory 'gnuplot' and issue the commands
# make -C src -f ../config/makefile.cyg
# make install -C src -f ../config/makefile.cyg
# - resource compiler used is windres.exe in Cygwin
# - note pdf, png, and gif libraries if used have to be build for Cygwin
# with -mno-cygwin option
# - -static used for static linking to libz-w.a and libpng-w.a
#
#
# ************** Begin of Configuration section ************************
#
# Choose target to compile:
# 1. wgnuplot.exe: The usual Windows GUI for input commands.
# 2. wgnuplot_pipes.exe: The usual Windows GUI with support of pipes, so
# that e.g. plot '$@
else
# sequence of terminals according to "ls term/*.trm":
allterm.h: $(CORETERM)
@echo "Building allterm.h"
@cat ../term/*.trm > allterm.c
$(CPP) $(CFLAGS) -I$../term -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../term -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
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
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) 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_pipes.exe gnuplot.exe pgnuplot.exe
$(RM) wgnuplot.hlp 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 gnuplot.exe $(DESTDIR)/gnuplot.exe
cp wgnuplot.exe $(DESTDIR)/wgnuplot.exe
cp wgnuplot_pipes.exe $(DESTDIR)/wgnuplot_pipes.exe
cp pgnuplot.exe $(DESTDIR)/pgnuplot.exe
cp win/wgnuplot.mnu $(DESTDIR)/wgnuplot.mnu
cp wgnuplot.hlp $(DESTDIR)/wgnuplot.hlp
mkdir -p $(DESTDIR)/$(GNUPLOT_PS_DIR)
cp ../term/PostScript/*.ps $(DESTDIR)/$(GNUPLOT_PS_DIR)
mkdir -p $(DESTDIR)/$(GNUPLOT_LUA_DIR)
cp ../term/lua/* $(DESTDIR)/$(GNUPLOT_LUA_DIR)
mkdir -p $(DESTDIR)/$(GNUPLOT_JS_DIR)
cp ../term/js/* $(DESTDIR)/$(GNUPLOT_JS_DIR)