BSD 4_3_Reno release
[unix-history] / usr / src / usr.bin / tn3270 / distribution / sys_dos / makefile
index 620a8cb..e8b1c93 100644 (file)
@@ -1,36 +1,97 @@
+#
+# 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.1 (Berkeley) 12/4/88
+#
+# 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)
 
 # Lint flags
 LINTFLAGS      = -hbxaz
 
 
 CFLAGS = $(OPTIMIZE) $(INCLUDES) $(DEFINES)
 
 # Lint flags
 LINTFLAGS      = -hbxaz
 
-ALLH = spint.h termout.ext video.h
+ALLH = spint.h video.h
 
 ALLC = spintc.c system.c termout.c
 
 
 ALLC = spintc.c system.c termout.c
 
-ALLASM =       spintasm.asm
+ALLASM =       spintasm.asm support.asm
 
 
-ALLO = termout.o system.o
+ALLO = spintasm$O spintc$O support$O system$O termout$O
 
 ALLPRINT =     ${ALLH} ${ALLASM} ${ALLC}
 
 ALLSOURCE =    ${ALLPRINT} makefile makefile.mak
 
 
 ALLPRINT =     ${ALLH} ${ALLASM} ${ALLC}
 
 ALLSOURCE =    ${ALLPRINT} makefile makefile.mak
 
-screenlib:     $(ALLO)
-       ar cr screenlib $(ALLO)
-       ranlib screenlib
+.c.obj:
+       ${CC} ${CFLAGS} -c $<
+
+syslib.a:      $(ALLO)
+       ${RM} $@
+       for i in ${ALLO}; do (${AR} ${AR1} $@ ${AR2} $$i${AR3}); done
+       ${RANLIB} $@
 
 clean:
 
 clean:
-       rm -f $(ALLO) errs makefile.bak screenlib
+       for i in $(ALLO) errs makefile.bak syslib.a; \
+               do (${RM} $$i); done
+
+sccsclean:
        -sccs clean
        -sccs get makefile
 
        -sccs clean
        -sccs get makefile
 
@@ -58,7 +119,7 @@ lint:
 depend:
        grep '^#include' ${ALLC} ${ALLH} | grep -v '<' | \
        sed -e 's/:[^"]*"\([^"]*\)".*/: \1/' \
 depend:
        grep '^#include' ${ALLC} ${ALLH} | 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 } } \
@@ -67,14 +128,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
 
-termout.o: ../general/general.h ../telnet.ext ../ascii/disp_asc.h
-termout.o: ../ascii/map3270.ext ../ctlr/hostctlr.h ../ctlr/inbound.ext
-termout.o: ../ctlr/oia.h ../ctlr/options.ext ../ctlr/outbound.ext
-termout.o: ../ctlr/screen.h ../general/globals.h video.h
-system.o: ../general/general.h ../api/api.h spint.h ../general/globals.h
+spintc$O: ../general/general.h spint.h
+system$O: ../general/general.h ../ctlr/api.h spint.h ../general/globals.h
+termout$O: ../general/general.h ../api/disp_asc.h
+termout$O: ../ctlr/hostctlr.h 
+termout$O: ../ctlr/oia.h
+termout$O: ../ctlr/screen.h ../general/globals.h video.h