1# msdos versus unix defines 2O = .o 3#PC_O = .obj 4 5X = 6#PC_X = .exe 7 8L = 9#PC_L = -link 10 11CC = cc 12#PC_CC = cl 13 14MV = mv 15#PC_MV = rename 16 17RM = rm -f 18#PC_RM= erase 19 20LINT_ARGS = 21#PC_LINT_ARGS = -DLINT_ARGS 22 23DEBUG_FLAGS = -g 24#PC_DEBUG_FLAGS = -Zi -Od 25 26AR = ar 27AR1 = cr 28AR2 = 29AR3 = 30#PC_AR = lib 31#PC_AR1 = 32#PC_AR2 = + 33#PC_AR3 = ";" 34 35RANLIB = ranlib 36#PC_RANLIB = echo "Done with " 37 38CFLAGS = ${DEBUG_FLAGS} 39 40PRINT = lpr -p 41 42KBD = 3270pc.kbd 43KBD = unix.kbd 44 45ALLC = apilib.c api_bsd.c api_exch.c asc_ebc.c astosc.c dctype.c \ 46 disp_asc.c ebc_disp.c 47 48ALLH = apilib.h api_exch.h asc_ebc.h astosc.h disp_asc.h dctype.h ebc_disp.h 49 50ALLPRINT = ${ALLH} ${ALLC} 51 52ALLSOURCE = ${ALLPRINT} makefile makefile.mak 53 54ALLO = apilib$O api_bsd$O api_exch$O astosc$O asc_ebc$O dctype$O \ 55 disp_asc$O ebc_disp$O 56 57.c.obj: 58 ${CC} ${CFLAGS} -c $< 59 60apilib.a: ${ALLO} 61 ${RM} $@ 62 for i in ${ALLO}; do (${AR} ${AR1} $@ ${AR2} $$i${AR3}); done 63 ${RANLIB} $@ 64 65.DEFAULT: 66 sccs get $< 67 68clean: 69 for i in ${ALLO} errs apilib.a makefile.bak \ 70 disp_out asc_disp.out astosc.out disp_asc.out \ 71 test* test$O t1* t1$O t2* t2$O; \ 72 do (${RM} $$i); done 73 74sccsclean: 75 -sccs clean 76 -sccs get makefile 77 78action: 79 ${ACTION} 80 81test: apilib.a test$O 82 ${CC} ${CFLAGS} -o $@ test$O apilib.a 83 84t1: apilib.a t1$O 85 ${CC} ${CFLAGS} -o $@ t1$O apilib.a 86 87t2: apilib.a t2$O 88 ${CC} ${CFLAGS} -o $@ t2$O apilib.a 89 90print: 91 ${PRINT} ${ALLPRINT} 92 93 94sourcelist: ${ALLSOURCE} 95 @for i in ${ALLSOURCE}; \ 96 do (echo ${DIRPATH}$$i); done 97 98astosc.out: ../ctlr/function.h ../ctlr/hostctlr.h ../ctlr/$(KBD) 99 (cd ../tools; make mkastosc$X ) 100 ${RM} $@ 101 ../tools/mkastosc < ../ctlr/$(KBD) > $@ 102 103asc_disp.out: ebc_disp$O 104 (cd ../tools; make mkastods$X ) 105 ${RM} $@ 106 ../tools/mkastods > $@ 107 108disp_asc.out: ebc_disp$O 109 (cd ../tools; make mkdstoas$X ) 110 ${RM} $@ 111 ../tools/mkdstoas > $@ 112 113depend: 114 grep '^#include' ${ALLC} | grep -v '<' | \ 115 sed -e 's/:[^"]*"\([^"]*\)".*/: \1/' \ 116 -e 's/\.c/$$O/' | \ 117 awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \ 118 else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \ 119 else rec = rec " " $$2 } } \ 120 END { print rec } ' > makedep 121 echo '$$r makedep' >>eddep 122 echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep 123 echo '$$r makedep' >>eddep 124 echo 'w' >>eddep 125 -rm -f makefile.bak 126 cp makefile makefile.bak 127 ed - makefile < eddep 128 rm eddep makedep 129 130# DO NOT DELETE THIS LINE 131 132apilib$O: ../ctlr/api.h apilib.h 133api_bsd$O: ../ctlr/api.h api_exch.h 134api_exch$O: ../general/general.h api_exch.h 135asc_ebc$O: asc_ebc.h 136astosc$O: ../general/general.h ../ctlr/function.h astosc.h astosc.out 137dctype$O: dctype.h 138disp_asc$O: disp_asc.h asc_disp.out disp_asc.out 139