2 # $Id: makefile.mto,v 1.5 1999/12/01 22:07:57 lhecking Exp $
4 # GNUPLOT Makefile for GCC-ST 1.x and 2.x
5 # in a cross development environment (unix) or a native TOS environment
6 # (see configuration section)
8 # Modified from the BorlandC makefile by Alexander Lehmann
9 # Modified by Dirk Stadler for outboard terminal support
11 # produces executable which pipes data to the GCLIENT.PRG
13 # -------------------- begin of configuration section -----------------------
15 # CC is name of compiler producing TOS executables
16 # HOSTCC is the name of the native compiler
17 # SL is the path separator (/ for unix or UNIXMODE, \ for standard TOS)
19 # settings for crosscompiling:
25 # settings for native compiling:
31 # -O means optimisation in general
32 # o-f-p avoids link-unlink instructions
33 # s-r optimisation of loops and elimination of iterations variables
34 # c-r improve register movement
35 # if you have GCC 2.x (and time), you can choose the -O2 option
37 # first line for GCC 1.x, second and third for GCC 2.x
39 #OPTFLAGS = -O -fomit-frame-pointer -fstrength-reduce -fcombine-regs
40 #OPTFLAGS = -O -fomit-frame-pointer -fstrength-reduce
41 OPTFLAGS = -O2 -fomit-frame-pointer
43 TTFLAGS = -m68020 -m68881
44 COMMON = -DMTOS -DREADLINE -DPIPES -DHAVE_STRNICMP -DNO_FLOAT_H -I. -I..
46 # note that current versions of gcc for Atari may very well have float.h
47 # if anyone can verify this, please fix it.
50 # -DREADLINE to use the history/line editing capability. If you want this
51 # capability add -DREADLINE to CFLAGS
53 # NOTE: since readline is the only place where AES events are processed, the
54 # new (window) version will no longer work without -DREADLINE
56 CFLAGS = -c $(OPTFLAGS) $(COMMON)
59 CFLAGS30 = -c $(OPTFLAGS) $(TTFLAGS) $(COMMON)
60 LDFLAGS30 = -lgem -lgnu020
62 LDFLAGSSFP = -lpmlsfp -lgem -lgnusfp
66 # where to place gnuplot.gih helpfile
69 # gnuplot.doc as Tex-File
70 TEXFILE=docs/gnuplot.tex
72 # -------------------- end of configuration section -------------------------
74 OBJS = bitmap.o command.o contour.o eval.o graphics.o graph3d.o \
75 hidden3d.o util3d.o help.o internal.o misc.o parse.o \
76 plot.o readline.o scanner.o set.o show.o specfun.o \
77 standard.o stdfn.o term.o util.o version.o binary.o fit.o \
78 matrix.o alloc.o datafile.o plot2d.o plot3d.o interpol.o \
79 variable.o save.o tables.o unset.o time.o dynarray.o history.o
81 OBJS30 = bitmap.o0 command.o0 contour.o0 eval.o0 graphics.o0 graph3d.o0 \
82 hidden3d.o0 util3d.o0 help.o0 internal.o0 misc.o0 parse.o0 \
83 plot.o0 readline.o0 scanner.o0 set.o0 show.o0 specfun.o0 \
84 standard.o0 stdfn.o0 term.o0 util.o0 version.o0 binary.o0 fit.o0 \
85 matrix.o0 alloc.o0 datafile.o0 plot2d.o0 plot3d.o0 interpol.o0 \
86 variable.o0 save.o0 tables.o0 unset.o0 time.o0 dynarray.o0 \
89 # path prefix for the term subdirectory
92 TERMS = $(TERM)atariaes.trm $(TERM)atarivdi.trm $(TERM)multitos.trm \
93 $(TERM)dumb.trm $(TERM)eepic.trm \
94 $(TERM)epson.trm $(TERM)hpgl.trm $(TERM)hpljii.trm $(TERM)hppj.trm \
95 $(TERM)latex.trm $(TERM)pbm.trm $(TERM)post.trm $(TERM)texdraw.trm
97 all: gnuplot.tos gnuplt30.tos gpltsfp.tos $(HELPFILE) $(TEXFILE) demo$(SL)binary1
100 $(CC) -o $@ $(OBJS) $(LDFLAGS)
104 gnuplt30.tos: $(OBJS30)
105 $(CC) -o $@ $(OBJS30) $(LDFLAGS30)
110 $(CC) -o $@ $(OBJS) $(LDFLAGSSFP)
114 # to run bivariat demo ca. 100k stack is needed, all others work with ca. 32k
119 $(CC) -o $@ $(CFLAGS) $<
122 $(CC) -o $@ $(CFLAGS30) $<
126 # for GNUPLOT.TOS and GPLTSFP.TOS
128 alloc.o: alloc.c plot.h
129 bitmap.o: bitmap.c bitmap.h plot.h
130 binary.o: binary.c plot.h
131 command.o: command.c plot.h setshow.h help.h
132 $(CC) -o $@ $(CFLAGS) -DHELPFILE=\"$(HELPFILE)\" $<
133 contour.o: contour.c plot.h
134 datafile.o: datafile.c plot.h fnproto.h binary.h setshow.h
135 eval.o: eval.c plot.h
136 graphics.o: graphics.c plot.h setshow.h
137 graph3d.o: graph3d.c plot.h setshow.h
138 hidden3d.o: hidden3d.c plot.h setshow.h
139 util3d.o: util3d.c plot.h setshow.h
140 fit.o: fit.c fit.h matrix.h plot.h
141 interpol.o: interpol.c plot.h setshow.h
142 matrix.o: matrix.c matrix.h fit.h
143 help.o: help.c help.h
144 internal.o: internal.c plot.h
145 misc.o: misc.c plot.h setshow.h help.h
146 parse.o: parse.c plot.h
147 plot.o: plot.c plot.h fit.h setshow.h fnproto.h
148 plot2d.o: plot2d.c plot.h setshow.h fit.h binary.h help.h
149 plot3d.o: plot3d.c plot.h setshow.h binary.h help.h
150 readline.o: readline.c
151 save.o: save.c plot.h setshow.h
152 scanner.o: scanner.c plot.h
153 show.o: set.c plot.h setshow.h
154 $(CC) -o $@ $(CFLAGS) -DHELPFILE=\"$(HELPFILE)\" $<
155 set.o: show.c plot.h setshow.h
156 specfun.o: plot.h specfun.c
157 standard.o: standard.c plot.h
158 stdfn.o: stdfn.c stdfn.h
159 tables.o: tables.c plot.h tables.h
160 term.o: term.c term.h plot.h set.c show.c bitmap.h $(TERMS)
161 $(CC) -o $@ $(CFLAGS) $(TERMFLAGS) -Iterm term.c
162 unset.o: unset.c plot.h setshow.h tables.h
163 util.o: util.c plot.h
164 variable.o: variable.c plot.h variable.h
169 alloc.o0: alloc.c plot.h
170 bitmap.o0: bitmap.c bitmap.h plot.h
171 binary.o0: binary.c plot.h
172 command.o0: command.c plot.h setshow.h help.h
173 $(CC) -o $@ $(CFLAGS30) -DHELPFILE=\"$(HELPFILE)\" $<
174 contour.o0: contour.c plot.h
175 datafile.o0: datafile.c plot.h fnproto.h binary.h setshow.h
176 eval.o0: eval.c plot.h
177 graphics.o0: graphics.c plot.h setshow.h
178 graph3d.o0: graph3d.c plot.h setshow.h
179 hidden3d.o0: hidden3d.c plot.h setshow.h
180 util3d.o0: util3d.c plot.h setshow.h
181 fit.o0: fit.c fit.h matrix.h plot.h
182 interpol.o0: interpol.c plot.h setshow.h
183 matrix.o0: matrix.c matrix.h fit.h
184 help.o0: help.c help.h
185 internal.o0: internal.c plot.h
186 misc.o0: misc.c plot.h setshow.h help.h
187 parse.o0: parse.c plot.h
188 plot.o0: plot.c plot.h fit.h setshow.h fnproto.h
189 plot2d.o0: plot2d.c plot.h setshow.h fit.h binary.h help.h
190 plot3d.o0: plot3d.c plot.h setshow.h binary.h help.h
191 readline.o0: readline.c
192 save.o0: save.c plot.h setshow.h
193 scanner.o0: scanner.c plot.h
194 show.o0: set.c plot.h setshow.h
195 $(CC) -o $@ $(CFLAGS30) -DHELPFILE=\"$(HELPFILE)\" $<
196 set.o0: show.c plot.h setshow.h
197 specfun.o0: plot.h specfun.c
198 standard.o0: standard.c plot.h
199 stdfn.o0: stdfn.c stdfn.h
200 tables.o0: tables.c plot.h tables.h
201 term.o0: term.c term.h plot.h set.c show.c bitmap.h $(TERMS)
202 $(CC) -o $@ $(CFLAGS30) $(TERMFLAGS) -Iterm term.c
203 unset.o0: unset.c plot.h setshow.h tables.h
204 util.o0: util.c plot.h
205 variable.o0: variable.c plot.h variable.h
206 version.o0: version.c
208 $(HELPFILE): doc2gih docs$(SL)gnuplot.doc
209 doc2gih docs$(SL)gnuplot.doc $@
211 $(TEXFILE): doc2tex docs$(SL)gnuplot.doc
212 doc2tex docs$(SL)gnuplot.doc $@
214 doc2gih: docs$(SL)doc2gih.c docs$(SL)termdoc.c
215 $(HOSTCC) -I. -I.. -Idocs -o $@ $<
217 doc2tex: docs$(SL)doc2tex.c docs$(SL)termdoc.c
218 $(HOSTCC) -DALL_TERM_DOC -I. -I.. -Idocs -o $@ $<
220 bf_test: bf_test.c binary.c alloc.c
221 $(HOSTCC) -DMTOS -o $@ bf_test.c binary.c alloc.c $(MATHLIB)
223 demo$(SL)binary1: bf_test
224 (cd demo; ../bf_test)
226 clean: # remove temporary files, but leave executable intact
227 rm -f $(OBJS) $(OBJS30) $(OBJSSFP) bf_test.o
229 realclean: clean # remove all files generated by make
230 rm -f *.tos doc2gih doc2tex bf_test
231 rm -f demo$(SL)binary1 demo$(SL)binary2 demo$(SL)binary3
232 rm -f $(HELPFILE) $(TEXFILE)
234 # empty rules for file extensions (some makes might need this)