1 | # This file is part of the Project Athena Global Message System. |
---|
2 | # Created by: Mark W. Eichin <eichin@athena.mit.edu> |
---|
3 | # $Source: /afs/dev.mit.edu/source/repository/athena/bin/gms/Makefile,v $ |
---|
4 | # $Author: epeisach $ |
---|
5 | # |
---|
6 | # Copyright (c) 1988 by the Massachusetts Institute of Technology. |
---|
7 | # For copying and distribution information, see the file |
---|
8 | # "mit-copyright.h". |
---|
9 | # |
---|
10 | # $Header: /afs/dev.mit.edu/source/repository/athena/bin/gms/Makefile,v 1.9 1990-07-12 14:01:36 epeisach Exp $ |
---|
11 | # Generic one project, one target makefile. |
---|
12 | # |
---|
13 | |
---|
14 | PROJECT= gms |
---|
15 | TARGET= get_message |
---|
16 | SERVER= messaged |
---|
17 | |
---|
18 | CSRCS= get_a_message.c get_fallback_file.c get_message.c get_message_from_server.c get_servername.c gethost_errors.c hesiod_errors.c put_fallback_file.c read_to_memory.c view_message_by_tty.c view_message_by_zephyr.c check_viewable.c |
---|
19 | |
---|
20 | ETSRCS= gethost_err.et globalmessage_err.et hesiod_err.et |
---|
21 | ETINCS= gethost_err.h globalmessage_err.h hesiod_err.h |
---|
22 | ETOBJS= gethost_err.o globalmessage_err.o hesiod_err.o |
---|
23 | ETCSRC= gethost_err.c globalmessage_err.c hesiod_err.c |
---|
24 | |
---|
25 | OBJS= get_a_message.o get_fallback_file.o get_message.o get_message_from_server.o get_servername.o gethost_errors.o hesiod_errors.o put_fallback_file.o read_to_memory.o view_message_by_tty.o view_message_by_zephyr.o check_viewable.o |
---|
26 | |
---|
27 | |
---|
28 | INCLUDE= -I. |
---|
29 | |
---|
30 | ALLSRCS= $(CSRCS) $(ETSRCS) |
---|
31 | |
---|
32 | |
---|
33 | CFLAGS= -O ${INCLUDE} |
---|
34 | |
---|
35 | DEPEND=touch Make.depend; /usr/athena/makedepend -fMake.depend |
---|
36 | COMPILE_ET=/usr/athena/compile_et |
---|
37 | |
---|
38 | LIB= lib${PROJECT}.a |
---|
39 | LIBS= $(LIB) -lhesiod -lcom_err |
---|
40 | |
---|
41 | all: $(TARGET) $(SERVER) |
---|
42 | |
---|
43 | clean: |
---|
44 | -rm -f $(OBJS) $(LIB) $(TARGET) $(ETINCS) $(ETOBJS) |
---|
45 | -rm -f $(SERVER) message_daemon.o |
---|
46 | |
---|
47 | $(TARGET): $(LIB) $(TARGET).o |
---|
48 | $(CC) $(CFLAGS) -o $@ $(TARGET).o $(LIBS) |
---|
49 | |
---|
50 | install: $(TARGET) $(SERVER) |
---|
51 | install -c -s $(TARGET) ${DESTDIR}/bin/athena/$(TARGET) |
---|
52 | install -c get_message.1 ${DESTDIR}/usr/man/man1 |
---|
53 | install -c -s $(SERVER) ${DESTDIR}/etc/athena/$(SERVER) |
---|
54 | |
---|
55 | server: $(SERVER) |
---|
56 | |
---|
57 | MDFLAGS=-DGMS_SERVER_MESSAGE=\"/site/Message\" |
---|
58 | |
---|
59 | message_daemon.o: message_daemon.c |
---|
60 | $(CC) $(CFLAGS) $(MDFLAGS) -c message_daemon.c |
---|
61 | |
---|
62 | $(SERVER): message_daemon.o $(LIB) |
---|
63 | $(CC) $(CFLAGS) -o $@ message_daemon.o $(LIBS) |
---|
64 | |
---|
65 | |
---|
66 | $(LIB): $(ETOBJS) $(OBJS) |
---|
67 | -rm -f $(LIB) |
---|
68 | ar cruv $(LIB) $(OBJS) $(ETOBJS) |
---|
69 | ranlib $(LIB) |
---|
70 | |
---|
71 | .SUFFIXES: .o .h .et |
---|
72 | |
---|
73 | $(ETINCS): $(ETSRCS) |
---|
74 | rm -f $*.c $*.h |
---|
75 | $(COMPILE_ET) $*.et |
---|
76 | |
---|
77 | $(ETCSRC): $(ETSRCS) |
---|
78 | rm -f $*.c $*.h |
---|
79 | $(COMPILE_ET) $*.et |
---|
80 | |
---|
81 | $(ETOBJS): $(ETINCS) $(ETCSRC) |
---|
82 | |
---|
83 | depend: $(ETINCS) |
---|
84 | ${DEPEND} -v ${CFLAGS} -s'# DO NOT DELETE' $(CSRCS) $(MODS) |
---|
85 | |
---|