BSD 4_3_Reno release
[unix-history] / usr / src / usr.bin / tn3270 / api / makefile
index 738fede..4e30b96 100644 (file)
@@ -1,22 +1,64 @@
-CFLAGS = -g
+#
+# Copyright (c) 1988 Regents of the University of California.
+# All rights reserved.
+#
+# 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
+#
+DEBUG_FLAGS = -g
+
+CFLAGS = -I obj ${DEBUG_FLAGS}
+
 PRINT = lpr -p
 
 PRINT = lpr -p
 
-ALLC = apilib.c api_bsd.c api_exch.c
-ALLH = apilib.h api_exch.h
+KBD    = 3270pc.kbd
+KBD    = unix.kbd
+
+ALLC = apilib.c api_bsd.c api_exch.c asc_ebc.c astosc.c dctype.c \
+               disp_asc.c ebc_disp.c
+
+ALLH = apilib.h api_exch.h asc_ebc.h astosc.h disp_asc.h dctype.h ebc_disp.h
+
 
 
-ALLPRINT = ${ALLH} ${ALLC}
+ALLHC= ${ALLH} ${ALLC}
+ALLPRINT =     ${ALLHC}
 
 ALLSOURCE = ${ALLPRINT} makefile makefile.mak
 
 
 ALLSOURCE = ${ALLPRINT} makefile makefile.mak
 
-ALLO = apilib.o api_bsd.o api_exch.o
+ALLO = apilib.o api_bsd.o api_exch.o astosc.o asc_ebc.o dctype.o \
+               disp_asc.o ebc_disp.o
+
+#.c.obj:
+#      ${CC} ${CFLAGS} -c $<
 
 apilib.a: ${ALLO}
 
 apilib.a: ${ALLO}
-       @-/bin/rm $@
-       ar cr $@ ${ALLO}
-       ranlib $@
+       -rm $@
+       ${AR} ${ARFLAGS} $@ ${ALLO}
+       ${RANLIB} $@
+
+.DEFAULT:
+       sccs get $<
 
 clean:
 
 clean:
-       -/bin/rm ${ALLO} errs apilib.a
+       -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
+
+sccsclean:
+       -sccs clean
+       -sccs get makefile
 
 action:
        ${ACTION}
 
 action:
        ${ACTION}
@@ -33,15 +75,41 @@ t2: apilib.a t2.o
 print:
        ${PRINT} ${ALLPRINT}
 
 print:
        ${PRINT} ${ALLPRINT}
 
+clist: ${ALLC}
+       @for i in ${ALLC} ; \
+               do (echo ${DIRPATH}$$i); done
+
+hclist:        ${ALLHC}
+       @for i in ${ALLHC} ; \
+               do (echo ${DIRPATH}$$i); done
 
 sourcelist:    ${ALLSOURCE}
        @for i in ${ALLSOURCE}; \
 
 sourcelist:    ${ALLSOURCE}
        @for i in ${ALLSOURCE}; \
-               do (echo ${DIRPATH}/$$i); done
+               do (echo ${DIRPATH}$$i); done
+
+astosc.OUT:    ../ctlr/function.h ../ctlr/hostctlr.h ../ctlr/$(KBD)
+       (cd ${.CURDIR}/../tools; make mkastosc )
+       -rm $@ astosc.out
+       ../tools/mkastosc ${.CURDIR}/../ctlr/hostctlr.h \
+               ${.CURDIR}/../ctlr/function.h < \
+                               ${.CURDIR}/../ctlr/$(KBD) > $@
+       ln $@ astosc.out
+
+asc_disp.out:  ebc_disp.o
+       (cd ${.CURDIR}/../tools; make mkastods )
+       -rm $@
+       ../tools/mkastods > $@
+
+disp_asc.OUT:  ebc_disp.o
+       (cd ${.CURDIR}/../tools; make mkdstoas )
+       -rm $@ disp_asc.out
+       ../tools/mkdstoas > $@
+       ln $@ disp_asc.out
 
 depend:
        grep '^#include' ${ALLC} | grep -v '<' | \
        sed -e 's/:[^"]*"\([^"]*\)".*/: \1/' \
 
 depend:
        grep '^#include' ${ALLC} | grep -v '<' | \
        sed -e 's/:[^"]*"\([^"]*\)".*/: \1/' \
-           -e 's/\.c/.o/' | \
+           -e 's/\.c/$.o/' | \
        awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \
                else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
                       else rec = rec " " $$2 } } \
        awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \
                else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
                       else rec = rec " " $$2 } } \
@@ -50,12 +118,17 @@ depend:
        echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep
        echo '$$r makedep' >>eddep
        echo 'w' >>eddep
        echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep
        echo '$$r makedep' >>eddep
        echo 'w' >>eddep
+       -rm -f makefile.bak
        cp makefile makefile.bak
        ed - makefile < eddep
        cp makefile makefile.bak
        ed - makefile < eddep
-       rm eddep makedep
+       -rm eddep makedep
 
 # DO NOT DELETE THIS LINE
 
 
 # DO NOT DELETE THIS LINE
 
-apilib.o: ../api/api.h apilib.h
-api_bsd.o: ../api/api.h api_exch.h
-api_exch.o: api_exch.h
+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
+asc_ebc.o: asc_ebc.h
+astosc.o: ../general/general.h ../ctlr/function.h astosc.h astosc.OUT
+dctype.o: dctype.h
+disp_asc.o: disp_asc.h asc_disp.out disp_asc.OUT