Initial release of Maemo 5 port of gnuplot
[gnuplot] / config / makefile.amg
1 #
2 # $Id: makefile.amg,v 1.11 2005/03/25 21:01:58 sfeam Exp $
3 #
4 # GNUPLOT Makefile for SAS/C 6.1 or better on the Amiga
5 #
6 # Makefile for use with SAS/C 6.50 or newer
7 #   on AmigaOS 2.0 and above
8 #
9 # last modification date: 19991029
10 #
11
12 #
13 # ***************** Begin of Configuration section ***************************
14 #
15
16 # Comment out the definition lines to disable the respective drivers
17 # Substitute the path names for the actual path where includes/libs reside
18
19 # GD (GIF) device driver
20 # requires GD library version 1.3 or 1.4 (not part of gnuplot)
21 # the library source code can be downloaded from
22 #  http://www.boutell.com/gd/
23 # if you can't find the required version, use the gnuplot
24 # distribution sites for download
25 #
26 #GD_DEF = def=HAVE_LIBGD
27 #GD_INCLUDE = IDIR=gd1.3
28 #GD_LIB = gd1.3/gd.lib
29
30 # PNG device driver
31 # requires PNG and Z libraries (not part of gnuplot)
32 # the canonical download sites for both libraries are
33 #  http://www.cdrom.com/pub/png/pngcode.html
34 #  http://www.cdrom.com/pub/infozip/zlib/
35 #
36 #PNG_DEF = def=HAVE_LIBPNG
37 #PNG_INCLUDE = IDIR=libpng-1.0.5
38 #PNG_LIB = libpng-1.0.5/png.lib
39 #Z_INCLUDE = IDIR=zlib-1.1.3
40 #Z_LIB = zlib-1.1.3/z.lib
41
42 CC = sc
43
44 # cpu type
45 # valid values are:
46 #  ANY (default; same as 68000) 68010 68020 68030 68040 68060 (new in 6.57)
47 CPU = CPU=ANY
48
49 # Floating point math type
50 # valid values are NOMATH (default) STANDARD FFP 68881 (same as 68882) IEEE
51 # other than the old version of this makefile, the link commands have
52 # been changed so that the MATH option also selects the proper math
53 # library to link with
54 MATH = MATH=IEEE
55
56 # Optimiser flags
57 OFLAGS = opt
58
59 # Defines; format is def=SYMBOL[=value]
60 DEFS = def=AMIGA_SC_6_1 def=HAVE_CONFIG_H def=GP_INLINE=__inline $(GD_DEF) $(PNG_DEF)
61
62 # Other options; if you have SAS/C 6.57 or newer, you may wish to disable
63 # warning 317
64 COPTS = ign=304+306 #noerrhigh #errrexx
65
66 # Debug options
67 DEBUG = # Will be dbg=sf when called with smake -f makefile.amg debug
68 LNDBG = # Will be addsym when called with smake -f makefile.amg debug
69
70 # The directories where gnuplot and gnuplot.gih go, respectively
71 DEST     = C:
72 HELPDEST = S:
73
74 #
75 # ****************** End of Configuration section ****************************
76 # ********** No changes should be necessary beyond this point! ***************
77 #
78
79 #
80 # Miscellaneous setup
81 #
82
83 # Where related files reside
84 DOCDIR  = /docs
85 DEMODIR = /demo
86 TERMDIR = /term
87
88 # Merge compiler flags
89 CFLAGS = $(COPTS) $(CPU) $(MATH) $(OFLAGS) $(DEFS) $(DEBUG) DATA=f
90
91 # NOTE: I have disabled the compilation rule for .oo files as described
92 # below, because when linking with sc (not slink), all object
93 # files not ending in .o must be prefixed with the objname option!
94 #
95 # To simplify the handling of files that have grown so large that they
96 # must be compiled with the code=far option, the rules below have been
97 # set up. Now, if a file grows large, you only have to change its
98 # extension from .o to .oo, and the file will be compiled correctly.
99 # This must be done in the OBJS-variable below and in the corresponding 
100 # dependency-rule near the end of the file.
101 #
102 # Compilation rule for large files
103 #.c.oo:
104 #       $(CC) $(CFLAGS) code=f objname=$@ $<
105
106 all: config.h gnuplot $(DEMODIR)/bf_test docs
107
108 # Normal compilation rule
109 .c.o:
110         $(CC) $(CFLAGS) objname=$@ $<
111
112 graphics.o: graphics.c plot.h setshow.h
113         $(CC) $(CFLAGS) code=f objname=$@ $<
114
115 set.o: set.c plot.h setshow.h
116         $(CC) $(CFLAGS) code=f objname=$@ $<
117
118 term.o: term.c term.h plot.h setshow.h bitmap.h $(CSOURCE5) $(CSOURCE6) $(CSOURCE7)
119         $(CC) $(CFLAGS) IDIR=$(TERMDIR) code=f $(GD_INCLUDE) $(PNG_INCLUDE) $(Z_INCLUDE) objname=$@ $<
120
121 OBJS = alloc.o amiga.o axis.o binary.o bitmap.o color.o command.o contour.o \
122        datafile.o dynarray.o eval.o fit.o gadgets.o getcolor.o graph3d.o \
123        graphics.o help.o hidden3d.o history.o internal.o interpol.o matrix.o \
124        misc.o mouse.o parse.o plot.o plot2d.o plot3d.o pm3d.o save.o scanner.o \
125        set.o show.o specfun.o standard.o stdfn.o tables.o term.o time.o \
126        unset.o util.o util3d.o variable.o version.o
127
128 CSOURCE1 = alloc.c bf_test.c binary.c bitmap.c command.c set.c show.c
129 CSOURCE2 = help.c graphics.c graph3d.o internal.c history.c
130 CSOURCE3 = misc.c eval.c parse.c plot.c plot2d.c plot3d.c save.c scanner.c \
131         standard.c stdfn.c tables.c variable.c
132 CSOURCE4 = bitmap.c term.c util.c util3d.c version.c interpol.c fit.c matrix.c
133 CSOURCE5 = $(TERMDIR)/aed.trm $(TERMDIR)/ai.trm $(TERMDIR)/amiga.trm \
134            $(TERMDIR)/apollo.trm $(TERMDIR)/atariaes.trm \
135            $(TERMDIR)/atarivdi.trm $(TERMDIR)/cgi.trm $(TERMDIR)/cgm.trm \
136            $(TERMDIR)/compact.c $(TERMDIR)/corel.trm $(TERMDIR)/debug.trm \
137            $(TERMDIR)/driver.h $(TERMDIR)/djsvga.trm $(TERMDIR)/dumb.trm \
138            $(TERMDIR)/dxf.trm $(TERMDIR)/dxy.trm $(TERMDIR)/eepic.trm \
139            $(TERMDIR)/emxvga.trm $(TERMDIR)/epson.trm $(TERMDIR)/excl.trm \
140            $(TERMDIR)/fg.trm $(TERMDIR)/fig.trm $(TERMDIR)/gif.trm \
141            $(TERMDIR)/gnugraph.trm
142 CSOURCE6 = $(TERMDIR)/gpic.trm $(TERMDIR)/gpr.trm $(TERMDIR)/grass.trm \
143            $(TERMDIR)/hp26.trm $(TERMDIR)/hp2648.trm $(TERMDIR)/hp500c.trm \
144            $(TERMDIR)/hpgl.trm $(TERMDIR)/hpljii.trm $(TERMDIR)/hppj.trm \
145            $(TERMDIR)/imagen.trm $(TERMDIR)/impcodes.h $(TERMDIR)/iris4d.trm \
146            $(TERMDIR)/kyo.trm $(TERMDIR)/latex.trm $(TERMDIR)/linux.trm \
147            $(TERMDIR)/mac.trm $(TERMDIR)/metafont.trm $(TERMDIR)/mgr.trm \
148            $(TERMDIR)/mif.trm $(TERMDIR)/multitos.trm $(TERMDIR)/next.trm \
149            $(TERMDIR)/object.h $(TERMDIR)/pbm.trm $(TERMDIR)/pc.trm
150 CSOURCE7 = $(TERMDIR)/pm.trm $(TERMDIR)/png.trm $(TERMDIR)/post.trm \
151            $(TERMDIR)/pslatex.trm $(TERMDIR)/pstricks.trm $(TERMDIR)/qms.trm \
152            $(TERMDIR)/regis.trm $(TERMDIR)/rgip.trm $(TERMDIR)/sun.trm \
153            $(TERMDIR)/t410x.trm $(TERMDIR)/tek.trm \
154            $(TERMDIR)/texdraw.trm $(TERMDIR)/tgif.trm $(TERMDIR)/tkcanvas.trm \
155            $(TERMDIR)/tpic.trm $(TERMDIR)/unixpc.trm $(TERMDIR)/unixplot.trm \
156            $(TERMDIR)/v384.trm $(TERMDIR)/vws.trm $(TERMDIR)/win.trm \
157            $(TERMDIR)/x11.trm $(TERMDIR)/xlib.trm
158 CSOURCE8 = contour.c specfun.c amiga.c dynarray.c
159 CORETERM = $(CSOURCE5) $(CSOURCE6) $(CSOURCE7)
160
161 gnuplot: $(OBJS)
162         $(CC) $(CFLAGS) LINK TO $@ $(PNG_LIB) $(Z_LIB) $(GD_LIB) $(LNDBG) WITH <<
163 $(OBJS)
164 <
165
166 $(DEMODIR)/bf_test: bf_test.o binary.o alloc.o
167         $(CC) $(CFLAGS) LINK TO $@ bf_test.o binary.o alloc.o
168         @echo "*N*NRun bf_test in demo subdirectory to make binary demo files*N"
169
170 docs: gih
171
172 gih: $(DOCDIR)/gnuplot.gih
173
174 $(DOCDIR)/gnuplot.gih: $(DOCDIR)/doc2gih $(DOCDIR)/gnuplot.doc
175         $(DOCDIR)/doc2gih $(DOCDIR)/gnuplot.doc $(DOCDIR)/gnuplot.gih
176
177 $(DOCDIR)/doc2gih: $(DOCDIR)/doc2gih.c $(DOCDIR)/termdoc.o
178         $(CC) $(CFLAGS) IDIR= IDIR=$(TERMDIR) LINK TO $@ FROM $(DOCDIR)/doc2gih.c $(DOCDIR)/termdoc.o
179
180 html: $(DOCDIR)/gnuplot.html
181
182 $(DOCDIR)/gnuplot.html: $(DOCDIR)/gnuplot.texi $(DOCDIR)/gnuplot.doc
183         $(MAKEINFO) --html -I$(srcdir) $(srcdir)/gnuplot.texi --no-split --output=$@
184
185 $(DOCDIR)/gnulot.tex: $(DOCDIR)/doc2tex $(DOCDIR)/gnuplot.doc
186         $(DOCDIR)/doc2tex $(DOCDIR)/gnuplot.doc $@
187
188 $(DOCDIR)/doc2tex: $(DOCDIR)/doc2tex.c $(DOCDIR)/allterm.h $(DOCDIR)/termdoc.o
189         $(CC) $(CFLAGS) def=ALL_TERM_DOC IDIR= IDIR=$(TERMDIR) LINK TO $@ FROM $(DOCDIR)/doc2tex.c $(DOCDIR)/termdoc.o
190
191 check: $(DOCDIR)/checkdoc $(DOCDIR)/gnuplot.doc
192         $(DOCDIR)/checkdoc < $(DOCDIR)/gnuplot.doc
193
194 $(DOCDIR)/checkdoc: $(DOCDIR)/checkdoc.c $(DOCDIR)/allterm.h $(DOCDIR)/termdoc.o
195         $(CC) $(CFLAGS) def=ALL_TERM_DOC IDIR= IDIR=$(TERMDIR) LINK TO $@ FROM $(DOCDIR)/checkdoc.c $(DOCDIR)/termdoc.o
196
197 $(DOCDIR)/allterm.h: $(CORETERM)
198         join $(TERMDIR)/\#?.trm as $(DOCDIR)/allterm.h
199
200 config.h: /config/config.amg
201         copy $< $@
202
203 clean:
204         @-delete $(OBJS) bf_test.o quiet
205         @-delete $(DOCDIR)/\#?.o $(DOCDIR)/\#?.lnk quiet
206
207 veryclean: clean
208         @-delete $(DEMODIR)/binary[1-3] $(DEMODIR)/fit.log quiet
209         @-delete bf_test gnuplot config.h $(DOCDIR)/gnuplot.gih $(DOCDIR)/gnuplot.tex $(DOCDIR)/gnuplot.html quiet
210         @-delete $(DOCDIR)/doc2gih $(DOCDIR)/doc2tex $(DOCDIR)/checkdoc quiet
211
212 install: gnuplot $(DOCDIR)/gnuplot.gih
213         copy $(DOCDIR)/gnuplot.gih $(HELPDEST)
214         copy gnuplot $(DEST)
215
216 debug:
217         smake -f makefile.amg DEBUG=dbg=sf LNDBG=addsym OFLAGS= all
218
219 #
220 # Dependencies; do not edit!
221 #
222 alloc.o: alloc.c alloc.h util.h stdfn.h gp_types.h syscfg.h 
223 amiga.o: amiga.c
224 axis.o: axis.c axis.h stdfn.h command.h gadgets.h gp_time.h term_api.h \
225         variable.h gp_types.h parse.h tables.h util.h syscfg.h color.h \
226         national.h eval.h 
227 bf_test.o: bf_test.c config.h syscfg.h stdfn.h binary.h 
228 binary.o: binary.c binary.h alloc.h util.h syscfg.h stdfn.h gp_types.h 
229 bitmap.o: bitmap.c bitmap.h alloc.h util.h syscfg.h stdfn.h gp_types.h 
230 color.o: color.c config.h color.h get axis.h gadgets.h graphics.h plot.h \
231         graph3d.h pm3d.h term_api.h util3d.h alloc.h gp_types.h syscfg.h \
232         parse.h tables.h util.h stdfn.h eval.h 
233 command.o: command.c command.h alloc.h eval.h fit.h binary.h datafile.h \
234         gp_hist.h gp_time.h misc.h parse.h plot.h plot2d.h plot3d.h \
235         readline.h save.h scanner.h setshow.h tables.h term_api.h util.h \
236         gp_types.h stdfn.h syscfg.h axis.h graph3d.h graphics.h gadgets.h \
237         color.h 
238 contour.o: contour.c contour.h alloc.h axis.h syscfg.h gp_types.h dynarray.h \
239         graph3d.h stdfn.h gadgets.h parse.h tables.h term_api.h util.h eval.h \
240         color.h 
241 datafile.o: datafile.c datafile.h alloc.h axis.h binary.h command.h eval.h \
242         gp_time.h graphics.h misc.h parse.h plot.h util.h graph3d.h stdfn.h \
243         gp_types.h gadgets.h tables.h term_api.h syscfg.h color.h 
244 dynarray.o: dynarray.c dynarray.h alloc.h util.h stdfn.h gp_types.h syscfg.h
245 eval.o: eval.c eval.h syscfg.h alloc.h datafile.h internal.h specfun.h \
246         standard.h util.h gp_types.h stdfn.h axis.h graph3d.h graphics.h \
247         gadgets.h parse.h tables.h term_api.h color.h 
248 fit.o: fit.c fit.h alloc.h axis.h command.h datafile.h eval.h matrix.h plot.h \
249         misc.h util.h syscfg.h stdfn.h gp_types.h gadgets.h parse.h tables.h \
250         term_api.h graph3d.h graphics.h color.h
251 gadgets.o: gadgets.c gadgets.h syscfg.h term_api.h stdfn.h gp_types.h color.h \
252         tables.h 
253 getcolor.o: getcolor.c syscfg.h stdfn.h color.h get gp_types.h 
254 graph3d.o: graph3d.c graph3d.h alloc.h axis.h gadgets.h hidden3d.h misc.h \
255         term_api.h util3d.h util.h syscfg.h gp_types.h stdfn.h parse.h \
256         tables.h graphics.h color.h eval.h 
257 graphics.o: graphics.c graphics.h alloc.h axis.h command.h gp_time.h gadgets.h \
258         plot2d.h term_api.h util.h syscfg.h gp_types.h stdfn.h parse.h \
259         tables.h color.h eval.h 
260 help.o: help.c help.h alloc.h util.h gp_types.h stdfn.h syscfg.h 
261 hidden3d.o: hidden3d.c hidden3d.h alloc.h axis.h command.h dynarray.h \
262         graph3d.h tables.h term_api.h util.h util3d.h syscfg.h stdfn.h \
263         gp_types.h gadgets.h parse.h color.h eval.h 
264 history.o: history.c gp_hist.h alloc.h util.h syscfg.h stdfn.h gp_types.h 
265 internal.o: internal.c internal.h stdfn.h util.h syscfg.h gp_types.h eval.h 
266 interpol.o: interpol.c interpol.h alloc.h axis.h contour.h graphics.h misc.h \
267         plot2d.h util.h syscfg.h stdfn.h gp_types.h gadgets.h parse.h \
268         tables.h term_api.h dynarray.h graph3d.h eval.h color.h 
269 matrix.o: matrix.c matrix.h alloc.h fit.h util.h syscfg.h stdfn.h gp_types.h 
270 misc.o: misc.c misc.h alloc.h command.h graphics.h parse.h plot.h tables.h \
271         util.h variable.h syscfg.h gp_types.h stdfn.h graph3d.h gadgets.h \
272         term_api.h eval.h national.h color.h 
273 mouse.o: mouse.c syscfg.h stdfn.h gp_types.h mouse.h pm3d.h alloc.h axis.h \
274         command.h datafile.h gadgets.h gp_time.h graphics.h graph3d.h plot3d.h \
275         readline.h term_api.h mousecmn.h parse.h tables.h util.h color.h eval.h 
276 parse.o: parse.c parse.h alloc.h command.h eval.h help.h util.h stdfn.h \
277         gp_types.h syscfg.h 
278 plot.o: plot.c syscfg.h plot.h alloc.h command.h eval.h fit.h gp_hist.h misc.h \
279         readline.h setshow.h term_api.h util.h variable.h version.h gp_types.h \
280         stdfn.h graphics.h graph3d.h gadgets.h color.h tables.h national.h 
281 plot2d.o: plot2d.c plot2d.h gp_types.h alloc.h axis.h binary.h command.h \
282         datafile.h eval.h fit.h graphics.h interpol.h misc.h parse.h tables.h \
283         term_api.h util.h syscfg.h stdfn.h gadgets.h graph3d.h color.h 
284 plot3d.o: plot3d.c plot3d.h gp_types.h alloc.h axis.h binary.h command.h \
285         contour.h datafile.h eval.h graph3d.h misc.h parse.h term_api.h util.h \
286         syscfg.h stdfn.h gadgets.h tables.h dynarray.h graphics.h color.h 
287 pm3d.o: pm3d.c pm3d.h alloc.h axis.h graph3d.h hidden3d.h plot3d.h setshow.h \
288         term_api.h command.h stdfn.h gp_types.h gadgets.h parse.h tables.h \
289         util.h syscfg.h util3d.h color.h eval.h 
290 save.o: save.c save.h axis.h command.h contour.h datafile.h eval.h fit.h \
291         gp_time.h graphics.h hidden3d.h misc.h plot2d.h plot3d.h setshow.h \
292         term_api.h util.h variable.h syscfg.h stdfn.h gp_types.h gadgets.h \
293         parse.h tables.h dynarray.h graph3d.h util3d.h color.h national.h 
294 scanner.o: scanner.c scanner.h alloc.h command.h util.h syscfg.h stdfn.h \
295         gp_types.h 
296 set.o: set.c setshow.h alloc.h axis.h command.h contour.h datafile.h gp_time.h \
297         hidden3d.h misc.h plot.h plot2d.h plot3d.h tables.h term_api.h util.h \
298         variable.h pm3d.h stdfn.h gadgets.h gp_types.h parse.h syscfg.h \
299         dynarray.h graph3d.h graphics.h util3d.h color.h national.h eval.h 
300 show.o: show.c setshow.h alloc.h axis.h command.h contour.h datafile.h eval.h \
301         gp_time.h graphics.h hidden3d.h misc.h plot.h plot2d.h plot3d.h \
302         tables.h util.h term_api.h variable.h version.h stdfn.h gadgets.h \
303         gp_types.h parse.h syscfg.h dynarray.h graph3d.h util3d.h color.h \
304         national.h 
305 specfun.o: specfun.c specfun.h stdfn.h syscfg.h eval.h gp_types.h 
306 standard.o: standard.c standard.h gadgets.h gp_time.h util.h syscfg.h eval.h \
307         term_api.h stdfn.h gp_types.h color.h tables.h 
308 stdfn.o: stdfn.c stdfn.h syscfg.h 
309 tables.o: tables.c tables.h command.h fit.h setshow.h term_api.h util.h \
310         syscfg.h gp_types.h stdfn.h gadgets.h color.h 
311 time.o: time.c gp_time.h util.h variable.h syscfg.h stdfn.h gp_types.h \
312         national.h 
313 unset.o: unset.c setshow.h axis.h command.h contour.h datafile.h misc.h plot.h \
314         plot2d.h plot3d.h tables.h term_api.h util.h variable.h pm3d.h stdfn.h \
315         gadgets.h gp_types.h parse.h syscfg.h dynarray.h graph3d.h graphics.h \
316         color.h national.h eval.h 
317 util.o: util.c util.h alloc.h command.h datafile.h misc.h plot.h term_api.h \
318         gp_types.h stdfn.h axis.h graph3d.h graphics.h syscfg.h color.h \
319         tables.h gadgets.h parse.h eval.h 
320 util3d.o: util3d.c util3d.h axis.h hidden3d.h pm3d.h term_api.h graph3d.h \
321         gp_types.h gadgets.h parse.h tables.h util.h syscfg.h stdfn.h color.h \
322         eval.h 
323 variable.o: variable.c variable.h alloc.h command.h util.h syscfg.h national.h \
324         stdfn.h gp_types.h 
325 version.o: version.c version.h syscfg.h