Install sccs headers and copyright notices.
[unix-history] / usr / src / usr.bin / tn3270 / ascii / makefile
index f8cfcfd..191db0c 100644 (file)
@@ -1,12 +1,48 @@
+# msdos versus unix defines
+O      = .o
+#PC_O  = .obj
+
+X      =
+#PC_X  = .exe
+
+L      =
+#PC_L  = -link
+
 CC     = cc
 CC     = cc
+#PC_CC = cl
+
+MV     = mv
+#PC_MV = rename
+
+RM     = rm -f
+#PC_RM= erase
+
+LINT_ARGS =
+#PC_LINT_ARGS = -DLINT_ARGS
+
+DEBUG_FLAGS = -g
+#PC_DEBUG_FLAGS = -Zi -Od
+
+AR     = ar
+AR1    = cr
+AR2    =
+AR3    =
+#PC_AR = lib
+#PC_AR1        =
+#PC_AR2        = +
+#PC_AR3        = ";"
+
+RANLIB = ranlib
+#PC_RANLIB = echo "Done with "
+
 PRINT  = print
 
 PRINT  = print
 
-DEFINES = 
+DEFINES = ${LINT_ARGS}
 
 INCLUDES = -I.
 
 OPTIMIZE = -O
 
 INCLUDES = -I.
 
 OPTIMIZE = -O
-OPTIMIZE = -g
+OPTIMIZE = ${DEBUG_FLAGS}
 
 CFLAGS = $(OPTIMIZE) $(INCLUDES) $(DEFINES)
 
 
 CFLAGS = $(OPTIMIZE) $(INCLUDES) $(DEFINES)
 
@@ -18,27 +54,42 @@ KBD = unix.kbd
 
 
 # The source files...
 
 
 # The source files...
-ALLH = ascebc.h disp_asc.h state.h
+ALLH = map3270.ext state.h termin.ext
 
 
-ALLC = map3270.c termin.c asctab.c ebctab.c
+ALLC = map3270.c mset.c termin.c
 
 
-ALLO   = map3270.o termin.o asctab.o ebctab.o disp_asc.o
+# We don't include mset$O here...
+ALLO   = map3270$O termin$O
 
 
-M4FILE = termcodes.m4
+ALLPRINT = default.map ${ALLH} ${ALLC}
+
+ALLSOURCE =    ${ALLPRINT} makefile makefile.mak
 
 .s.o:
        /lib/cpp -E $< | as -o $@
 
 
 .s.o:
        /lib/cpp -E $< | as -o $@
 
-ascii.lib:     $(ALLO)
-       ar cr ascii.lib $(ALLO)
-       ranlib ascii.lib
+.c.obj:
+       ${CC} ${CFLAGS} -c $<
+
+asciilib.a:    $(ALLO)
+       ${RM} $@
+       for i in ${ALLO}; do (${AR} ${AR1} $@ ${AR2} $$i${AR3}); done
+       ${RANLIB} $@
 
 clean:
 
 clean:
-       rm -f $(ALLO) m4.out astosc.out disp_asc.out asc_disp.out \
-                               errs makefile.bak ascii.lib
+       for i in $(ALLO) errs makefile.bak asciilib.a; \
+               do (${RM} $$i); done
+
+sccsclean:
+       -sccs clean
+       -sccs get makefile
+
+sourcelist:    ${ALLSOURCE}
+       @for i in ${ALLSOURCE}; \
+               do (echo ${DIRPATH}$$i); done
 
 print:
 
 print:
-       ${PRINT} ${ALLH} ${ALLC}
+       ${PRINT} ${ALLPRINT}
 
 tags:  ${ALLC} ${ALLH}
        ctags -t ${ALLC} ${ALLH}
 
 tags:  ${ALLC} ${ALLH}
        ctags -t ${ALLC} ${ALLH}
@@ -52,38 +103,10 @@ lint:
 .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) > $@
-
-asc_disp.out:  ../ctlr/ebc_disp.o
-       (cd ../tools; make mkastods $(MFLAGS) )
-       -/bin/rm $@
-       ../tools/mkastods > $@
-
-disp_asc.out:  ../ctlr/ebc_disp.o
-       (cd ../tools; make mkdstoas $(MFLAGS) )
-       -/bin/rm $@
-       ../tools/mkdstoas > $@
-
-disp_asc.o:    disp_asc.h asc_disp.out disp_asc.out
-       -/bin/rm $@ 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/mv TMPfunc.o $@
-
-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/\.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 } } \
@@ -92,15 +115,16 @@ 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
        rm eddep makedep
 
 # DO NOT DELETE THIS LINE
 
        cp makefile makefile.bak
        ed - makefile < eddep
        rm eddep makedep
 
 # 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
+map3270$O: state.h ../general/globals.h map3270.ext default.map
+mset$O: ../ctlr/function.h state.h ../api/astosc.h ../general/globals.h
+mset$O: map3270.ext
+termin$O: ../general/general.h ../ctlr/function.h ../ctlr/inbound.ext
+termin$O: ../ctlr/outbound.ext ../telnet.ext termin.ext ../api/astosc.h state.h
+termin$O: ../general/globals.h