BSD 4_4 development
[unix-history] / usr / src / contrib / xns / examples / gap / Makefile
CommitLineData
ff54904d
C
1# $Header: Makefile,v 2.3 87/05/08 16:46:21 ed Exp $
2# $Log: Makefile,v $
3# Revision 2.3 87/05/08 16:46:21 ed
4# Make use of -I switch on xnscourier.
5#
6# Revision 2.2 87/01/06 16:38:28 ed
7# Webster version -- redo make and make install
8#
9# Revision 2.2 87/01/06 16:38:28 ed
10# Updated to new directory structure
11#
12# Revision 2.1 86/06/25 12:51:18 jqj
13# use ${CC} instead of cc
14#
15# Revision 2.0 85/11/21 07:22:57 jqj
16# 4.3BSD standard release
17#
18# Revision 1.2 85/10/21 12:32:46 root
19# Changed for Gould
20#
21# Revision 1.1 85/10/18 09:41:38 root
22# Initial revision
23#
24# Revision 1.1 85/05/22 09:45:36 jqj
25# Initial revision
26#
27
28DESTDIR =
29DESTBIN = ${DESTDIR}/usr/new
30DESTCOURIER = ${DESTDIR}/usr/new/lib/xnscourier
31
32BINDIR = ../../bin
33LIBDIR = ../../lib
34MANDIR = ../../man
35INCDIR = ../../include
36COURIERDIR = ../../xnscourier
37
38#CFLAGS= -g -DDEBUG -I${INCDIR}
39CFLAGS= -O -I${INCDIR}
40LDFLAGS=-g
41RCSREV=
42
43all: gaptelnet GAP3d
44
45clean:
46 -rm -f GAP3d gaptelnet *.o *.BAK *.CKP GAP3_*.c GAP3_defs.h GAP3.h \
47 GAP2_*.c GAP2_*.h GAP2.h
48
49rcs:
50 rcs -l RCS/*
51 cat ../../rcsdescription | ci -u${RCSREV} -q -N${RCSNAME} RCS/*
52
53install: GAP3d GAP3.h GAP2.h gaptelnet
54 install -c -s GAP3d ${COURIERDIR}/GAP3d
55 -install -c -s GAP2d ${COURIERDIR}/GAP2d
56 install -c -m 644 GAP3.cr ${COURIERDIR}/GAP3.cr
57 install -c -m 644 GAP3.h ${INCDIR}/xnscourier/GAP3.h
58 install -c -m 644 GAP2.cr ${COURIERDIR}/GAP2.cr
59 install -c -m 644 GAP2.h ${INCDIR}/xnscourier/GAP2.h
60 install -c -s gaptelnet ${BINDIR}/gaptelnet
61
62GAP3_support.o GAP3_client.o GAP3_serverx.o GAP3_support.c GAP3_client.c GAP3_server.c gaptelnet.o gaptelnetd.o: GAP3.h
63
64GAP3.h: GAP3.cr
65 ${BINDIR}/xnscourier -I${COURIERDIR} GAP3.cr
66
67GAP2_support.o GAP2_client.o GAP2_serverx.o GAP2_support.c GAP2_client.c GAP2_server.c gaptelnet.o gap2d.o: GAP2.h
68
69GAP2.h: GAP2.cr
70 ${BINDIR}/xnscourier -I${COURIERDIR} GAP2.cr
71
72gaptelnet: gaptelnet.o GAP3_support.o GAP3_client.o
73 ${CC} -o gaptelnet ${LDFLAGS} gaptelnet.o \
74 GAP3_support.o GAP3_client.o ${LIBS} ${LIBDIR}/libcourier.a
75
76gaptelnet.o: gaptelnet.c gapcontrols.h
77 ${CC} -c ${CFLAGS} gaptelnet.c
78
79GAP3d: gaptelnetd.o GAP3_support.o GAP3_serverx.o
80 ${CC} -o GAP3d ${LDFLAGS} gaptelnetd.o \
81 GAP3_support.o GAP3_serverx.o ${LIBDIR}/libcourier.a
82
83# have to split out Server() since it's special here
84# routine Server() appears in gaptelnetd.c
85GAP3_serverx.o: GAP3_server.c
86 sed -e '/^Server(/,/^}/d' GAP3_server.c > GAP3_serverx.c
87 ${CC} ${CFLAGS} -c GAP3_serverx.c
88
89
90GAP2d: gap2d.o GAP2_support.o GAP2_serverx.o gap2d-unimp.o
91 ${CC} -o GAP2d ${LDFLAGS} gap2d.o gap2d-unimp.o \
92 GAP2_support.o GAP2_serverx.o ${LIBDIR}/libcourier.a
93
94# have to split out Server() since it's special here
95# routine Server() appears in gaptelnetd.c
96GAP2_serverx.o: GAP2_server.c
97 sed -e '/^Server(/,/^}/d' GAP2_server.c > GAP2_serverx.c
98 ${CC} ${CFLAGS} -c GAP2_serverx.c