Initial release of Maemo 5 port of gnuplot
[gnuplot] / config / makefile.mto
1 #
2 # $Id: makefile.mto,v 1.5 1999/12/01 22:07:57 lhecking Exp $
3 #
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)
7 #
8 # Modified from the BorlandC makefile by Alexander Lehmann
9 # Modified by Dirk Stadler for outboard terminal support
10 #
11 # produces executable which pipes data to the GCLIENT.PRG
12
13 # -------------------- begin of configuration section -----------------------
14
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)
18
19 # settings for crosscompiling:
20 CC = gcc
21 HOSTCC = gcc
22 SL=/
23 MATHLIB= -lpml
24
25 # settings for native compiling:
26 #CC = gcc
27 #HOSTCC = $(CC)
28 #SL=\
29 #MATHLIB= -lpml
30
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
36
37 # first line for GCC 1.x, second and third for GCC 2.x
38
39 #OPTFLAGS = -O -fomit-frame-pointer -fstrength-reduce -fcombine-regs
40 #OPTFLAGS = -O -fomit-frame-pointer -fstrength-reduce
41 OPTFLAGS = -O2 -fomit-frame-pointer
42
43 TTFLAGS  = -m68020 -m68881
44 COMMON   = -DMTOS -DREADLINE -DPIPES -DHAVE_STRNICMP -DNO_FLOAT_H -I. -I..
45
46 # note that current versions of gcc for Atari may very well have float.h
47 # if anyone can verify this, please fix it.
48
49 # -c means don't link
50 # -DREADLINE to use the history/line editing capability. If you want this
51 #            capability add -DREADLINE to CFLAGS
52
53 # NOTE: since readline is the only place where AES events are processed, the
54 #          new (window) version will no longer work without -DREADLINE
55
56 CFLAGS     = -c $(OPTFLAGS) $(COMMON)
57 LDFLAGS    = -lpml -lgem
58
59 CFLAGS30   = -c $(OPTFLAGS) $(TTFLAGS) $(COMMON) 
60 LDFLAGS30  = -lgem -lgnu020
61
62 LDFLAGSSFP = -lpmlsfp -lgem -lgnusfp
63
64 TERMFLAGS  =
65
66 # where to place gnuplot.gih helpfile
67 HELPFILE=gnuplot.gih
68
69 # gnuplot.doc as Tex-File
70 TEXFILE=docs/gnuplot.tex
71
72 # -------------------- end of configuration section -------------------------
73
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
80
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 \
87          hostory.o0
88         
89 # path prefix for the term subdirectory
90 TERM  = term$(SL)
91
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
96
97 all: gnuplot.tos gnuplt30.tos gpltsfp.tos $(HELPFILE) $(TEXFILE) demo$(SL)binary1
98
99 gnuplot.tos:  $(OBJS)
100                  $(CC) -o $@ $(OBJS) $(LDFLAGS)
101                  fixstk 120k $@
102                  xstrip -k $@
103         
104 gnuplt30.tos: $(OBJS30)
105                  $(CC) -o $@ $(OBJS30) $(LDFLAGS30)
106                  fixstk 120k $@
107                  xstrip -k $@
108
109 gpltsfp.tos: $(OBJS)
110                  $(CC) -o $@ $(OBJS) $(LDFLAGSSFP)
111                  fixstk 120k $@
112                  xstrip -k $@
113                 
114 # to run bivariat demo ca. 100k stack is needed, all others work with ca. 32k
115
116 # default rules
117
118 %.o:  %.c
119          $(CC) -o $@ $(CFLAGS) $<
120
121 %.o0: %.c
122          $(CC) -o $@ $(CFLAGS30) $<
123         
124 # dependencies
125
126 # for GNUPLOT.TOS and GPLTSFP.TOS
127
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
165 version.o:   version.c
166
167 # for GNUPLT30.TOS
168
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
207
208 $(HELPFILE): doc2gih docs$(SL)gnuplot.doc
209                 doc2gih docs$(SL)gnuplot.doc $@
210
211 $(TEXFILE):  doc2tex docs$(SL)gnuplot.doc
212                 doc2tex docs$(SL)gnuplot.doc $@
213
214 doc2gih:     docs$(SL)doc2gih.c docs$(SL)termdoc.c
215                 $(HOSTCC) -I. -I.. -Idocs -o $@ $<
216
217 doc2tex:     docs$(SL)doc2tex.c docs$(SL)termdoc.c
218                 $(HOSTCC) -DALL_TERM_DOC -I. -I.. -Idocs -o $@ $<
219
220 bf_test:     bf_test.c binary.c alloc.c
221              $(HOSTCC) -DMTOS -o $@ bf_test.c binary.c alloc.c $(MATHLIB)
222
223 demo$(SL)binary1: bf_test
224              (cd demo; ../bf_test)
225
226 clean: # remove temporary files, but leave executable intact
227                  rm -f $(OBJS) $(OBJS30) $(OBJSSFP) bf_test.o
228
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)
233
234 # empty rules for file extensions (some makes might need this)
235 %.trm:
236
237 %.doc:
238