1#
2# $Id: makefile.emx,v 1.11 2014/09/23 22:09:16 sfeam Exp $
3#
4# GNUPLOT Makefile for use with emx-0.8f/gcc and ndmake 4.5 on MS-DOS
5#
6# This version has had very little testing.
7
8EMXPATH = c:/emx
9
10# uncomment the following two lines if you have
11# Johannes Martin's SVGA/VESA extensions
12# A VESA 1.2 compatible display, and the vesa_emx.com TSR are required.
13# "set term vgal" needs vesa_ibm.com with svgakit/vesa_emx version 1.2.
14# VESA = -DEMXVESA
15# VESALIB = -lvesa
16
17# where to place gnuplot.gih helpfile
18HELPFILE = gnuplot.gih
19
20CFLAGS = -c -O2 -DMSDOS -DDOS32 -DPROTOTYPES -DHAVE_STRINGIZE -DREADLINE -DHAVE_STRNICMP
21
22# see other terminal defines in term.h
23TERMFLAGS = -DEMXVGA $(VESA)
24
25OBJS = 	alloc.o binary.o bitmap.o command.o contour.o datafile.o dynarray.o \
26	eval.o fit.o graphics.o graph3d.o help.o hidden3d.o history.o \
27	internal.o interpol.o matrix.o misc.o parse.o plot.o plot2d.o \
28	plot3d.o readline.o save.o specfun.o scanner.o set.o show.o \
29	standard.o stdfn.o tables.o tabulate.o term.o time.o unset.o util.o util3d.o \
30	variable.o version.o
31
32CSOURCE5 = term/dumb.trm term/dxf.trm term\dxy.trm \
33	term\eepic.trm term\epson.trm term\fig.trm term\hp26.trm \
34	term\hp2648.trm term\hpgl.trm term\hpljii.trm
35CSOURCE6 = term\impcodes.h term\imagen.trm term\object.h \
36	term\kyo.trm term\latex.trm term/pbm.trm term\pm.trm
37CSOURCE7 = term\post.trm term\qms.trm term\regis.trm \
38	term\t410x.trm term\tek.trm term\x11.trm term\emxvga.trm
39CSOURCE8 = contour.c
40
41all: gnuplotx.exe $(HELPFILE)
42
43# default rules
44CCC = gcc $(CFLAGS) -o $*.o $*.c
45
46gnuplotx.exe: $(OBJS) emxlink.rsp
47        gcc -o gnuplot @emxlink.rsp -lm -lgraph $(VESALIB)
48	emxbind $(EMXPATH)/bin/emx.exe gnuplot gnuplotx.exe -p -acmi
49
50emxlink.rsp: makefile.emx
51	echo bitmap.o> emxlink.rsp
52	echo command.o>> emxlink.rsp
53	echo contour.o>> emxlink.rsp
54	echo eval.o>> emxlink.rsp
55	echo graphics.o>> emxlink.rsp
56	echo graph3d.o>> emxlink.rsp
57	echo help.o>> emxlink.rsp
58	echo hidden3d.o>> emxlink.rsp
59	echo history.o>> emxlink.rsp
60	echo internal.o>> emxlink.rsp
61	echo misc.o>> emxlink.rsp
62	echo parse.o>> emxlink.rsp
63	echo plot.o>> emxlink.rsp
64	echo plot2d.o>> emxlink.rsp
65	echo plot3d.o>> emxlink.rsp
66	echo readline.o>> emxlink.rsp
67	echo specfun.o>> emxlink.rsp
68	echo interpol.o>> emxlink.rsp
69	echo scanner.o>> emxlink.rsp
70	echo set.o>> emxlink.rsp
71	echo show.o>> emxlink.rsp
72	echo standard.o>> emxlink.rsp
73	echo stdfn.o>> emxlink.rsp
74	echo tabulate.o>> emxlink.rsp
75	echo term.o>> emxlink.rsp
76	echo time.o>> emxlink.rsp
77	echo util.o>> emxlink.rsp
78	echo variable.o>> emxlink.rsp
79	echo version.o>> emxlink.rsp
80	echo binary.o>> emxlink.rsp
81	echo fit.o>> emxlink.rsp
82	echo matrix.o>> emxlink.rsp
83	echo datafile.o>> emxlink.rsp
84	echo alloc.o>> emxlink.rsp
85
86bitmap.o: bitmap.c bitmap.h plot.h
87	$(CCC)
88
89binary.o: binary.c plot.h
90	$(CCC)
91
92command.o: command.c plot.h setshow.h help.h fit.h
93	$(CCC) -DHELPFILE=\"$(HELPFILE)\"
94
95contour.o: contour.c plot.h
96	$(CCC)
97
98eval.o: eval.c plot.h
99	$(CCC)
100
101graphics.o: graphics.c plot.h setshow.h
102	$(CCC)
103
104graph3d.o: graph3d.c plot.h setshow.h
105	$(CCC)
106
107fit.o: fit.c fit.h matrix.h plot.h
108	$(CCC)
109
110matrix.o: matrix.c matrix.h fit.h
111	$(CCC)
112
113help.o: help.c plot.h help.h
114	$(CCC)
115
116internal.o: internal.c plot.h
117	$(CCC)
118
119misc.o: misc.c plot.h setshow.h
120	$(CCC)
121
122parse.o: parse.c plot.h
123	$(CCC)
124
125plot.o: plot.c plot.h setshow.h
126	$(CCC)
127
128plot2d.o: plot2d.c plot.h
129	$(CCC)
130
131plot3d.o: plot3d.c plot.h
132	$(CCC)
133
134readline.o: readline.c
135	$(CCC)
136
137scanner.o: scanner.c plot.h
138	$(CCC)
139
140set.o: set.c plot.h setshow.h
141	$(CCC)
142
143show.o: show.c plot.h setshow.h
144	$(CCC) -DHELPFILE=\"$(HELPFILE)\"
145
146specfun.o: specfun.c plot.h
147	$(CCC)
148
149interpol.o: interpol.c plot.h setshow.h
150	$(CCC)
151
152standard.o: standard.c plot.h
153	$(CCC)
154
155stdfn.o: stdfn.c stdfn.h
156	$(CCC)
157
158term.o: term.c term.h plot.h setshow.h bitmap.h $(CSOURCE5) $(CSOURCE6) $(CSOURCE7)
159	$(CCC) $(TERMFLAGS) -Iterm -I.
160
161time.o : time.c
162	$(CCC)
163
164util.o: util.c plot.h
165	$(CCC)
166
167variable.o: variable.c plot.h variable.h
168	$(CCC)
169
170version.o: version.c
171	$(CCC)
172
173# convert gnuplot.doc to gnuplot.gih
174doc2gih.exe: docs\doc2gih.c docs\termdoc.c
175	gcc -o doc2gih -I. docs/doc2gih.c docs/termdoc.c
176	emxbind $(EMXPATH)/bin/emx.exe doc2gih doc2gih.exe
177
178$(HELPFILE): doc2gih.exe docs\gnuplot.doc
179	doc2gih docs\gnuplot.doc $(HELPFILE)
180
181clean:
182	del *.o
183	del emxlink.rsp
184	del gnuplot
185	del doc2gih
186
187# veryclean target - remove all files created by the makefile
188
189veryclean: clean
190	del gnuplot.exe
191	del doc2gih.exe
192	del gnuplot.gih
193
194
195