1 | CFLAGS= -g -I../include |
---|
2 | LFLAGS= -uhv -I../include -DKERBEROS -DCONNECT -DSUBPROC |
---|
3 | |
---|
4 | SRCS= tfile.c tunix.c tnet.c stubs.c dsname.c interface.c rpcall.c \ |
---|
5 | conv_mgr.c host.c announce.c \ |
---|
6 | res_module.c auth_krb.c dsc_enter.c auth_dum.c |
---|
7 | |
---|
8 | OBJS= tfile.o tunix.o tnet.o stubs.o dsname.o interface.o rpcall.o \ |
---|
9 | conv_mgr.o host.o announce.o \ |
---|
10 | ../ets/usp_et.o ../ets/rpc_et.o dsc_enter.o |
---|
11 | |
---|
12 | KOBJS= res_module.k.o auth_krb.o ../ets/krb_et.o |
---|
13 | NKOBJS= res_module.nk.o auth_dum.o |
---|
14 | |
---|
15 | all: libds.a libdsk.a llib-lds.ln |
---|
16 | |
---|
17 | libds.a: $(OBJS) ${NKOBJS} |
---|
18 | ar cruv libds.a $(OBJS) ${NKOBJS} |
---|
19 | ranlib libds.a |
---|
20 | |
---|
21 | libdsk.a: $(OBJS) ${KOBJS} |
---|
22 | ar cruv libdsk.a $(OBJS) ${KOBJS} |
---|
23 | ranlib libdsk.a |
---|
24 | |
---|
25 | libds_p.a: ${OBJS} ${NKOBJS} |
---|
26 | (cd profiled; ar cruv ../libds_p.a ${OBJS} ${NKOBJS} ; \ |
---|
27 | ranlib ../libds_p.a) |
---|
28 | |
---|
29 | libdsk_p.a: ${OBJS} ${KOBJS} |
---|
30 | (cd profiled; ar cruv ../libdsk_p.a ${OBJS} ${KOBJS} ; \ |
---|
31 | ranlib ../libdsk_p.a) |
---|
32 | |
---|
33 | lint: llib-lds.ln |
---|
34 | |
---|
35 | llib-lds.ln: $(SRCS) |
---|
36 | lint -Cds $(LFLAGS) $(SRCS) |
---|
37 | |
---|
38 | # these should make profiled versions too |
---|
39 | res_module.k.o: res_module.c |
---|
40 | rm -f res_module.k.o res_module.o profiled/res_module.k.o |
---|
41 | ${CC} $(CFLAGS) -DKERBEROS -c -p res_module.c |
---|
42 | mv res_module.o profiled/res_module.k.o |
---|
43 | ${CC} $(CFLAGS) -DKERBEROS -c res_module.c |
---|
44 | mv res_module.o res_module.k.o |
---|
45 | |
---|
46 | res_module.nk.o: res_module.c |
---|
47 | rm -f res_module.nk.o res_module.o profiled/res_module.nk.o |
---|
48 | ${CC} $(CFLAGS) -c -p res_module.c |
---|
49 | mv res_module.o profiled/res_module.nk.o |
---|
50 | ${CC} ${CFLAGS} -c res_module.c |
---|
51 | mv res_module.o res_module.nk.o |
---|
52 | |
---|
53 | install: |
---|
54 | |
---|
55 | dist: $(SRCS) Makefile |
---|
56 | -mkdir ../dist/libds |
---|
57 | -mkdir ../dist/libds/profiled |
---|
58 | cp -p $(SRCS) ../dist/libds/ |
---|
59 | cp -p Makefile ../dist/libds/ |
---|
60 | |
---|
61 | .c.o: |
---|
62 | -rm -f $*.o profiled/$*.o |
---|
63 | ${CC} -c -pg ${CFLAGS} $*.c |
---|
64 | mv -f $*.o profiled/$*.o |
---|
65 | ${CC} -c ${CFLAGS} $*.c |
---|
66 | |
---|
67 | clean: |
---|
68 | rm -rf *~ \#* *.o libds.a libdsk.a profiled/ llib-lds.ln |
---|
69 | |
---|
70 | # 'make depend' code |
---|
71 | depend: ${CFILES} |
---|
72 | ${CC} -M ${CFLAGS} ${SRCS} | \ |
---|
73 | sed -e ':loop' \ |
---|
74 | -e 's/\.\.\/[^ /]*\/\.\./../' \ |
---|
75 | -e 't loop' | \ |
---|
76 | awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \ |
---|
77 | else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \ |
---|
78 | else rec = rec " " $$2 } } \ |
---|
79 | END { print rec } ' > makedep |
---|
80 | echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep |
---|
81 | echo '$$r makedep' >>eddep |
---|
82 | echo 'w' >>eddep |
---|
83 | cp Makefile Makefile.bak |
---|
84 | ed - Makefile < eddep |
---|
85 | rm eddep makedep |
---|
86 | # |
---|
87 | # the last line in the makefile should be... |
---|
88 | # DO NOT DELETE THIS LINE |
---|
89 | |
---|
90 | tfile.o: tfile.c /usr/include/stdio.h /usr/include/errno.h ./../include/tfile.h |
---|
91 | tfile.o: /usr/include/sys/types.h /usr/include/sys/stat.h |
---|
92 | tunix.o: tunix.c /usr/include/stdio.h ./../include/tfile.h /usr/include/errno.h |
---|
93 | tunix.o: /usr/include/sys/types.h /usr/include/sys/stat.h |
---|
94 | tnet.o: tnet.c /usr/include/stdio.h ./../include/usp.h ./../include/usp_et.h |
---|
95 | tnet.o: ./../include/tfile.h /usr/include/errno.h |
---|
96 | stubs.o: stubs.c ./../include/interface.h ./../include/types.h |
---|
97 | stubs.o: ./../include/rpc.h /usr/include/stdio.h ./../include/usp.h |
---|
98 | stubs.o: ./../include/usp_et.h ./../include/rpc_et.h ./../include/tfile.h |
---|
99 | stubs.o: ./../include/acl.h ./../include/types.h |
---|
100 | dsname.o: dsname.c /usr/include/stdio.h /usr/include/strings.h |
---|
101 | dsname.o: /usr/include/pwd.h /usr/include/sys/file.h /usr/include/sys/param.h |
---|
102 | dsname.o: /usr/include/machine/machparam.h /usr/include/signal.h |
---|
103 | dsname.o: /usr/include/sys/types.h /usr/include/errno.h ../include/config.h |
---|
104 | dsname.o: ../include/dsname.h ../include/dsc_et.h |
---|
105 | interface.o: interface.c /usr/include/stdio.h /usr/include/strings.h |
---|
106 | interface.o: ../include/tfile.h ../include/interface.h ../include/types.h |
---|
107 | interface.o: ../include/acl.h ../include/types.h /usr/include/errno.h |
---|
108 | interface.o: ../include/dsname.h |
---|
109 | rpcall.o: rpcall.c /usr/include/sys/types.h /usr/include/stdio.h |
---|
110 | rpcall.o: /usr/include/ctype.h /usr/include/strings.h /usr/include/sys/socket.h |
---|
111 | rpcall.o: /usr/include/netinet/in.h /usr/include/netdb.h ../include/tfile.h |
---|
112 | rpcall.o: ../include/rpc.h /usr/include/stdio.h ../include/usp.h |
---|
113 | rpcall.o: ../include/usp_et.h ../include/rpc_et.h ../include/config.h |
---|
114 | conv_mgr.o: conv_mgr.c /usr/include/errno.h /usr/include/strings.h |
---|
115 | conv_mgr.o: ../include/rpc.h /usr/include/stdio.h ../include/usp.h |
---|
116 | conv_mgr.o: ../include/usp_et.h ../include/rpc_et.h |
---|
117 | host.o: host.c /usr/include/strings.h /usr/include/netdb.h /usr/include/ctype.h |
---|
118 | announce.o: announce.c /usr/include/stdio.h /usr/include/sys/file.h |
---|
119 | announce.o: ../include/tfile.h ../include/interface.h ../include/types.h |
---|
120 | announce.o: ../include/dsname.h ../include/dsc_et.h |
---|
121 | res_module.o: res_module.c ../include/rpc_et.h ../include/config.h |
---|
122 | res_module.o: /usr/include/netdb.h /usr/include/strings.h /usr/include/ctype.h |
---|
123 | auth_krb.o: auth_krb.c /usr/include/strings.h /usr/include/ctype.h |
---|
124 | auth_krb.o: /usr/include/krb.h ../include/des.h |
---|