source: trunk/athena/bin/gms/Makefile @ 3107

Revision 3107, 2.4 KB checked in by epeisach, 34 years ago (diff)
Turn on optimization
Line 
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.8 1990-07-02 15:46:14 epeisach Exp $
11# Generic one project, one target makefile.
12#
13
14PROJECT= gms
15TARGET= get_message
16SERVER= messaged
17
18CSRCS= 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
20ETSRCS= gethost_err.et globalmessage_err.et hesiod_err.et
21ETINCS= gethost_err.h globalmessage_err.h hesiod_err.h
22ETOBJS= gethost_err.o globalmessage_err.o hesiod_err.o
23ETCSRC= gethost_err.c globalmessage_err.c hesiod_err.c
24
25OBJS= 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
28INCLUDE= -I.
29
30ALLSRCS= $(CSRCS) $(ETSRCS)
31
32
33CFLAGS= -O ${INCLUDE}
34
35DEPEND=touch Make.depend; /usr/athena/makedepend -fMake.depend
36COMPILE_ET=/usr/athena/compile_et
37
38LIB= lib${PROJECT}.a
39LIBS= $(LIB) -lhesiod -lcom_err
40
41all: $(TARGET) $(SERVER)
42
43clean:
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
50install: $(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
55server: $(SERVER)
56
57MDFLAGS=-DGMS_SERVER_MESSAGE=\"/site/Message\"
58
59message_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 cqv $(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
83depend: $(ETINCS)
84        ${DEPEND} -v ${CFLAGS} -s'# DO NOT DELETE' $(CSRCS) $(MODS)
85
Note: See TracBrowser for help on using the repository browser.