1#
2# Copyright (c) 1988 Regents of the University of California.
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms are permitted
6# provided that this notice is preserved and that due credit is given
7# to the University of California at Berkeley. The name of the University
8# may not be used to endorse or promote products derived from this
9# software without specific prior written permission. This software
10# is provided ``as is'' without express or implied warranty.
11#
12#	@(#)makefile	3.2 (Berkeley) 03/28/88
13#
14# msdos versus unix defines
15O	= .o
16#PC_O	= .obj
17
18X	=
19#PC_X	= .exe
20
21L	=
22#PC_L	= -link
23
24CC	= cc
25#PC_CC	= cl
26
27MV	= mv
28#PC_MV	= rename
29
30RM	= rm -f
31#PC_RM= erase
32
33LINT_ARGS =
34#PC_LINT_ARGS = -DLINT_ARGS
35
36DEBUG_FLAGS = -g
37#PC_DEBUG_FLAGS = -Zi -Od
38
39AR	= ar
40AR1	= cr
41AR2	=
42AR3	=
43#PC_AR	= lib
44#PC_AR1	=
45#PC_AR2	= +
46#PC_AR3	= ";"
47
48RANLIB	= ranlib
49#PC_RANLIB = echo "Done with "
50
51DEFINES = ${LINT_ARGS}
52
53CFLAGS = ${DEBUG_FLAGS} -I..
54
55PRINT = lpr -p
56
57ALLC = tnrecv.c
58ALLH = tncomp.h
59
60ALLPRINT = ${ALLH} ${ALLC}
61
62ALLSOURCE = ${ALLPRINT} makefile makefile.mak
63
64ALLO = tnrecv$O
65
66.c.obj:
67	${CC} ${CFLAGS} -c $<
68
69all:	tnrecv$X
70
71tnrecv$X:	tnrecv$O
72	${CC} ${CFLAGS} -o $@ tnrecv$O $L ../api/apilib.a
73
74clean:
75	for i in makefile.bak ${ALLO} errs tnrecv$X; \
76		do (${RM} $$i); done
77
78.DEFAULT:
79	sccs get $<
80
81sccsclean:
82	-sccs clean
83	-sccs get makefile
84
85action:
86	${ACTION}
87
88print:
89	${PRINT} ${ALLPRINT}
90
91sourcelist:	${ALLSOURCE} tarread.exe
92	@for i in ${ALLSOURCE} tarread.exe; \
93		do (echo ${DIRPATH}$$i); done
94
95depend:
96	grep '^#include' ${ALLC} | grep -v '<' | \
97	sed -e 's/:[^"]*"\([^"]*\)".*/: \1/' \
98	    -e 's/\.c/$$O/' | \
99	awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \
100		else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
101		       else rec = rec " " $$2 } } \
102	      END { print rec } ' > makedep
103	echo '$$r makedep' >>eddep
104	echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep
105	echo '$$r makedep' >>eddep
106	echo 'w' >>eddep
107	-rm -f makefile.bak
108	cp makefile makefile.bak
109	ed - makefile < eddep
110	rm eddep makedep
111
112# DO NOT DELETE THIS LINE
113
114#include "tncomp.h" "../api/api.h" "../ctlr/function.h" "../ctlr/hostctlr.h"
115#include "../ctlr/oia.h" "../ctlr/screen.h" "../apilib/disp_asc.h"
116#include "../apilib/astosc.h" "../general/general.h"
117