mkmake, etc.
[unix-history] / usr / src / usr.bin / tn3270 / sys_curses / makefile
index 389bb7a..3c40447 100644 (file)
@@ -1,12 +1,41 @@
+# msdos versus unix defines
+O      = .o
+PC_O   = .obj
+
+X      =
+PC_X   = .exe
+
 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
+C      =
+PC_AR  = lib
+PC_C   = +
+
+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)
 
@@ -17,18 +46,25 @@ ALLH = terminal.h termout.ext
 
 ALLC = system.c termout.c
 
 
 ALLC = system.c termout.c
 
-ALLO = system.o termout.o
+ALLO = system$O termout$O
 
 ALLPRINT =     ${ALLH} ${ALLC}
 
 ALLSOURCE =    ${ALLPRINT} makefile
 
 
 ALLPRINT =     ${ALLH} ${ALLC}
 
 ALLSOURCE =    ${ALLPRINT} makefile
 
+.c.obj:
+       ${CC} ${CFLAGS} -c $<
+
 syslib.a:      $(ALLO)
 syslib.a:      $(ALLO)
-       ar cr syslib.a $(ALLO)
-       ranlib syslib.a
+       ${RM} $@
+       for i in ${ALLO}; do (${AR} cr $@ $C $$i); done
+       ${RANLIB} $@
 
 clean:
 
 clean:
-       rm -f $(ALLO) errs makefile.bak syslib.a
+       for i in $(ALLO) errs makefile.bak syslib.a; \
+               do (${RM} $$i); done
+
+sccsclean:
        -sccs clean
        -sccs get makefile
 
        -sccs clean
        -sccs get makefile
 
@@ -56,7 +92,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 } } \
@@ -65,15 +101,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
 
-system.o: ../general/general.h ../api/api.h ../apilib/api_exch.h
-system.o: ../general/globals.h
-termout.o: ../general/general.h terminal.h ../telnet.ext ../apilib/disp_asc.h
-termout.o: ../ctlr/hostctlr.h ../ctlr/inbound.ext ../ctlr/oia.h
-termout.o: ../ctlr/options.ext ../ctlr/outbound.ext ../ctlr/screen.h
-termout.o: ../ascii/map3270.ext ../general/globals.h
+system$O: ../general/general.h ../api/api.h ../apilib/api_exch.h
+system$O: ../general/globals.h
+termout$O: ../general/general.h terminal.h ../telnet.ext ../apilib/disp_asc.h
+termout$O: ../ctlr/hostctlr.h ../ctlr/inbound.ext ../ctlr/oia.h
+termout$O: ../ctlr/options.ext ../ctlr/outbound.ext ../ctlr/screen.h
+termout$O: ../ascii/map3270.ext ../general/globals.h