File: [local] / OpenXM_contrib / gnuplot / Attic / makefile.dj2 (download)
Revision 1.1.1.2 (vendor branch), Mon Sep 15 07:09:23 2003 UTC (20 years, 11 months ago) by ohara
Branch: GNUPLOT
CVS Tags: VERSION_3_7_3, RELEASE_1_2_3, RELEASE_1_2_2_KNOPPIX_b, RELEASE_1_2_2_KNOPPIX Changes since 1.1.1.1: +16 -34
lines
Import gnuplot 3.7.3
|
# make file for gnuplot 3.7 / DOS / DJGPP version 2
#
# compile it by make -f makefile.dj2 in the main gnuplot directory
#
#
# AUTHORS : several ... including Edzer Pebesma <pebesma@metoor.frw.uva.nl>
# Emmanuel Bigler <bigler@lpmo.univ-fcomte.fr>
# last mod by Hans-Bernhard Br"oker <broeker@physik.rwth-aachen.de>
# DATE of last mod : March 11th, 2002
#
#
# removed atari reference and added binary demo bf_test
# cleaned up the building of doc and binary test files
# gnuplot.gih will be built now inside the docs directory like under
# UNIX. The problem is that DOS does not recognize sub-shells like
# (cd dir ; do things) inside the makefile.
# solution -> assume everything is done inside gnuplot main dir, under
# a single DOS command process
#
# install target added : will copy the executable + helpfile in a given
# directory ; customize it, see FINALDEST
#
#
# here customize where you put gnuplot executable for make install
# for simplicity the helpfile will be copied in the same dir.
# convention used here : no trailing \ for directory names
FINALDEST=c:\bin
# here customize the name of the executable
# exe file will be gp37.exe:
EXENAME = gp37
# where to place gnuplot.gih helpfile upon MAKE
# note it will be built inside gnuplot\$(HELPDEST)
# and eventually copied to FINALDEST when install
HELPDEST =docs
# name of the helpfile
HELPFILE =gnuplot.gih
# compiler
CCDIR = c:\djgpp\bin\
CC = $(CCDIR)gcc
# include directory
INCLUDE = -I.
# for svga term driver
# HBB: -finline-functions used to crash on term.c, but no longer
TERMFLAGS = -DDJSVGA # -fno-inline-functions
#
#
#just for historical purpose..
## DJGPP 1.xx:
# CFLAGS = -DMSDOS -DDJGPP -DREADLINE -DHAVE_STRNICMP -O
# LINKOPT = -lm -lpc -lgrx
## DJGPP 2.0:
# HBB : added $(OPTS) so user can
# change CFLAGS easily, without having to change makefile
CFLAGS = -DMSDOS -DDOS32 \
-DANSI_C -DSTDC_HEADERS -DHAVE_TIME_H -DHAVE_TIME_T_IN_TIME_H \
-DHAVE_VALUES_H -DHAVE_UNISTD_H -DRETSIGTYPE=void \
-DHAVE_ERF -DHAVE_LGAMMA -DHAVE_GAMMA \
-DHAVE_GETCWD -DHAVE_SETLINEBUF -DHAVE_SLEEP \
-DHAVE_STRNCASECMP -DHAVE_STRNICMP -DHAVE_STRERROR \
-DHAVE_SETVBUF \
-DHAVE_TEMPNAM -DPIPES -DREADLINE \
-O2 -g $(OPTS)
LINKOPT = $(LDFLAGS) -lm -lpc -lgrx20
# HBB: removed reference to no-more-existing term/bigfig.trm
CSOURCE5 = term/ai.trm term/amiga.trm term/aed.trm \
term/cgi.trm term/djsvga.trm term/dumb.trm \
term/dxf.trm term/dxy.trm \
term/debug.trm term/eepic.trm term/epson.trm term/fig.trm \
term/hp26.trm term/hp2648.trm term/hpgl.trm \
term/hpljii.trm term/metafont.trm\
term/apollo.trm term/gpr.trm term/hppj.trm term/compact.c
CSOURCE6 = term/impcodes.h term/imagen.trm term/next.trm term/object.h \
term/iris4d.trm term/kyo.trm term/latex.trm term/mif.trm \
term/pbm.trm term/pdf.trm term/pc.trm
CSOURCE7 = term/post.trm term/qms.trm term/regis.trm term/sun.trm term/svg.trm \
term/t410x.trm term/tek.trm term/texdraw.trm term/unixpc.trm \
term/unixplot.trm term/v384.trm term/vws.trm term/x11.trm term/xlib.trm
OBJ1 = bitmap.o command.o contour.o eval.o graphics.o graph3d.o hidden3d.o util3d.o
OBJ2 = help.o internal.o misc.o parse.o plot.o plot2d.o plot3d.o readline.o
OBJ3 = scanner.o set.o show.o specfun.o standard.o stdfn.o term.o time.o util.o
OBJ4 = version.o binary.o interpol.o fit.o matrix.o datafile.o alloc.o
CSOURCES = $(CSOURCE5) $(CSOURCE6) $(CSOURCE7)
OBJS = $(OBJ1) $(OBJ2) $(OBJ3) $(OBJ4)
.c.o:
$(CC) -c $(CFLAGS) $(INCLUDE) $<
%:: RCS/%
$(patsubst $@-noexist,$(CO) $(COFLAGS) $< $@, \
$(filter-out $@,$(firstword $(wildcard $@) $@-noexist)))
all: $(EXENAME).exe $(HELPDEST)\$(HELPFILE) demo\binary?.
# Note: this is set up so you get a debuggable $(EXENAME) but
# a stripped $(EXENAME).exe
$(EXENAME).exe : $(OBJS)
$(CC) -o $(EXENAME) $(OBJS) $(LINKOPT)
objcopy --strip-all $(EXENAME) $(EXENAME).exe
stubify $(EXENAME).exe
command.o: command.c plot.h setshow.h help.h
$(CC) -c $(CFLAGS) $(INCLUDE) -DHELPFILE=\"$(HELPFILE)\" command.c
show.o: show.c plot.h setshow.h
$(CC) -c $(CFLAGS) $(INCLUDE) -DHELPFILE=\"$(HELPFILE)\" $<
term.o: term.c term.h plot.h set.c show.c bitmap.h $(CSOURCES)
$(CC) -c $(CFLAGS) $(INCLUDE) $(TERMFLAGS) -Iterm term.c
$(OBJS): plot.h
command.o help.o misc.o: help.h
command.o graphics.o graph3d.o hidden3d.o util3d.o misc.o plot.o set.o show.o term.o interpol.o: setshow.h
command.o fit.o matrix.o: fit.h
fit.o matrix.o: matrix.h
bitmap.o term.o: bitmap.h
#HBB 961201: add dependencies to trigger RCS checkout if necessary:
plot.h: protos.h
protos.h: alloc.h
EMAIL=broeker@physik.rwth-aachen.de
version.o: version.c
$(CC) -c -DCONTACT=\"$(EMAIL)\" $(CFLAGS) $(INCLUDE) version.c
# convert gnuplot.doc to gnuplot.gih
$(HELPDEST)\$(HELPFILE): .\docs\doc2gih.exe .\docs\gnuplot.doc
.\docs\doc2gih docs/gnuplot.doc > $(HELPDEST)\$(HELPFILE)
.\docs\doc2gih.exe: .\docs\doc2gih.c .\docs\termdoc.c $(CSOURCES)
$(CC) $(CFLAGS) $(INCLUDE) $(TERMFLAGS) -Iterm -o ./docs/doc2gih.exe ./docs/doc2gih.c ./docs/termdoc.c
# now for the demo bin
demo\binary?.: bf_test.exe
./bf_test
copy binary? demo\binary?
del binary?
bf_test.o:
$(CC) $(CFLAGS) -c bf_test.c
bf_test.exe: bf_test.o binary.o alloc.o
$(CC) $(CFLAGS) bf_test.o binary.o alloc.o -lm -o bf_test.exe
# now install things and create a .bat file to make things easier
install: all
copy $(EXENAME).exe $(FINALDEST)
copy $(HELPDEST)\$(HELPFILE) $(FINALDEST)
#HBB: if at all, this batch-file should only be generated by a
#separate target, like 'install-bat'. Besides, it doesn't work,
#as is, because DOS always executes foo.exe before even looking for
#a foo.bat
# del $(EXENAME).bat
# echo @echo off > $(EXENAME).bat
# echo SET GNUHELP= $(FINALDEST)\$(HELPFILE) >> $(EXENAME).bat
# echo SET GNUPLOT= $(FINALDEST) >> $(EXENAME).bat
# echo $(FINALDEST)\$(EXENAME).exe %1 %2 %3 %4 %5 %6 >> $(EXENAME).bat
# echo SET GNUHELP= >> $(EXENAME).bat
# echo SET GNUPLOT= >> $(EXENAME).bat
# copy $(EXENAME).bat $(FINALDEST)
# clean target - remove all temp files, but leave executable intact
clean:
del *.o
del $(EXENAME)
del .\docs\doc2gih
del .\docs\doc2gih.exe
del bf_test
del bf_test.exe
# realclean target - remove all files created by the makefile
realclean: clean
del $(EXENAME).exe
del $(HELPDEST)\$(HELPFILE)
del .\demo\binary1
del .\demo\binary2
del .\demo\binary3
del .\demo\fit.log
del .\demo\soundfit.par
#####
## END OF GNUPLOT 3.7 MAKEFILE FOR DJGPP V2
#####