X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/c90abdec9ed0aad28dd6871b2041806ec5cd0a20..c051c379e41918d23be5a26d46dfa2537a2a50e2:/usr/src/usr.bin/tn3270/api/makefile diff --git a/usr/src/usr.bin/tn3270/api/makefile b/usr/src/usr.bin/tn3270/api/makefile index 738fede7ba..f8e093e2ce 100644 --- a/usr/src/usr.bin/tn3270/api/makefile +++ b/usr/src/usr.bin/tn3270/api/makefile @@ -1,34 +1,91 @@ -CFLAGS = -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 + +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} + PRINT = lpr -p -ALLC = apilib.c api_bsd.c api_exch.c -ALLH = apilib.h api_exch.h +KBD = 3270pc.kbd +KBD = unix.kbd + +ALLC = apilib.c api_bsd.c api_exch.c asc_ebc.c astosc.c dctype.c \ + disp_asc.c ebc_disp.c + +ALLH = apilib.h api_exch.h asc_ebc.h astosc.h disp_asc.h dctype.h ebc_disp.h ALLPRINT = ${ALLH} ${ALLC} ALLSOURCE = ${ALLPRINT} makefile makefile.mak -ALLO = apilib.o api_bsd.o api_exch.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 $< + +apiliblib.a: ${ALLO} + ${RM} $@ + for i in ${ALLO}; do (${AR} ${AR1} $@ ${AR2} $$i${AR3}); done + ${RANLIB} $@ -apilib.a: ${ALLO} - @-/bin/rm $@ - ar cr $@ ${ALLO} - ranlib $@ +.DEFAULT: + sccs get $< clean: - -/bin/rm ${ALLO} errs apilib.a + for i in ${ALLO} errs apiliblib.a makefile.bak \ + disp_out asc_disp.out astosc.out disp_asc.out \ + test* test$O t1* t1$O t2* t2$O; \ + do (${RM} $$i); done + +sccsclean: + -sccs clean + -sccs get makefile action: ${ACTION} -test: apilib.a test.o - ${CC} ${CFLAGS} -o $@ test.o apilib.a +test: apiliblib.a test$O + ${CC} ${CFLAGS} -o $@ test$O apiliblib.a -t1: apilib.a t1.o - ${CC} ${CFLAGS} -o $@ t1.o apilib.a +t1: apiliblib.a t1$O + ${CC} ${CFLAGS} -o $@ t1$O apiliblib.a -t2: apilib.a t2.o - ${CC} ${CFLAGS} -o $@ t2.o apilib.a +t2: apiliblib.a t2$O + ${CC} ${CFLAGS} -o $@ t2$O apiliblib.a print: ${PRINT} ${ALLPRINT} @@ -36,12 +93,27 @@ print: sourcelist: ${ALLSOURCE} @for i in ${ALLSOURCE}; \ - do (echo ${DIRPATH}/$$i); done + do (echo ${DIRPATH}$$i); done + +astosc.out: ../ctlr/function.h ../ctlr/hostctlr.h ../ctlr/$(KBD) + (cd ../tools; make mkastosc ) + ${RM} $@ + ../tools/mkastosc < ../ctlr/$(KBD) > $@ + +asc_disp.out: ebc_disp$O + (cd ../tools; make mkastods ) + ${RM} $@ + ../tools/mkastods > $@ + +disp_asc.out: ebc_disp$O + (cd ../tools; make mkdstoas ) + ${RM} $@ + ../tools/mkdstoas > $@ 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 } } \ @@ -50,12 +122,17 @@ 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 -apilib.o: ../api/api.h apilib.h -api_bsd.o: ../api/api.h api_exch.h -api_exch.o: api_exch.h +apilib$O: ../api/api.h apilib.h +api_bsd$O: ../api/api.h api_exch.h +api_exch$O: 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