Annotation of OpenXM_contrib/gnuplot/makefile.dj2, Revision 1.1.1.2
1.1 maekawa 1: # make file for gnuplot 3.7 / DOS / DJGPP version 2
2: #
3: # compile it by make -f makefile.dj2 in the main gnuplot directory
4: #
5: #
6: # AUTHORS : several ... including Edzer Pebesma <pebesma@metoor.frw.uva.nl>
1.1.1.2 ! ohara 7: # Emmanuel Bigler <bigler@lpmo.univ-fcomte.fr>
! 8: # last mod by Hans-Bernhard Br"oker <broeker@physik.rwth-aachen.de>
! 9: # DATE of last mod : March 11th, 2002
1.1 maekawa 10: #
11: #
12: # removed atari reference and added binary demo bf_test
13: # cleaned up the building of doc and binary test files
14: # gnuplot.gih will be built now inside the docs directory like under
15: # UNIX. The problem is that DOS does not recognize sub-shells like
16: # (cd dir ; do things) inside the makefile.
17: # solution -> assume everything is done inside gnuplot main dir, under
18: # a single DOS command process
19: #
20: # install target added : will copy the executable + helpfile in a given
21: # directory ; customize it, see FINALDEST
22: #
23: #
24: # here customize where you put gnuplot executable for make install
25: # for simplicity the helpfile will be copied in the same dir.
26: # convention used here : no trailing \ for directory names
27: FINALDEST=c:\bin
28:
29: # here customize the name of the executable
1.1.1.2 ! ohara 30: # exe file will be gp37.exe:
! 31: EXENAME = gp37
1.1 maekawa 32:
33: # where to place gnuplot.gih helpfile upon MAKE
34: # note it will be built inside gnuplot\$(HELPDEST)
35: # and eventually copied to FINALDEST when install
36: HELPDEST =docs
37:
38: # name of the helpfile
39: HELPFILE =gnuplot.gih
40:
41: # compiler
42: CCDIR = c:\djgpp\bin\
43: CC = $(CCDIR)gcc
44: # include directory
45: INCLUDE = -I.
46:
47: # for svga term driver
1.1.1.2 ! ohara 48: # HBB: -finline-functions used to crash on term.c, but no longer
! 49: TERMFLAGS = -DDJSVGA # -fno-inline-functions
1.1 maekawa 50: #
51: #
52: #just for historical purpose..
53: ## DJGPP 1.xx:
54: # CFLAGS = -DMSDOS -DDJGPP -DREADLINE -DHAVE_STRNICMP -O
55: # LINKOPT = -lm -lpc -lgrx
56:
57: ## DJGPP 2.0:
58: # HBB : added $(OPTS) so user can
59: # change CFLAGS easily, without having to change makefile
60: CFLAGS = -DMSDOS -DDOS32 \
1.1.1.2 ! ohara 61: -DANSI_C -DSTDC_HEADERS -DHAVE_TIME_H -DHAVE_TIME_T_IN_TIME_H \
1.1 maekawa 62: -DHAVE_VALUES_H -DHAVE_UNISTD_H -DRETSIGTYPE=void \
63: -DHAVE_ERF -DHAVE_LGAMMA -DHAVE_GAMMA \
64: -DHAVE_GETCWD -DHAVE_SETLINEBUF -DHAVE_SLEEP \
65: -DHAVE_STRNCASECMP -DHAVE_STRNICMP -DHAVE_STRERROR \
66: -DHAVE_SETVBUF \
67: -DHAVE_TEMPNAM -DPIPES -DREADLINE \
1.1.1.2 ! ohara 68: -O2 -g $(OPTS)
1.1 maekawa 69:
70: LINKOPT = $(LDFLAGS) -lm -lpc -lgrx20
71:
72: # HBB: removed reference to no-more-existing term/bigfig.trm
73: CSOURCE5 = term/ai.trm term/amiga.trm term/aed.trm \
74: term/cgi.trm term/djsvga.trm term/dumb.trm \
75: term/dxf.trm term/dxy.trm \
76: term/debug.trm term/eepic.trm term/epson.trm term/fig.trm \
77: term/hp26.trm term/hp2648.trm term/hpgl.trm \
78: term/hpljii.trm term/metafont.trm\
79: term/apollo.trm term/gpr.trm term/hppj.trm term/compact.c
80: CSOURCE6 = term/impcodes.h term/imagen.trm term/next.trm term/object.h \
81: term/iris4d.trm term/kyo.trm term/latex.trm term/mif.trm \
1.1.1.2 ! ohara 82: term/pbm.trm term/pdf.trm term/pc.trm
! 83: CSOURCE7 = term/post.trm term/qms.trm term/regis.trm term/sun.trm term/svg.trm \
1.1 maekawa 84: term/t410x.trm term/tek.trm term/texdraw.trm term/unixpc.trm \
85: term/unixplot.trm term/v384.trm term/vws.trm term/x11.trm term/xlib.trm
86: OBJ1 = bitmap.o command.o contour.o eval.o graphics.o graph3d.o hidden3d.o util3d.o
87: OBJ2 = help.o internal.o misc.o parse.o plot.o plot2d.o plot3d.o readline.o
88: OBJ3 = scanner.o set.o show.o specfun.o standard.o stdfn.o term.o time.o util.o
89: OBJ4 = version.o binary.o interpol.o fit.o matrix.o datafile.o alloc.o
90:
91: CSOURCES = $(CSOURCE5) $(CSOURCE6) $(CSOURCE7)
92: OBJS = $(OBJ1) $(OBJ2) $(OBJ3) $(OBJ4)
93:
94: .c.o:
95: $(CC) -c $(CFLAGS) $(INCLUDE) $<
96:
97: %:: RCS/%
98: $(patsubst $@-noexist,$(CO) $(COFLAGS) $< $@, \
99: $(filter-out $@,$(firstword $(wildcard $@) $@-noexist)))
100:
101: all: $(EXENAME).exe $(HELPDEST)\$(HELPFILE) demo\binary?.
102:
1.1.1.2 ! ohara 103: # Note: this is set up so you get a debuggable $(EXENAME) but
! 104: # a stripped $(EXENAME).exe
1.1 maekawa 105: $(EXENAME).exe : $(OBJS)
106: $(CC) -o $(EXENAME) $(OBJS) $(LINKOPT)
107: objcopy --strip-all $(EXENAME) $(EXENAME).exe
108: stubify $(EXENAME).exe
109:
110: command.o: command.c plot.h setshow.h help.h
111: $(CC) -c $(CFLAGS) $(INCLUDE) -DHELPFILE=\"$(HELPFILE)\" command.c
112:
113: show.o: show.c plot.h setshow.h
114: $(CC) -c $(CFLAGS) $(INCLUDE) -DHELPFILE=\"$(HELPFILE)\" $<
115:
116: term.o: term.c term.h plot.h set.c show.c bitmap.h $(CSOURCES)
117: $(CC) -c $(CFLAGS) $(INCLUDE) $(TERMFLAGS) -Iterm term.c
118:
119: $(OBJS): plot.h
120:
121: command.o help.o misc.o: help.h
122:
123: command.o graphics.o graph3d.o hidden3d.o util3d.o misc.o plot.o set.o show.o term.o interpol.o: setshow.h
124:
125: command.o fit.o matrix.o: fit.h
126:
127: fit.o matrix.o: matrix.h
128:
129: bitmap.o term.o: bitmap.h
130:
131: #HBB 961201: add dependencies to trigger RCS checkout if necessary:
132: plot.h: protos.h
133: protos.h: alloc.h
134:
135: EMAIL=broeker@physik.rwth-aachen.de
136: version.o: version.c
137: $(CC) -c -DCONTACT=\"$(EMAIL)\" $(CFLAGS) $(INCLUDE) version.c
138:
139: # convert gnuplot.doc to gnuplot.gih
140: $(HELPDEST)\$(HELPFILE): .\docs\doc2gih.exe .\docs\gnuplot.doc
141: .\docs\doc2gih docs/gnuplot.doc > $(HELPDEST)\$(HELPFILE)
142:
143: .\docs\doc2gih.exe: .\docs\doc2gih.c .\docs\termdoc.c $(CSOURCES)
1.1.1.2 ! ohara 144: $(CC) $(CFLAGS) $(INCLUDE) $(TERMFLAGS) -Iterm -o ./docs/doc2gih.exe ./docs/doc2gih.c ./docs/termdoc.c
1.1 maekawa 145:
146: # now for the demo bin
147: demo\binary?.: bf_test.exe
1.1.1.2 ! ohara 148: ./bf_test
1.1 maekawa 149: copy binary? demo\binary?
150: del binary?
151:
152: bf_test.o:
153: $(CC) $(CFLAGS) -c bf_test.c
154:
155: bf_test.exe: bf_test.o binary.o alloc.o
1.1.1.2 ! ohara 156: $(CC) $(CFLAGS) bf_test.o binary.o alloc.o -lm -o bf_test.exe
1.1 maekawa 157:
158: # now install things and create a .bat file to make things easier
159: install: all
160: copy $(EXENAME).exe $(FINALDEST)
161: copy $(HELPDEST)\$(HELPFILE) $(FINALDEST)
162: #HBB: if at all, this batch-file should only be generated by a
163: #separate target, like 'install-bat'. Besides, it doesn't work,
164: #as is, because DOS always executes foo.exe before even looking for
165: #a foo.bat
166: # del $(EXENAME).bat
167: # echo @echo off > $(EXENAME).bat
168: # echo SET GNUHELP= $(FINALDEST)\$(HELPFILE) >> $(EXENAME).bat
169: # echo SET GNUPLOT= $(FINALDEST) >> $(EXENAME).bat
170: # echo $(FINALDEST)\$(EXENAME).exe %1 %2 %3 %4 %5 %6 >> $(EXENAME).bat
171: # echo SET GNUHELP= >> $(EXENAME).bat
172: # echo SET GNUPLOT= >> $(EXENAME).bat
173: # copy $(EXENAME).bat $(FINALDEST)
174:
175:
176: # clean target - remove all temp files, but leave executable intact
177: clean:
178: del *.o
179: del $(EXENAME)
180: del .\docs\doc2gih
181: del .\docs\doc2gih.exe
182: del bf_test
183: del bf_test.exe
184:
185: # realclean target - remove all files created by the makefile
186: realclean: clean
187: del $(EXENAME).exe
188: del $(HELPDEST)\$(HELPFILE)
189: del .\demo\binary1
190: del .\demo\binary2
191: del .\demo\binary3
192: del .\demo\fit.log
193: del .\demo\soundfit.par
194: #####
195: ## END OF GNUPLOT 3.7 MAKEFILE FOR DJGPP V2
196: #####
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>