New directory structure.
[unix-history] / usr / src / usr.bin / tn3270 / ascii / makefile
index 67b7339..1aa4a20 100644 (file)
@@ -1,6 +1,8 @@
 CC     = cc
 PRINT  = print
 
 CC     = cc
 PRINT  = print
 
+DEFINES = 
+
 INCLUDES = -I.
 
 OPTIMIZE = -O
 INCLUDES = -I.
 
 OPTIMIZE = -O
@@ -11,26 +13,33 @@ CFLAGS      = $(OPTIMIZE) $(INCLUDES) $(DEFINES)
 # Lint flags
 LINTFLAGS      = -hbxaz
 
 # Lint flags
 LINTFLAGS      = -hbxaz
 
+KBD    = 3270pc.kbd
+KBD    = unix.kbd
+
+
+
+
 # The source files...
 # The source files...
-ALLH = ascebc.h
+ALLH = state.h ascebc.h
+
+ALLC = map3270.c termin.c asctab.c ebctab.c
 
 
-ALLC = asctab.c ebctab.c
+ALLO   = map3270.o termin.o asctab.o ebctab.o
 
 
-ALLO   = asctab.o ebctab.o
+M4FILE = termcodes.m4
 
 .s.o:
        /lib/cpp -E $< | as -o $@
 
 
 .s.o:
        /lib/cpp -E $< | as -o $@
 
-asciilib:      ${ALLO}
-       ar cr asciilib ${ALLO}
-       ranlib asciilib
+ascii.lib:     $(ALLO)
+       ar cr ascii.lib $(ALLO)
+       ranlib ascii.lib
 
 clean:
 
 clean:
-       rm -f $(ALLO) errs makefile.bak asciilib
+       rm -f $(ALLO) m4.out astosc.out errs makefile.bak ascii.lib
 
 print:
 
 print:
-       ${PRINT} ${ALLH}
-       ${PRINT} ${ALLC}
+       ${PRINT} ${ALLH} ${ALLC}
 
 tags:  ${ALLC} ${ALLH}
        ctags -t ${ALLC} ${ALLH}
 
 tags:  ${ALLC} ${ALLH}
        ctags -t ${ALLC} ${ALLH}
@@ -39,16 +48,25 @@ action:
        ${ACTION}
 
 lint:
        ${ACTION}
 
 lint:
-       lint ${LINTFLAGS} ${INCLUDES} ${DEFINES} -DTN3270 $(ALLC)
+       lint ${LINTFLAGS} ${INCLUDES} ${DEFINES} ${ALLC}
 
 .DEFAULT:
        sccs get $<
 
 
 .DEFAULT:
        sccs get $<
 
+astosc.out:    ../ctlr/function.h ../ctlr/hostctlr.h ../ctlr/$(KBD) m4.out
+       (cd ../tools; make mkastosc $(MFLAGS) )
+       -/bin/rm $@
+       ../tools/mkastosc < ../ctlr/$(KBD) > $@
+
+m4.out:                termcodes.m4
+       /bin/rm -f m4.out
+       m4 termcodes.m4 > m4.out
+       /bin/chmod 444 m4.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,../[a-zA-Z]*/,,' | \
+           -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 } } \
@@ -63,5 +81,9 @@ depend:
 
 # DO NOT DELETE THIS LINE
 
 
 # DO NOT DELETE THIS LINE
 
+map3270.o: m4.out state.h ../general/globals.h map3270.ext default.map
+termin.o: ../general/general.h m4.out state.h ../general/globals.h
+termin.o: ../ctlr/function.h ../ctlr/inbound.ext ../ctlr/outbound.ext
+termin.o: ../telnet.ext termin.ext astosc.out
 asctab.o: ascebc.h
 ebctab.o: ascebc.h
 asctab.o: ascebc.h
 ebctab.o: ascebc.h