]>
Commit | Line | Data |
---|---|---|
de56407f | 1 | # |
2 | # $Source$ | |
3 | # $Header$ | |
4 | # | |
5 | ||
6 | # | |
7 | # Makefile for 'update' directory. | |
8 | # | |
9 | ||
10 | CC= cc | |
11 | INCS= -I../include | |
12 | DEFS= | |
13 | CFLAGS= -g ${INCS} ${DEFS} | |
14 | LINTFLAGS= ${INCS} | |
15 | LDFLAGS= -x | |
16 | ||
17 | # server object files | |
18 | SOBJS= dispatch.o initialize_server.o \ | |
19 | quit.o xfer_001.o misc.o inst_001.o sync.o auth_001.o \ | |
20 | exec_001.o get_file.o xfer_002.o exec_002.o | |
21 | ||
22 | # client object files | |
6643f7ba | 23 | COBJS= client.o ticket.o send_file.o checksum.o hostname.o |
de56407f | 24 | |
25 | # common object files | |
26 | COMOBJS= log_error.o hostname.o smsu_int.o log.o checksum.o | |
27 | ||
28 | SSRCS= dispatch.c initialize_server.c \ | |
29 | quit.c xfer_001.c misc.c inst_001.c sync.c auth_001.c \ | |
30 | exec_001.c get_file.c xfer_002.c exec_002.c | |
31 | ||
6643f7ba | 32 | CSRCS= client.c ticket.c send_file.c checksum.c hostname.c |
de56407f | 33 | |
34 | COMSRCS= log_error.c hostname.c log.c checksum.c | |
35 | ||
de56407f | 36 | LIBS= -L../lib -lgdb -lkrb -ldes -lcom_err |
37 | ||
6643f7ba | 38 | all: sms_update.o # server test smskey |
39 | ||
40 | sms_update.o: ${COBJS} | |
41 | ld -r -o sms_update.o ${COBJS} | |
42 | ||
43 | client.o: client.c | |
44 | ||
de56407f | 45 | |
46 | clean: | |
a21b4b84 | 47 | -rm -f ${COBJS} ${SOBJS} ${COMOBJS} client.o |
6643f7ba | 48 | -rm -f server sms_update.o test test.o smsu_int.h smskey |
de56407f | 49 | -rm -f core a.out *~ \#* |
50 | ||
7eef31e6 | 51 | install: |
52 | # This is probably wrong.. | |
53 | install server ../bin/update_server | |
54 | install test ../bin/update_test | |
d7bd457d | 55 | install smskey ../bin/smskey |
7eef31e6 | 56 | |
de56407f | 57 | lint: |
58 | lint ${LINTFLAGS} ${SSRCS} ${COMSRCS} | |
59 | lint ${LINTFLAGS} ${CSRCS} ${COMSRCS} | |
d7bd457d | 60 | lint ${LINTFLAGS} smskey.c |
de56407f | 61 | |
62 | server: ${SOBJS} ${COMOBJS} | |
63 | rm -f server | |
64 | ${CC} ${CFLAGS} -o server ${SOBJS} ${COMOBJS} ${LIBS} | |
65 | ||
d7bd457d | 66 | smskey: smskey.c |
67 | ${CC} ${CFLAGS} -o smskey smskey.c -ldes | |
68 | ||
6643f7ba | 69 | # sms_update.o: ${COBJS} ${COMOBJS} |
70 | # ld ${LDFLAGS} -r -o sms_update.o ${COBJS} ${COMOBJS} | |
71 | # -chmod -x sms_update.o | |
de56407f | 72 | |
73 | smsu_int.o smsu_int.h: smsu_int.et | |
b7be5219 | 74 | compile_et smsu_int |
de56407f | 75 | |
76 | test.o: test.c | |
77 | -rm -f test.o | |
78 | ${CC} ${CFLAGS} -c test.c | |
79 | ||
80 | test: test.o sms_update.o | |
81 | rm -f test | |
82 | ${CC} ${CFLAGS} -o test test.o sms_update.o ${LIBS} | |
83 | ||
d7bd457d | 84 | SRCS= ${SSRCS} ${CSRCS} ${COMSRCS} smskey.c |
de56407f | 85 | depend: smsu_int.h |
86 | -rm -f eddep makedep | |
87 | ${CC} -M ${CFLAGS} ${SRCS} | \ | |
88 | sed -e 's; ./; ;' \ | |
89 | -e ':loop' \ | |
90 | -e 's/\.\.\/[^ /]*\/\.\./../' \ | |
91 | -e 't loop' | \ | |
92 | awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \ | |
93 | else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \ | |
94 | else rec = rec " " $$2 } } \ | |
95 | END { print rec } ' > makedep | |
96 | echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep | |
97 | echo '$$r makedep' >>eddep | |
98 | echo 'w' >>eddep | |
99 | -rm -f Makefile.bak | |
100 | cp Makefile Makefile.bak | |
101 | ed - Makefile < eddep | |
102 | rm -f eddep makedep | |
103 | # | |
104 | # the last line in the makefile should be... | |
105 | # DO NOT DELETE THIS LINE |