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