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 the above copyright notice and this paragraph are
7# duplicated in all such forms and that any documentation,
8# advertising materials, and other materials related to such
9# distribution and use acknowledge that the software was developed
10# by the University of California, Berkeley.  The name of the
11# University may not be used to endorse or promote products derived
12# from this software without specific prior written permission.
13# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
16#
17#	@(#)makefile	4.1 (Berkeley) 12/04/88
18#
19# msdos versus unix defines
20O	= .o
21#PC_O	= .obj
22
23X	=
24#PC_X	= .exe
25
26L	=
27#PC_L	= -link
28
29CC	= cc
30#PC_CC	= cl
31
32MV	= mv
33#PC_MV	= rename
34
35RM	= rm -f
36#PC_RM= erase
37
38LINT_ARGS =
39#PC_LINT_ARGS = -DLINT_ARGS
40
41DEBUG_FLAGS = -g
42#PC_DEBUG_FLAGS = -Zi -Od
43
44AR	= ar
45AR1	= cr
46AR2	=
47AR3	=
48#PC_AR	= lib
49#PC_AR1	=
50#PC_AR2	= +
51#PC_AR3	= ";"
52
53RANLIB	= ranlib
54#PC_RANLIB = echo "Done with "
55
56DEFINES = ${LINT_ARGS}
57
58CFLAGS = ${DEBUG_FLAGS} -I..
59
60PRINT = lpr -p
61
62ALLC = tnrecv.c
63ALLH = tncomp.h
64
65ALLPRINT = ${ALLH} ${ALLC}
66
67ALLSOURCE = ${ALLPRINT} makefile makefile.mak
68
69ALLO = tnrecv$O
70
71.c.obj:
72	${CC} ${CFLAGS} -c $<
73
74all:	tnrecv$X
75
76tnrecv$X:	tnrecv$O
77	${CC} ${CFLAGS} -o $@ tnrecv$O $L ../api/apilib.a
78
79clean:
80	for i in makefile.bak ${ALLO} errs tnrecv$X; \
81		do (${RM} $$i); done
82
83.DEFAULT:
84	sccs get $<
85
86sccsclean:
87	-sccs clean
88	-sccs get makefile
89
90action:
91	${ACTION}
92
93print:
94	${PRINT} ${ALLPRINT}
95
96sourcelist:	${ALLSOURCE} tarread.exe
97	@for i in ${ALLSOURCE} tarread.exe; \
98		do (echo ${DIRPATH}$$i); done
99
100depend:
101	grep '^#include' ${ALLC} | grep -v '<' | \
102	sed -e 's/:[^"]*"\([^"]*\)".*/: \1/' \
103	    -e 's/\.c/$$O/' | \
104	awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \
105		else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
106		       else rec = rec " " $$2 } } \
107	      END { print rec } ' > makedep
108	echo '$$r makedep' >>eddep
109	echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep
110	echo '$$r makedep' >>eddep
111	echo 'w' >>eddep
112	-rm -f makefile.bak
113	cp makefile makefile.bak
114	ed - makefile < eddep
115	rm eddep makedep
116
117# DO NOT DELETE THIS LINE
118
119#include "tncomp.h" "../api/api.h" "../ctlr/function.h" "../ctlr/hostctlr.h"
120#include "../ctlr/oia.h" "../ctlr/screen.h" "../apilib/disp_asc.h"
121#include "../apilib/astosc.h" "../general/general.h"
122