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 4.2 (Berkeley) 06/06/90 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 = terminal.h 71 72ALLC = system.c termout.c 73 74ALLO = system$O termout$O 75 76ALLHC= ${ALLH} ${ALLC} 77ALLPRINT = ${ALLHC} 78 79ALLSOURCE = ${ALLPRINT} makefile 80 81#.c.obj: 82# ${CC} ${CFLAGS} -c $< 83 84syslib.a: $(ALLO) 85 ${RM} $@ 86 for i in ${ALLO}; do (${AR} ${AR1} $@ ${AR2} $$i${AR3}); done 87 ${RANLIB} $@ 88 89clean: 90 for i in $(ALLO) errs makefile.bak syslib.a; \ 91 do (${RM} $$i); done 92 93sccsclean: 94 -sccs clean 95 -sccs get makefile 96 97clist: ${ALLC} 98 @for i in ${ALLC} ; \ 99 do (echo ${DIRPATH}$$i); done 100 101hclist: ${ALLHC} 102 @for i in ${ALLHC} ; \ 103 do (echo ${DIRPATH}$$i); done 104 105sourcelist: ${ALLSOURCE} 106 @for i in ${ALLSOURCE}; \ 107 do (echo ${DIRPATH}$$i); done 108 109print: 110 ${PRINT} ${ALLPRINT} 111 112tags: ${ALLC} ${ALLH} 113 ctags -t ${ALLC} ${ALLH} 114 115action: 116 ${ACTION} 117 118lint: 119 lint ${LINTFLAGS} ${INCLUDES} ${DEFINES} -DTN3270 \ 120 ${TNMAIN} ${MOSTC} -lcurses 121 lint ${LINTFLAGS} ${INCLUDES} ${DEFINES} ${MSMAIN} map3270.c -lcurses 122 123.DEFAULT: 124 sccs get $< 125 126depend: 127 grep '^#include' ${ALLC} ${ALLH} | grep -v '<' | \ 128 sed -e 's/:[^"]*"\([^"]*\)".*/: \1/' \ 129 -e 's/\.c/$$O/' | \ 130 awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \ 131 else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \ 132 else rec = rec " " $$2 } } \ 133 END { print rec } ' > makedep 134 echo '$$r makedep' >>eddep 135 echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep 136 echo '$$r makedep' >>eddep 137 echo 'w' >>eddep 138 -rm -f makefile.bak 139 cp makefile makefile.bak 140 ed - makefile < eddep 141 rm eddep makedep 142 143# DO NOT DELETE THIS LINE 144 145system$O: ../general/general.h ../ctlr/api.h ../api/api_exch.h 146system$O: ../general/globals.h 147termout$O: ../general/general.h terminal.h ../api/disp_asc.h ../ctlr/hostctlr.h 148termout$O: ../ctlr/externs.h ../ctlr/declare.h ../ctlr/oia.h ../ctlr/screen.h 149termout$O: ../general/globals.h ../telextrn.h 150