New directories, new cleanup.
authorGregory Minshall <minshall@ucbvax.Berkeley.EDU>
Sat, 20 Jun 1987 06:04:01 +0000 (22:04 -0800)
committerGregory Minshall <minshall@ucbvax.Berkeley.EDU>
Sat, 20 Jun 1987 06:04:01 +0000 (22:04 -0800)
SCCS-vsn: usr.bin/tn3270/makefile 1.16
SCCS-vsn: usr.bin/tn3270/api/makefile 1.7

usr/src/usr.bin/tn3270/api/makefile
usr/src/usr.bin/tn3270/makefile

index f3515ff..6d081d0 100644 (file)
@@ -1,26 +1,35 @@
 CFLAGS = -g
 CFLAGS = -g
+
 PRINT = lpr -p
 
 PRINT = lpr -p
 
-ALLC = apilib.c api_bsd.c api_exch.c tnrecv.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 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}
 
 ALLSOURCE = ${ALLPRINT} makefile makefile.mak
 
 
 ALLPRINT = ${ALLH} ${ALLC}
 
 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 disp_asc.o \
+               dctype.o ebc_disp.o
 
 apilib.a: ${ALLO}
 
 apilib.a: ${ALLO}
-       @-/bin/rm $@
+       @-/bin/rm -f $@
        ar cr $@ ${ALLO}
        ranlib $@
 
        ar cr $@ ${ALLO}
        ranlib $@
 
-tnrecv:        tnrecv.o apilib.a ../ascii/disp_asc.o ../ascii/astosc.o
-       ${CC} ${CFLAGS} -o $@ tnrecv.o apilib.a \
-                               ../ascii/disp_asc.o ../ascii/astosc.o
+.DEFAULT:
+       sccs get $<
 
 clean:
 
 clean:
-       -/bin/rm ${ALLO} errs apilib.a
+       -/bin/rm -f ${ALLO} errs apilib.a makefile.bak \
+               disp_out asc_disp.out astosc.out disp_asc.out \
+               test* test.o t1* t1.o t2* t2.o
+       -sccs clean
+       -sccs get makefile
 
 action:
        ${ACTION}
 
 action:
        ${ACTION}
@@ -40,7 +49,31 @@ print:
 
 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 ../tools; make mkastosc $(MFLAGS) )
+       -/bin/rm -f $@
+       ../tools/mkastosc < ../ctlr/$(KBD) > $@
+
+asc_disp.out:  ebc_disp.o
+       (cd ../tools; make mkastods $(MFLAGS) )
+       -/bin/rm -f $@
+       ../tools/mkastods > $@
+
+disp_asc.out:  ebc_disp.o
+       (cd ../tools; make mkdstoas $(MFLAGS) )
+       -/bin/rm -f $@
+       ../tools/mkdstoas > $@
+
+disp_asc.o:    disp_asc.h asc_disp.out disp_asc.out
+       -/bin/rm -f $@ TMPfunc.c
+       /bin/echo \#include \"disp_asc.h\" > TMPfunc.c
+       /bin/echo \#include \"asc_disp.out\" >> TMPfunc.c
+       /bin/echo \#include \"disp_asc.out\" >> TMPfunc.c
+       $(CC) $(CFLAGS) -c TMPfunc.c
+       -/bin/rm -f TMPfunc.c
+       -/bin/mv TMPfunc.o $@
 
 depend:
        grep '^#include' ${ALLC} | grep -v '<' | \
 
 depend:
        grep '^#include' ${ALLC} | grep -v '<' | \
@@ -63,6 +96,6 @@ depend:
 apilib.o: ../api/api.h apilib.h
 api_bsd.o: ../api/api.h api_exch.h
 api_exch.o: api_exch.h
 apilib.o: ../api/api.h apilib.h
 api_bsd.o: ../api/api.h api_exch.h
 api_exch.o: api_exch.h
-tnrecv.o: apilib.h tncomp.h ../api/api.h ../ctlr/function.h ../ctlr/hostctlr.h
-tnrecv.o: ../ctlr/oia.h ../ctlr/screen.h ../ascii/disp_asc.h ../ascii/astosc.h
-tnrecv.o: ../general/general.h
+asc_ebc.o: asc_ebc.h
+astosc.o: ../general/general.h ../ctlr/function.h astosc.h astosc.out
+dctype.o: dctype.h
index e597b7d..fa7174b 100644 (file)
@@ -59,7 +59,6 @@ CFLAGS        = $(OPTIMIZE) $(INCLUDES) $(DEFINES)
 LINTFLAGS      = -hbxaz
 # How to install the bloody thing...
 
 LINTFLAGS      = -hbxaz
 # How to install the bloody thing...
 
