1# 2# Copyright (c) 1988 Regents of the University of California. 3# All rights reserved. 4# 5# Redistribution and use in source and binary forms are permitted 6# provided that this notice is preserved and that due credit is given 7# to the University of California at Berkeley. The name of the University 8# may not be used to endorse or promote products derived from this 9# software without specific prior written permission. This software 10# is provided ``as is'' without express or implied warranty. 11# 12# @(#)makefile 3.3 (Berkeley) 05/15/88 13# 14# msdos versus unix defines 15O = .o 16#PC_O = .obj 17 18X = 19#PC_X = .exe 20 21L = 22#PC_L = -link 23 24CC = cc 25#PC_CC = cl 26 27MV = mv 28#PC_MV = rename 29 30RM = rm -f 31#PC_RM= erase 32 33LINT_ARGS = 34#PC_LINT_ARGS = -DLINT_ARGS 35 36DEBUG_FLAGS = -g 37#PC_DEBUG_FLAGS = -Zi -Od 38 39AR = ar 40AR1 = cr 41AR2 = 42AR3 = 43#PC_AR = lib 44#PC_AR1 = 45#PC_AR2 = + 46#PC_AR3 = ";" 47 48RANLIB = ranlib 49#PC_RANLIB = echo "Done with " 50 51CFLAGS = ${DEBUG_FLAGS} 52 53PRINT = lpr -p 54 55KBD = 3270pc.kbd 56KBD = unix.kbd 57 58ALLC = apilib.c api_bsd.c api_exch.c asc_ebc.c astosc.c dctype.c \ 59 disp_asc.c ebc_disp.c 60 61ALLH = apilib.h api_exch.h asc_ebc.h astosc.h disp_asc.h dctype.h ebc_disp.h 62 63 64ALLHC= ${ALLH} ${ALLC} 65ALLPRINT = ${ALLHC} 66 67ALLSOURCE = ${ALLPRINT} makefile makefile.mak 68 69ALLO = apilib$O api_bsd$O api_exch$O astosc$O asc_ebc$O dctype$O \ 70 disp_asc$O ebc_disp$O 71 72.c.obj: 73 ${CC} ${CFLAGS} -c $< 74 75apilib.a: ${ALLO} 76 ${RM} $@ 77 for i in ${ALLO}; do (${AR} ${AR1} $@ ${AR2} $$i${AR3}); done 78 ${RANLIB} $@ 79 80.DEFAULT: 81 sccs get $< 82 83clean: 84 for i in ${ALLO} errs apilib.a makefile.bak \ 85 disp_out asc_disp.out astosc.out disp_asc.out \ 86 test* test$O t1* t1$O t2* t2$O; \ 87 do (${RM} $$i); done 88 89sccsclean: 90 -sccs clean 91 -sccs get makefile 92 93action: 94 ${ACTION} 95 96test: apilib.a test$O 97 ${CC} ${CFLAGS} -o $@ test$O apilib.a 98 99t1: apilib.a t1$O 100 ${CC} ${CFLAGS} -o $@ t1$O apilib.a 101 102t2: apilib.a t2$O 103 ${CC} ${CFLAGS} -o $@ t2$O apilib.a 104 105print: 106 ${PRINT} ${ALLPRINT} 107 108clist: ${ALLC} 109 @for i in ${ALLC} ; \ 110 do (echo ${DIRPATH}$$i); done 111 112hclist: ${ALLHC} 113 @for i in ${ALLHC} ; \ 114 do (echo ${DIRPATH}$$i); done 115 116sourcelist: ${ALLSOURCE} 117 @for i in ${ALLSOURCE}; \ 118 do (echo ${DIRPATH}$$i); done 119 120astosc.out: ../ctlr/function.h ../ctlr/hostctlr.h ../ctlr/$(KBD) 121 (cd ../tools; make mkastosc$X ) 122 ${RM} $@ 123 ../tools/mkastosc < ../ctlr/$(KBD) > $@ 124 125asc_disp.out: ebc_disp$O 126 (cd ../tools; make mkastods$X ) 127 ${RM} $@ 128 ../tools/mkastods > $@ 129 130disp_asc.out: ebc_disp$O 131 (cd ../tools; make mkdstoas$X ) 132 ${RM} $@ 133 ../tools/mkdstoas > $@ 134 135depend: 136 grep '^#include' ${ALLC} | grep -v '<' | \ 137 sed -e 's/:[^"]*"\([^"]*\)".*/: \1/' \ 138 -e 's/\.c/$$O/' | \ 139 awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \ 140 else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \ 141 else rec = rec " " $$2 } } \ 142 END { print rec } ' > makedep 143 echo '$$r makedep' >>eddep 144 echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep 145 echo '$$r makedep' >>eddep 146 echo 'w' >>eddep 147 -rm -f makefile.bak 148 cp makefile makefile.bak 149 ed - makefile < eddep 150 rm eddep makedep 151 152# DO NOT DELETE THIS LINE 153 154apilib$O: ../ctlr/api.h apilib.h 155api_bsd$O: ../ctlr/api.h api_exch.h 156api_exch$O: ../general/general.h api_exch.h 157asc_ebc$O: asc_ebc.h 158astosc$O: ../general/general.h ../ctlr/function.h astosc.h astosc.out 159dctype$O: dctype.h 160disp_asc$O: disp_asc.h asc_disp.out disp_asc.out 161