X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/98607a8961688fd170bdc157e1d44274c728c876..dd6c8c3ebc3616ffb417d6430e8b4af17f8a704b:/usr/src/usr.bin/tn3270/ctlr/makefile diff --git a/usr/src/usr.bin/tn3270/ctlr/makefile b/usr/src/usr.bin/tn3270/ctlr/makefile index a7b932d69d..76431fd740 100644 --- a/usr/src/usr.bin/tn3270/ctlr/makefile +++ b/usr/src/usr.bin/tn3270/ctlr/makefile @@ -1,80 +1,115 @@ +# 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 -# How to install the bloody thing... -# The source files... -ALLH = dctype.h ebc_disp.h hostctlr.h kbdctlr.h options.h screen.h scrnctlr.h - -MOSTC = dctype.c ebc_disp.c genbsubs.c inbound.c options.c outbound.c +# Which keyboard are we emulating. +KBD = 3180.kbd +KBD = 3270pc.kbd +KBD = unix.kbd -# -# In a vax environment, we use vaxbsubs.s, which gives us a fair amount -# of increased performance. We have provided genbsubs.c, which perform -# (more or less) the same function. -SUBS = vaxbsubs.s -SUBS = genbsubs.c - -SUBSO = vaxbsubs.o -SUBSO = genbsubs.o +# The source files... +ALLH = function.h hostctlr.h inbound.ext oia.h \ + options.ext options.h outbound.ext screen.h scrnctlr.h -ALLS = vaxbsubs.s -ALLS = +ALLC = inbound.c oia.c options.c outbound.c -ALLC = ${MOSTC} ${SUBS} -ALLC = ${MOSTC} +ALLO = inbound$O oia$O options$O outbound$O -MOSTO = dctype.o ebc_disp.o genbsubs.o inbound.o options.o outbound.o +ALLPRINT = 3180.kbd 3270pc.kbd unix.kbd ${ALLH} ${ALLC} -ALLO = $(MOSTO) +ALLSOURCE = ${ALLPRINT} makefile makefile.mak .s.o: /lib/cpp -E $< | as -o $@ -ctlrlib: ${ALLO} - ar cr ctlrlib ${ALLO} - ranlib ctlrlib +.c.obj: + ${CC} ${CFLAGS} -c $< + +ctlrlib.a: ${ALLO} + ${RM} $@ + for i in ${ALLO}; do (${AR} cr $@ $C $$i); done + ${RANLIB} $@ clean: - rm -f $(ALLO) mset tn3270 prt3270 m4.out errs makefile.bak ctlrlib - rm -f 3270pc.out + for i in $(ALLO) mset tn3270 prt3270 m4.out errs \ + makefile.bak ctlrlib.a kbd.out TMPfunc.out TMPfunc.c; \ + do (${RM} $$i); done + +sccsclean: + -sccs clean + -sccs get makefile + +sourcelist: ${ALLSOURCE} + @for i in ${ALLSOURCE}; \ + do (echo ${DIRPATH}$$i); done print: - ${PRINT} ${ALLH} ${M4FILE} default.map - ${PRINT} ${MOSTC} - ${PRINT} ${SUBS} ${MSMAIN} ${TNMAIN} ${PRT3270MAIN} + ${PRINT} ${ALLPRINT} tags: ${ALLC} ${ALLH} ctags -t ${ALLC} ${ALLH} +action: + ${ACTION} + lint: - lint ${LINTFLAGS} ${INCLUDES} ${DEFINES} -DTN3270 \ - ${TNMAIN} ${MOSTC} -lcurses - lint ${LINTFLAGS} ${INCLUDES} ${DEFINES} ${MSMAIN} map3270.c -lcurses + lint ${LINTFLAGS} ${INCLUDES} ${DEFINES} -DTN3270 ${ALLC} -lcurses .DEFAULT: sccs get $< -3270pc.out: 3270pc.kbd hostctlr.h - (cd ../tools; make mkhits $(MFLAGS) ) - -/bin/rm $@ - ../tools/mkhits < 3270pc.kbd > $@ +kbd.out: $(KBD) hostctlr.h + (cd ../tools; make mkhits ) + ${RM} $@ TMPfunc.out TMPfunc.c + /bin/echo \#include \"function.h\" > TMPfunc.c + $(CC) $(CFLAGS) -E TMPfunc.c > TMPfunc.out + ../tools/mkhits - ../ctlr/TMPfunc.out < $(KBD) > $@ + ${RM} TMPfunc.out TMPfunc.c 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 } } \ @@ -83,16 +118,18 @@ depend: 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 -dctype.o: dctype.h -inbound.o: ../general.h function.h hostctlr.h scrnctlr.h screen.h options.h -inbound.o: dctype.h ebc_disp.h ../system/globals.h inbound.ext outbound.ext -inbound.o: ../telnet.ext 3270pc.out -options.o: options.h ../system/globals.h options.ext -outbound.o: hostctlr.h screen.h ebc_disp.h ../system/globals.h options.ext -outbound.o: ../telnet.ext inbound.ext outbound.ext bsubs.ext +inbound$O: ../general/general.h function.h hostctlr.h oia.h scrnctlr.h screen.h +inbound$O: options.h ../apilib/dctype.h ../apilib/ebc_disp.h +inbound$O: ../general/globals.h inbound.ext outbound.ext ../telnet.ext kbd.out +oia$O: ../general/general.h oia.h ../general/globals.h +options$O: options.h ../general/globals.h options.ext +outbound$O: ../general/general.h hostctlr.h oia.h screen.h ../apilib/ebc_disp.h +outbound$O: ../general/globals.h options.ext ../telnet.ext inbound.ext +outbound$O: outbound.ext ../general/bsubs.ext