1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
# Make the Sun/IRAF shared library.
$call relink
$exit
update:
$call relink
$call install
$iffile (V.o) $call clean $endif
;
relink:
$set rebuild = no
$goto relink_
Relink:
$set rebuild = yes
relink_:
$set ADDR = 10000000
$set VV = "$$(@S.ver.$(MACH))"
$ifeq (OSVERSION, 4)
$set SI = bin$$S$(VV).e
$else
$set SI = bin$$S$(VV)_$(OSRELEASE).e
$endif
$set L1 = <libos.a>
$set L2 = <libex.a>
$set L3 = <libsys.a>
$set L4 = <libvops.a>
$ifnfile ($(SI), lib$libshare.a)
$set rebuild = yes
$else $ifolder ($(SI): $(L1), $(L2), $(L3), $(L4), Slib.c)
$set rebuild = yes
$end
$ifeq (rebuild, yes)
$ifeq (OSVERSION, 4)
!./mkshlib.sos4 -a $(ADDR)
$else
!./mkshlib.ssol -a $(ADDR)
$endif
$call libshare
$else
$echo "shared library is up to date"
$endif
;
install:
$set VV = "$$(@S.ver.$(MACH))"
$ifeq (OSVERSION, 4)
$set SI = S$(VV).e
$else
$set SI = S$(VV)_$(OSRELEASE).e
$endif
$iffile (S.e)
$iffile (bin$$$(SI).2) $move bin$$$(SI).2 bin$$$(SI).3 $endif
$iffile (bin$$$(SI).1) $move bin$$$(SI).1 bin$$$(SI).2 $endif
$iffile (bin$$$(SI) ) $move bin$$$(SI) bin$$$(SI).1 $endif
$move S.e bin$$$(SI)
$move libshare.a bin$
$iffile (bin$$$(SI).1, bin$$$(SI).2, bin$$$(SI).3)
!(find $(iraf)bin/$(SI).[123] -atime +1 -exec rm {} \;)
$endif
$endif
;
libshare:
libshare.a:
$set SYSF = onentry.o
$omake S.s
!ar xv $(iraf)bin.$(MACH)/libsys.a $(SYSF)
!ar rv libshare.a S.o $(SYSF); ranlib libshare.a; rm -f $(SYSF)
$endif
;
coff:
coff.e:
$omake coff.c
!cc coff.o -o coff.e
;
edsym:
edsym.e:
$ifeq (OSVERSION, 4)
$omake edsym-sos4.c
!cc edsym-sos4.o -o edsym.e
$else
$omake edsym-ssol.c
!cc edsym-ssol.o -lelf -o edsym.e
$endif
;
clean:
$ifeq (OSVERSION, 4)
!./mkshlib.sos4 -c
$else
!./mkshlib.ssol -c
$endif
;
|