-DIRPATH=.
 DESTDIR=
 
 BINDIR         = $(DESTDIR)/usr/ucb
 DESTDIR=
 
 BINDIR         = $(DESTDIR)/usr/ucb
@@ -92,15 +91,14 @@ SUBDIR =    api apilib ascii ctlr general sys
 # The following are directories we don't do regular make's in, but
 # we do make everywhere, print, and sourcelist in.
 
 # The following are directories we don't do regular make's in, but
 # we do make everywhere, print, and sourcelist in.
 
-EXTRADIR =     arpa sys_dos tools
+EXTRADIR =     arpa sys_dos tools utilities
 
 # The libraries we use.  The order here is important.
 
 # The libraries we use.  The order here is important.
-# ctlr.lib and sys.lib should come first, then api.lib
+# ctlrlib.a and syslib.a should come first, then apilib.a
 # then the rest.
 # then the rest.
-SUBLIB =       ctlr/ctlr.lib sys/sys.lib \
-               api/api.lib \
-               ascii/ascii.lib general/general.lib
-
+SUBLIB =       ctlr/ctlrlib.a sys/syslib.a \
+               api/apilib.a \
+               ascii/asciilib.a general/generallib.a
 
 .s.o:
        /lib/cpp -E $< | as -o $@
 
 .s.o:
        /lib/cpp -E $< | as -o $@
@@ -115,8 +113,8 @@ tn3270:     telnet.o ${SUBLIB}
        ${CC} ${CFLAGS} -o tn3270 telnet.o \
                ${SUBLIB} apilib/apilib.a $(LIBCURSES) $(LIBTERM)
 
        ${CC} ${CFLAGS} -o tn3270 telnet.o \
                ${SUBLIB} apilib/apilib.a $(LIBCURSES) $(LIBTERM)
 
-mset:  mset.o ascii/map3270.o ascii/astosc.o
-       ${CC} ${CFLAGS} -o mset mset.o ascii/map3270.o ascii/astosc.o
+mset:  mset.o ascii/map3270.o
+       ${CC} ${CFLAGS} -o mset mset.o ascii/map3270.o apilib/apilib.a
 
 telnet.o:      $(TNMAIN)
        $(CC) $(CFLAGS) -DTN3270 -c $(TNMAIN)
 
 telnet.o:      $(TNMAIN)
        $(CC) $(CFLAGS) -DTN3270 -c $(TNMAIN)
@@ -144,9 +142,9 @@ everywhere: action
 
 clean:
        rm -f $(ALLO) mset tn3270 errs makefile.bak
 
 clean:
        rm -f $(ALLO) mset tn3270 errs makefile.bak
+       -sccs clean
+       -sccs get makefile
        for i in ${SUBDIR} ${EXTRADIR}; do (cd $$i; make ${MFLAGS} clean); done
        for i in ${SUBDIR} ${EXTRADIR}; do (cd $$i; make ${MFLAGS} clean); done
-       rm -f t1 tmp/*.o
-       -rmdir tmp
 
 print:
        ${PRINT} ${ALLPRINT}
 
 print:
        ${PRINT} ${ALLPRINT}
@@ -158,9 +156,9 @@ tags:       ${ALLC} ${ALLH}
 
 sourcelist:    ${ALLSOURCE}
        @for i in ${ALLSOURCE}; \
 
 sourcelist:    ${ALLSOURCE}
        @for i in ${ALLSOURCE}; \
-               do (echo ${DIRPATH}/$$i); done
+               do (echo ${DIRPATH}$$i); done
        @for i in ${SUBDIR} ${EXTRADIR}; \
        @for i in ${SUBDIR} ${EXTRADIR}; \
-               do (cd $$i; make ${MFLAGS} "DIRPATH=${DIRPATH}/$$i" \
+               do (cd $$i; make ${MFLAGS} "DIRPATH=${DIRPATH}$$i/" \
                                                            sourcelist); done
 
 lint:
                                                            sourcelist); done
 
 lint: