# Copyright (c) 1988 Regents of the University of California.
# Redistribution and use in source and binary forms are permitted
# provided that the above copyright notice and this paragraph are
# duplicated in all such forms and that any documentation,
# advertising materials, and other materials related to such
# distribution and use acknowledge that the software was developed
# by the University of California, Berkeley. The name of the
# University may not be used to endorse or promote products derived
# from this software without specific prior written permission.
# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
# @(#)makefile 4.3 (Berkeley) 6/21/90
CFLAGS = -I obj ${DEBUG_FLAGS}
ALLC = apilib.c api_bsd.c api_exch.c asc_ebc.c astosc.c dctype.c \
ALLH = apilib.h api_exch.h asc_ebc.h astosc.h disp_asc.h dctype.h ebc_disp.h
ALLSOURCE = ${ALLPRINT} makefile makefile.mak
ALLO = apilib.o api_bsd.o api_exch.o astosc.o asc_ebc.o dctype.o \
${AR} ${ARFLAGS} $@ ${ALLO}
-rm ${ALLO} errs apilib.a makefile.bak \
disp_out asc_disp.out astosc.out disp_asc.out \
astosc.OUT disp_asc.OUT \
test* test.o t1* t1.o t2* t2.o
${CC} ${CFLAGS} -o $@ test.o apilib.a
${CC} ${CFLAGS} -o $@ t1.o apilib.a
${CC} ${CFLAGS} -o $@ t2.o apilib.a
do (echo ${DIRPATH}$$i); done
do (echo ${DIRPATH}$$i); done
@for i in ${ALLSOURCE}; \
do (echo ${DIRPATH}$$i); done
astosc.OUT: ../ctlr/function.h ../ctlr/hostctlr.h ../ctlr/$(KBD)
(cd ${.CURDIR}/../tools; make mkastosc )
../tools/mkastosc ${.CURDIR}/../ctlr/hostctlr.h \
${.CURDIR}/../ctlr/function.h < \
${.CURDIR}/../ctlr/$(KBD) > $@
(cd ${.CURDIR}/../tools; make mkastods )
(cd ${.CURDIR}/../tools; make mkdstoas )
grep '^#include' ${ALLC} | grep -v '<' | \
sed -e 's/:[^"]*"\([^"]*\)".*/: \1/' \
awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \
else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
else rec = rec " " $$2 } } \
END { print rec } ' > makedep
echo '$$r makedep' >>eddep
echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep
echo '$$r makedep' >>eddep
# DO NOT DELETE THIS LINE
apilib.o: ../ctlr/api.h apilib.h
api_bsd.o: ../ctlr/api.h api_exch.h
api_exch.o: ../general/general.h api_exch.h
astosc.o: ../general/general.h ../ctlr/function.h astosc.h astosc.OUT
disp_asc.o: disp_asc.h asc_disp.out disp_asc.OUT