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 the above copyright notice and this paragraph are 7# duplicated in all such forms and that any documentation, 8# advertising materials, and other materials related to such 9# distribution and use acknowledge that the software was developed 10# by the University of California, Berkeley. The name of the 11# University may not be used to endorse or promote products derived 12# from this software without specific prior written permission. 13# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 14# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 15# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 16# 17# @(#)makefile 3.3 (Berkeley) 07/09/88 18# 19# msdos versus unix defines 20O = .o 21#PC_O = .obj 22 23X = 24#PC_X = .exe 25 26L = 27#PC_L = -link 28 29CC = cc 30#PC_CC = cl 31 32MV = mv 33#PC_MV = rename 34 35RM = rm -f 36#PC_RM= erase 37 38LINT_ARGS = 39#PC_LINT_ARGS = -DLINT_ARGS 40 41DEBUG_FLAGS = -g 42#PC_DEBUG_FLAGS = -Zi -Od 43 44AR = ar 45AR1 = cr 46AR2 = 47AR3 = 48#PC_AR = lib 49#PC_AR1 = 50#PC_AR2 = + 51#PC_AR3 = ";" 52 53RANLIB = ranlib 54#PC_RANLIB = echo "Done with " 55 56PRINT = print 57 58DEFINES = ${LINT_ARGS} 59 60INCLUDES = -I. 61 62OPTIMIZE = -O 63OPTIMIZE = ${DEBUG_FLAGS} 64 65CFLAGS = $(OPTIMIZE) $(INCLUDES) $(DEFINES) 66 67# Lint flags 68LINTFLAGS = -hbxaz 69 70ALLH = dohits.h ectype.h 71 72ALLY = mkmake.y 73 74ALLC = dohits.c ectype.c mkastods.c mkastosc.c mkdctype.c \ 75 mkdstoas.c mkhits.c prt3270.c 76 77ALLO = prt3270$O mkdctype$O ectype$O \ 78 mkastods$O mkdstoas$O mkhits$O mkmake$O dohits$O mkastosc$O 79 80ALLPRINT = ${ALLH} ${ALLC} ${ALLY} 81 82ALLSOURCE = ${ALLPRINT} makefile makefile.mak 83 84MKMAKE = mkmake$X 85#PC_MKMAKE = 86 87ALLEXE = mkastods$X mkastosc$X mkdctype$X mkdstoas$X \ 88 mkhits$X ${MKMAKE} prt3270$X 89 90.c.obj: 91 ${CC} ${CFLAGS} -c $< 92 93tools: 94 @echo Need to specify WHICH tool ... 95 96all: ${ALLEXE} 97 @echo done. 98 99prt3270$X: prt3270$O ../general/globals$O ../api/asc_ebc$O \ 100 ../api/astosc$O ../ctlr/kbd.out 101 ${CC} ${CFLAGS} -o prt3270 prt3270$O ../general/globals$O \ 102 ../api/asc_ebc$O ../api/astosc$O 103 104mkastosc$X: mkastosc$O dohits$O ../api/asc_ebc$O ../api/ebc_disp$O 105 $(CC) $(CFLAGS) -o mkastosc mkastosc$O dohits$O \ 106 ../api/asc_ebc$O ../api/ebc_disp$O 107 108mkastods$X: mkastods$O ../api/asc_ebc$O ../api/ebc_disp$O 109 $(CC) $(CFLAGS) -o mkastods mkastods$O ../api/asc_ebc$O \ 110 ../api/ebc_disp$O 111 112mkdstoas$X: mkdstoas$O ../api/asc_ebc$O ../api/ebc_disp$O 113 $(CC) $(CFLAGS) -o mkdstoas mkdstoas$O ../api/asc_ebc$O \ 114 ../api/ebc_disp$O 115 116mkhits$X: mkhits$O dohits$O ../api/asc_ebc$O ../api/ebc_disp$O 117 $(CC) $(CFLAGS) -o mkhits mkhits$O dohits$O ../api/asc_ebc$O \ 118 ../api/ebc_disp$O 119 120mkmake: mkmake$O 121 ${CC} ${CFLAGS} -o mkmake mkmake$O 122 123mkdctype$X: mkdctype$O ../api/ebc_disp$O ectype$O 124 $(CC) $(CFLAGS) -o mkdctype mkdctype$O ../api/ebc_disp$O ectype$O 125 126../api/astosc$O: 127 (cd ../api; make astosc$O) 128 129../api/asc_ebc$O: 130 (cd ../api; make asc_ebc$O) 131 132../ctlr/kbd.out: 133 (cd ../ctlr; make kbd.out) 134 135../api/ebc_disp$O: 136 (cd ../api; make ebc_disp$O) 137 138../general/globals$O: 139 (cd ../general; make globals$O) 140 141sourcelist: ${ALLSOURCE} 142 @for i in ${ALLSOURCE}; \ 143 do (echo ${DIRPATH}$$i); done 144 145print: 146 ${PRINT} ${ALLPRINT} 147 148tags: ${ALLC} ${ALLH} 149 ctags -t ${ALLC} ${ALLH} 150 151action: 152 ${ACTION} 153 154clean: 155 for i in errs makefile.bak y.tab.c y.output ${ALLO} ${ALLEXE}; \ 156 do (${RM} $$i); done 157 158sccsclean: 159 -sccs clean 160 -sccs get makefile 161 162lint: 163 lint ${LINTFLAGS} ${INCLUDES} ${DEFINES} -DTN3270 \ 164 ${TNMAIN} ${MOSTC} -lcurses 165 lint ${LINTFLAGS} ${INCLUDES} ${DEFINES} ${MSMAIN} map3270.c -lcurses 166 167.DEFAULT: 168 sccs get $< 169 170depend: 171 grep '^#include' ${ALLC} | grep -v '<' | \ 172 sed -e 's/:[^"]*"\([^"]*\)".*/: \1/' \ 173 -e 's/\.c/$$O/' | \ 174 awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \ 175 else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \ 176 else rec = rec " " $$2 } } \ 177 END { print rec } ' > makedep 178 echo '$$r makedep' >>eddep 179 echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep 180 echo '$$r makedep' >>eddep 181 echo 'w' >>eddep 182 -rm -f makefile.bak 183 cp makefile makefile.bak 184 ed - makefile < eddep 185 rm eddep makedep 186 187# DO NOT DELETE THIS LINE 188 189dohits$O: ../general/general.h ../api/asc_ebc.h ../api/ebc_disp.h 190dohits$O: ../ctlr/function.h dohits.h 191ectype$O: ectype.h 192mkastods$O: ../api/asc_ebc.h ../api/ebc_disp.h 193mkastosc$O: ../general/general.h ../ctlr/function.h dohits.h 194mkdctype$O: ../api/ebc_disp.h ectype.h 195mkdstoas$O: ../api/asc_ebc.h ../api/ebc_disp.h 196mkhits$O: ../ctlr/function.h dohits.h 197prt3270$O: ../general/general.h ../api/asc_ebc.h ../ctlr/hostctlr.h 198prt3270$O: ../ctlr/screen.h ../ctlr/function.h ../api/astosc.h 199prt3270$O: ../general/globals.h ../ctlr/kbd.out 200