BSD 4_3_Reno release
[unix-history] / usr / src / usr.bin / tn3270 / api / makefile
index 5ab64a1..4e30b96 100644 (file)
 # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
 # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 #
 # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
 # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 #
-#      @(#)makefile    4.1 (Berkeley) %G%
-# msdos versus unix defines
-O      = .o
-#PC_O  = .obj
-
-X      =
-#PC_X  = .exe
-
-L      =
-#PC_L  = -link
-
-CC     = cc
-#PC_CC = cl
-
-MV     = mv
-#PC_MV = rename
-
-RM     = rm -f
-#PC_RM= erase
-
-LINT_ARGS =
-#PC_LINT_ARGS = -DLINT_ARGS
-
+#      @(#)makefile    4.3 (Berkeley) 6/21/90
+#
 DEBUG_FLAGS = -g
 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 "
-
-CFLAGS = ${DEBUG_FLAGS}
+CFLAGS = -I obj ${DEBUG_FLAGS}
 
 PRINT = lpr -p
 
 
 PRINT = lpr -p
 
@@ -70,25 +36,25 @@ ALLPRINT =  ${ALLHC}
 
 ALLSOURCE = ${ALLPRINT} makefile makefile.mak
 
 
 ALLSOURCE = ${ALLPRINT} makefile makefile.mak
 
-ALLO = apilib$O api_bsd$O api_exch$O astosc$O asc_ebc$O dctype$O \
-               disp_asc$O ebc_disp$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 $<
+#.c.obj:
+#      ${CC} ${CFLAGS} -c $<
 
 apilib.a: ${ALLO}
 
 apilib.a: ${ALLO}
-       ${RM} $@
-       for i in ${ALLO}; do (${AR} ${AR1} $@ ${AR2} $$i${AR3}); done
+       -rm $@
+       ${AR} ${ARFLAGS} $@ ${ALLO}
        ${RANLIB} $@
 
 .DEFAULT:
        sccs get $<
 
 clean:
        ${RANLIB} $@
 
 .DEFAULT:
        sccs get $<
 
 clean:
-       for i in ${ALLO} errs apilib.a makefile.bak \
+       -rm ${ALLO} errs apilib.a makefile.bak \
                disp_out asc_disp.out astosc.out disp_asc.out \
                disp_out asc_disp.out astosc.out disp_asc.out \
-               test* test$O t1* t1$O t2* t2$O; \
-                       do (${RM} $$i); done
+               astosc.OUT disp_asc.OUT \
+               test* test.o t1* t1.o t2* t2.o
 
 sccsclean:
        -sccs clean
 
 sccsclean:
        -sccs clean
@@ -97,14 +63,14 @@ sccsclean:
 action:
        ${ACTION}
 
 action:
        ${ACTION}
 
-test:  apilib.a test$O
-       ${CC} ${CFLAGS} -o $@ test$O apilib.a
+test:  apilib.a test.o
+       ${CC} ${CFLAGS} -o $@ test.o apilib.a
 
 
-t1:    apilib.a t1$O
-       ${CC} ${CFLAGS} -o $@ t1$O apilib.a
+t1:    apilib.a t1.o
+       ${CC} ${CFLAGS} -o $@ t1.o apilib.a
 
 
-t2:    apilib.a t2$O
-       ${CC} ${CFLAGS} -o $@ t2$O apilib.a
+t2:    apilib.a t2.o
+       ${CC} ${CFLAGS} -o $@ t2.o apilib.a
 
 print:
        ${PRINT} ${ALLPRINT}
 
 print:
        ${PRINT} ${ALLPRINT}
@@ -121,25 +87,29 @@ sourcelist:        ${ALLSOURCE}
        @for i in ${ALLSOURCE}; \
                do (echo ${DIRPATH}$$i); done
 
        @for i in ${ALLSOURCE}; \
                do (echo ${DIRPATH}$$i); done
 
-astosc.out:    ../ctlr/function.h ../ctlr/hostctlr.h ../ctlr/$(KBD)
-       (cd ../tools; make mkastosc$X )
-       ${RM} $@
-       ../tools/mkastosc < ../ctlr/$(KBD) > $@
-
-asc_disp.out:  ebc_disp$O
-       (cd ../tools; make mkastods$X )
-       ${RM} $@
+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 > $@
 
        ../tools/mkastods > $@
 
-disp_asc.out:  ebc_disp$O
-       (cd ../tools; make mkdstoas$X )
-       ${RM} $@
+disp_asc.OUT:  ebc_disp.o
+       (cd ${.CURDIR}/../tools; make mkdstoas )
+       -rm $@ disp_asc.out
        ../tools/mkdstoas > $@
        ../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 } } \
@@ -151,14 +121,14 @@ depend:
        -rm -f makefile.bak
        cp makefile makefile.bak
        ed - makefile < eddep
        -rm -f makefile.bak
        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: ../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
+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