+# msdos versus unix defines
+O = .o
+PC_O = .obj
+
+X =
+PC_X = .exe
+
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
-DEFINES =
+DEFINES = ${LINT_ARGS}
INCLUDES = -I.
OPTIMIZE = -O
-OPTIMIZE = -g
+OPTIMIZE = ${DEBUG_FLAGS}
CFLAGS = $(OPTIMIZE) $(INCLUDES) $(DEFINES)
# Lint flags
LINTFLAGS = -hbxaz
-ALLC = termout.c system.c
+ALLH = spint.h termout.ext video.h
+
+ALLC = spintc.c system.c termout.c
+
+ALLASM = spintasm.asm
+
+ALLO = termout$O system$O
-ALLO = termout.o system.o
+ALLPRINT = ${ALLH} ${ALLASM} ${ALLC}
-ALLH =
+ALLSOURCE = ${ALLPRINT} makefile makefile.mak
+
+.c.obj:
+ ${CC} ${CFLAGS} -c $<
screenlib: $(ALLO)
- ar cr screenlib $(ALLO)
- ranlib screenlib
+ ${RM} $@
+ for i in ${ALLO}; do (${AR} cr $@ $C $$i); done
+ ${RANLIB} $@
clean:
- rm -f $(ALLO) errs makefile.bak screenlib
+ for i in $(ALLO) errs makefile.bak screenlib; \
+ do (${RM} $$i); done
+
+sccsclean:
+ -sccs clean
+ -sccs get makefile
+
+sourcelist: ${ALLSOURCE}
+ @for i in ${ALLSOURCE}; \
+ do (echo ${DIRPATH}$$i); done
print:
- ${PRINT} ${ALLC} ${ALLH}
+ ${PRINT} ${ALLPRINT}
tags: ${ALLC} ${ALLH}
ctags -t ${ALLC} ${ALLH}
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 } } \
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
-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
+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