4 |
|
# |
5 |
|
|
6 |
|
OPT = -O |
7 |
– |
|
7 |
|
MACH = |
8 |
+ |
CC = cc |
9 |
+ |
MLIB = -lm |
10 |
+ |
CFLAGS = -DMDIR=\"$(MLIBDIR)/\" $(OPT) $(MACH) -I../common -L../lib |
11 |
|
|
12 |
|
LIBDIR = /usr/local/lib |
13 |
< |
|
13 |
> |
MLIBDIR = $(LIBDIR)/meta |
14 |
> |
DESTDIR = . |
15 |
|
INSTDIR = /usr/local/bin |
16 |
|
|
17 |
< |
MLIBDIR = $(LIBDIR)/meta |
17 |
> |
# target lists |
18 |
> |
common = mfio.o syscalls.o misc.o |
19 |
|
|
20 |
< |
MLIB = -lm |
20 |
> |
PROGS = $(DESTDIR)/meta2tga $(DESTDIR)/pexpand $(DESTDIR)/psort \ |
21 |
> |
$(DESTDIR)/cv $(DESTDIR)/psmeta $(DESTDIR)/plotin \ |
22 |
> |
$(DESTDIR)/x11meta $(DESTDIR)/bgraph $(DESTDIR)/igraph \ |
23 |
> |
$(DESTDIR)/dgraph $(DESTDIR)/gcomp $(DESTDIR)/plot4 |
24 |
|
|
25 |
< |
EXEC2 = $(INSTDIR) |
25 |
> |
SPECIALPROGS = $(DESTDIR)/mt160l $(DESTDIR)/mt160 $(DESTDIR)/mtext \ |
26 |
> |
$(DESTDIR)/plotout $(DESTDIR)/okimate $(DESTDIR)/tbar \ |
27 |
> |
$(DESTDIR)/mx80 $(DESTDIR)/t4014 $(DESTDIR)/imagew \ |
28 |
> |
$(DESTDIR)/impress $(DESTDIR)/aed5 $(DESTDIR)/tscat \ |
29 |
> |
$(DESTDIR)/tbar #$(DESTDIR)/xmeta |
30 |
|
|
31 |
< |
CC = cc |
31 |
> |
LIBMETA = ../lib/libmeta.a |
32 |
|
|
33 |
< |
CFLAGS = -DMDIR=\"$(MLIBDIR)/\" $(OPT) $(MACH) -I../common -L../lib |
33 |
> |
# global targets |
34 |
> |
all: $(PROGS) |
35 |
|
|
36 |
< |
io = mfio.o |
36 |
> |
special: $(SPECIALPROGS) |
37 |
|
|
38 |
< |
common = $(io) syscalls.o misc.o |
38 |
> |
install: $(PROGS) |
39 |
> |
cp $(PROGS) $(INSTDIR) |
40 |
|
|
41 |
< |
install: general |
41 |
> |
specialinstall: $(SPECIALPROGS) |
42 |
> |
cp $(SPECIALPROGS) $(INSTDIR) |
43 |
|
|
44 |
|
clean: |
45 |
< |
set nonomatch; rm -f *.o a.out core |
45 |
> |
set nonomatch; rm -f *.o $(PROGS) $(SPECIALPROGS) core |
46 |
|
|
47 |
< |
general: $(INSTDIR)/meta2tga $(INSTDIR)/pexpand $(INSTDIR)/psort \ |
48 |
< |
$(INSTDIR)/cv $(INSTDIR)/psmeta $(INSTDIR)/plotin \ |
49 |
< |
$(INSTDIR)/x11meta ../lib/libmeta.a $(INSTDIR)/bgraph $(INSTDIR)/igraph \ |
36 |
< |
$(INSTDIR)/dgraph $(INSTDIR)/gcomp $(INSTDIR)/plot4 |
37 |
< |
|
38 |
< |
special: $(EXEC2)/mt160l $(EXEC2)/mt160 $(EXEC2)/mtext \ |
39 |
< |
$(EXEC2)/plotout $(EXEC2)/okimate $(EXEC2)/tbar \ |
40 |
< |
$(EXEC2)/mx80 $(EXEC2)/t4014 $(EXEC2)/imagew $(EXEC2)/impress \ |
41 |
< |
$(EXEC2)/aed5 $(EXEC2)/tscat $(EXEC2)/tbar |
42 |
< |
#$(EXEC2)/xmeta |
43 |
< |
|
44 |
< |
$(INSTDIR)/meta2tga $(EXEC2)/okimate $(EXEC2)/impress \ |
45 |
< |
$(EXEC2)/mx80 $(EXEC2)/t4014 $(INSTDIR)/plotout $(INSTDIR)/x11meta \ |
46 |
< |
$(EXEC2)/mt160l $(EXEC2)/mt160 $(INSTDIR)/pexpand $(INSTDIR)/plot4 \ |
47 |
< |
$(INSTDIR)/psort $(EXEC2)/imagew $(INSTDIR)/tcurve $(EXEC2)/mtext \ |
48 |
< |
$(EXEC2)/tscat $(INSTDIR)/plotin $(EXEC2)/tbar $(INSTDIR)/xmeta \ |
49 |
< |
../lib/libmeta.a $(INSTDIR)/aed5 $(INSTDIR)/psmeta: $(common) |
50 |
< |
|
51 |
< |
$(EXEC2)/mt160l: mt160l.o mplot.o plot.o palloc.o |
52 |
< |
$(CC) $(CFLAGS) -o $(EXEC2)/mt160l mt160l.o mplot.o plot.o \ |
47 |
> |
# individual targets |
48 |
> |
mt160l: mt160l.o mplot.o plot.o palloc.o |
49 |
> |
$(CC) $(CFLAGS) -o mt160l mt160l.o mplot.o plot.o \ |
50 |
|
$(common) -lrt palloc.o |
51 |
|
|
52 |
< |
$(EXEC2)/okimate: okimate.o mplot.o plot.o palloc.o |
53 |
< |
$(CC) $(CFLAGS) -o $(EXEC2)/okimate okimate.o mplot.o plot.o \ |
52 |
> |
okimate: okimate.o mplot.o plot.o palloc.o |
53 |
> |
$(CC) $(CFLAGS) -o okimate okimate.o mplot.o plot.o \ |
54 |
|
$(common) palloc.o -lrt |
55 |
|
|
56 |
< |
$(INSTDIR)/imagew: imagew.o mplot.o plot.o palloc.o |
57 |
< |
$(CC) $(CFLAGS) imagew.o mplot.o plot.o $(common) \ |
56 |
> |
imagew: imagew.o mplot.o plot.o palloc.o |
57 |
> |
$(CC) $(CFLAGS) -o imagew imagew.o mplot.o plot.o $(common) \ |
58 |
|
palloc.o -lrt $(MLIB) |
62 |
– |
cp a.out $(INSTDIR)/imagew |
59 |
|
|
60 |
< |
$(EXEC2)/mt160: mt160.o mplot.o plot.o palloc.o |
61 |
< |
$(CC) $(CFLAGS) -o $(EXEC2)/mt160 mt160.o mplot.o plot.o $(common) \ |
60 |
> |
mt160: mt160.o mplot.o plot.o palloc.o |
61 |
> |
$(CC) $(CFLAGS) -o mt160 mt160.o mplot.o plot.o $(common) \ |
62 |
|
palloc.o -lrt |
63 |
|
|
64 |
< |
$(INSTDIR)/meta2tga: meta2tga.o rplot.o plot.o palloc.o |
65 |
< |
$(CC) $(CFLAGS) meta2tga.o rplot.o plot.o $(common) \ |
64 |
> |
meta2tga: meta2tga.o rplot.o plot.o palloc.o |
65 |
> |
$(CC) $(CFLAGS) -o meta2tga meta2tga.o rplot.o plot.o $(common) \ |
66 |
|
palloc.o -lrt $(MLIB) |
71 |
– |
cp a.out $(INSTDIR)/meta2tga |
67 |
|
|
68 |
< |
$(INSTDIR)/mx80: mx80.o mplot.o plot.o palloc.o |
69 |
< |
$(CC) $(CFLAGS) mx80.o mplot.o plot.o $(common) \ |
68 |
> |
mx80: mx80.o mplot.o plot.o palloc.o |
69 |
> |
$(CC) $(CFLAGS) -o mx80 mx80.o mplot.o plot.o $(common) \ |
70 |
|
palloc.o -lrt $(MLIB) |
76 |
– |
cp a.out $(INSTDIR)/mx80 |
71 |
|
|
72 |
< |
$(INSTDIR)/t4014: plotout.c ../lib/lib4014.a |
73 |
< |
$(CC) -DFORTEK $(CFLAGS) plotout.c $(common) \ |
72 |
> |
t4014: plotout.c ../lib/lib4014.a |
73 |
> |
$(CC) -DFORTEK $(CFLAGS) -o t4014 plotout.c $(common) \ |
74 |
|
-l4014 -lrt $(MLIB) |
81 |
– |
cp a.out $(INSTDIR)/t4014 |
75 |
|
rm -f plotout.o |
76 |
|
|
77 |
< |
$(INSTDIR)/impress: impress.o implot.o imPfuncs.o plot.o |
78 |
< |
$(CC) $(CFLAGS) impress.o implot.o imPfuncs.o \ |
77 |
> |
impress: impress.o implot.o imPfuncs.o plot.o |
78 |
> |
$(CC) $(CFLAGS) -o impress impress.o implot.o imPfuncs.o \ |
79 |
|
plot.o $(common) -lrt $(MLIB) |
87 |
– |
cp a.out $(INSTDIR)/impress |
80 |
|
|
81 |
< |
$(INSTDIR)/aed5: aed5.o |
82 |
< |
$(CC) $(CFLAGS) aed5.o $(common) -lrt $(MLIB) |
91 |
< |
cp a.out $(INSTDIR)/aed5 |
81 |
> |
aed5: aed5.o |
82 |
> |
$(CC) $(CFLAGS) -o aed5 aed5.o $(common) -lrt $(MLIB) |
83 |
|
|
84 |
< |
$(INSTDIR)/xmeta: xmeta.o xplot.o plot.o palloc.o |
85 |
< |
$(CC) $(CFLAGS) xmeta.o xplot.o plot.o palloc.o \ |
86 |
< |
$(common) -lrt -lX11 $(MLIB) |
96 |
< |
cp a.out $(INSTDIR)/xmeta |
84 |
> |
#xmeta: xmeta.o xplot.o plot.o palloc.o |
85 |
> |
# $(CC) $(CFLAGS) -o xmeta xmeta.o xplot.o plot.o palloc.o \ |
86 |
> |
#$(common) -lrt -lX11 $(MLIB) |
87 |
|
|
88 |
< |
$(INSTDIR)/x11meta: xmeta.o x11plot.o plot.o palloc.o |
89 |
< |
$(CC) $(CFLAGS) xmeta.o x11plot.o plot.o palloc.o \ |
88 |
> |
x11meta: xmeta.o x11plot.o plot.o palloc.o |
89 |
> |
$(CC) $(CFLAGS) -o x11meta xmeta.o x11plot.o plot.o palloc.o \ |
90 |
|
$(common) -lrt -lX11 $(MLIB) |
101 |
– |
cp a.out $(INSTDIR)/x11meta |
91 |
|
|
92 |
< |
$(INSTDIR)/psmeta: psmeta.o psplot.o |
93 |
< |
$(CC) $(CFLAGS) psmeta.o psplot.o $(common) -lrt $(MLIB) |
105 |
< |
cp a.out $(INSTDIR)/psmeta |
92 |
> |
psmeta: psmeta.o psplot.o |
93 |
> |
$(CC) $(CFLAGS) -o psmeta psmeta.o psplot.o $(common) -lrt $(MLIB) |
94 |
|
|
95 |
< |
$(INSTDIR)/plotout: plotout.o |
96 |
< |
$(CC) $(CFLAGS) plotout.o $(common) -lplot -lrt -l4014 $(MLIB) |
109 |
< |
cp a.out $(INSTDIR)/plotout |
95 |
> |
plotout: plotout.o ../lib/lib4014.a |
96 |
> |
$(CC) $(CFLAGS) -o plotout plotout.o $(common) -lplot -lrt -l4014 $(MLIB) |
97 |
|
|
98 |
< |
$(INSTDIR)/plotin: plotin.o primout.o |
99 |
< |
$(CC) $(CFLAGS) plotin.o primout.o $(common) -lrt $(MLIB) |
113 |
< |
cp a.out $(INSTDIR)/plotin |
98 |
> |
plotin: plotin.o primout.o |
99 |
> |
$(CC) $(CFLAGS) -o plotin plotin.o primout.o $(common) -lrt $(MLIB) |
100 |
|
|
101 |
< |
$(INSTDIR)/pexpand: pexpand.o expand.o segment.o palloc.o |
102 |
< |
$(CC) $(CFLAGS) pexpand.o expand.o segment.o \ |
101 |
> |
pexpand: pexpand.o expand.o segment.o palloc.o |
102 |
> |
$(CC) $(CFLAGS) -o pexpand pexpand.o expand.o segment.o \ |
103 |
|
$(common) palloc.o -lrt $(MLIB) |
118 |
– |
cp a.out $(INSTDIR)/pexpand |
104 |
|
|
105 |
< |
$(INSTDIR)/psort: psort.o sort.o palloc.o |
106 |
< |
$(CC) $(CFLAGS) psort.o sort.o $(common) palloc.o -lrt $(MLIB) |
122 |
< |
cp a.out $(INSTDIR)/psort |
105 |
> |
psort: psort.o sort.o palloc.o |
106 |
> |
$(CC) $(CFLAGS) -o psort psort.o sort.o $(common) palloc.o -lrt $(MLIB) |
107 |
|
|
108 |
< |
$(INSTDIR)/cv: cv.o mfio.o cvhfio.o syscalls.o misc.o |
109 |
< |
$(CC) $(CFLAGS) cv.o mfio.o cvhfio.o syscalls.o misc.o \ |
108 |
> |
cv: cv.o mfio.o cvhfio.o syscalls.o misc.o |
109 |
> |
$(CC) $(CFLAGS) -o cv cv.o mfio.o cvhfio.o syscalls.o misc.o \ |
110 |
|
-lrt $(MLIB) |
127 |
– |
cp a.out $(INSTDIR)/cv |
111 |
|
|
112 |
< |
$(INSTDIR)/plot4: plot4.o primout.o |
113 |
< |
$(CC) $(CFLAGS) plot4.o primout.o $(common) -lrt $(MLIB) |
131 |
< |
cp a.out $(INSTDIR)/plot4 |
112 |
> |
plot4: plot4.o primout.o |
113 |
> |
$(CC) $(CFLAGS) -o plot4 plot4.o primout.o $(common) -lrt $(MLIB) |
114 |
|
|
115 |
< |
$(INSTDIR)/tcurve: tcurve.o tgraph.o primout.o |
116 |
< |
$(CC) $(CFLAGS) tcurve.o tgraph.o primout.o \ |
115 |
> |
tcurve: tcurve.o tgraph.o primout.o |
116 |
> |
$(CC) $(CFLAGS) -o tcurve tcurve.o tgraph.o primout.o \ |
117 |
|
$(common) $(MLIB) |
136 |
– |
cp a.out $(INSTDIR)/tcurve |
118 |
|
|
119 |
< |
$(INSTDIR)/tscat: tscat.o tgraph.o primout.o |
120 |
< |
$(CC) $(CFLAGS) tscat.o tgraph.o primout.o \ |
119 |
> |
tscat: tscat.o tgraph.o primout.o |
120 |
> |
$(CC) $(CFLAGS) -o tscat tscat.o tgraph.o primout.o \ |
121 |
|
$(common) -lrt $(MLIB) |
141 |
– |
cp a.out $(INSTDIR)/tscat |
122 |
|
|
123 |
< |
$(INSTDIR)/tbar: tbar.o tgraph.o primout.o |
124 |
< |
$(CC) $(CFLAGS) tbar.o tgraph.o primout.o $(common) -lrt $(MLIB) |
145 |
< |
cp a.out $(INSTDIR)/tbar |
123 |
> |
tbar: tbar.o tgraph.o primout.o |
124 |
> |
$(CC) $(CFLAGS) -o tbar tbar.o tgraph.o primout.o $(common) -lrt $(MLIB) |
125 |
|
|
126 |
< |
$(EXEC2)/mtext: mtext.o primout.o |
127 |
< |
$(CC) $(CFLAGS) mtext.o primout.o $(common) -lrt |
149 |
< |
cp a.out $(EXEC2)/mtext |
126 |
> |
mtext: mtext.o primout.o |
127 |
> |
$(CC) $(CFLAGS) -o mtext mtext.o primout.o $(common) -lrt |
128 |
|
|
129 |
|
../lib/libmeta.a: metacalls.o primout.o progname.o |
130 |
|
ar rc ../lib/libmeta.a metacalls.o primout.o \ |
134 |
|
../lib/lib4014.a: |
135 |
|
cd lib4014; make INSTDIR=../../lib "CFLAGS=$(OPT)" install clean |
136 |
|
|
137 |
< |
$(INSTDIR)/bgraph: bgraph.o mgvars.o mgraph.o ../lib/libmeta.a |
138 |
< |
$(CC) $(CFLAGS) bgraph.o mgvars.o mgraph.o \ |
137 |
> |
bgraph: bgraph.o mgvars.o mgraph.o ../lib/libmeta.a |
138 |
> |
$(CC) $(CFLAGS) -o bgraph bgraph.o mgvars.o mgraph.o \ |
139 |
|
-lmeta -lrt $(MLIB) |
162 |
– |
cp a.out $(INSTDIR)/bgraph |
140 |
|
|
141 |
< |
$(INSTDIR)/igraph: igraph.o mgvars.o mgraph.o ../lib/libmeta.a \ |
141 |
> |
igraph: igraph.o mgvars.o mgraph.o ../lib/libmeta.a \ |
142 |
|
gcalc.o cgraph.o |
143 |
< |
$(CC) $(CFLAGS) igraph.o mgvars.o mgraph.o \ |
143 |
> |
$(CC) $(CFLAGS) -o igraph igraph.o mgvars.o mgraph.o \ |
144 |
|
cgraph.o gcalc.o -lmeta -lrt $(MLIB) |
168 |
– |
cp a.out $(INSTDIR)/igraph |
145 |
|
|
146 |
< |
$(INSTDIR)/dgraph: dgraph.o cgraph.o mgvars.o |
147 |
< |
$(CC) $(CFLAGS) dgraph.o cgraph.o mgvars.o \ |
146 |
> |
dgraph: dgraph.o cgraph.o mgvars.o |
147 |
> |
$(CC) $(CFLAGS) -o dgraph dgraph.o cgraph.o mgvars.o \ |
148 |
|
-lrt $(MLIB) |
173 |
– |
cp a.out $(INSTDIR)/dgraph |
149 |
|
|
150 |
< |
$(INSTDIR)/gcomp: gcomp.o gcalc.o mgvars.o |
151 |
< |
$(CC) $(CFLAGS) gcomp.o gcalc.o mgvars.o \ |
150 |
> |
gcomp: gcomp.o gcalc.o mgvars.o |
151 |
> |
$(CC) $(CFLAGS) -o gcomp gcomp.o gcalc.o mgvars.o \ |
152 |
|
-lrt $(MLIB) |
153 |
< |
cp a.out $(INSTDIR)/gcomp |
153 |
> |
|
154 |
> |
# dependencies |
155 |
> |
meta2tga okimate impress mx80 t4014 plotout x11meta \ |
156 |
> |
mt160l mt160 pexpand plot4 psort imagew tcurve mtext \ |
157 |
> |
tscat plotin tbar xmeta ../lib/libmeta.a aed5 psmeta: $(common) |
158 |
|
|
159 |
|
cvhfio.o: cvhfio.c hfio.c |
160 |
|
|