1# @(#)makefile 8.1 (Berkeley) 06/06/93 2 3# msdos versus unix defines 4O = .o 5#PC_O = .obj 6 7X = 8#PC_X = .exe 9 10L = 11#PC_L = -link 12 13CC = cc 14#PC_CC = cl 15 16MV = mv 17#PC_MV = rename 18 19RM = rm -f 20#PC_RM= erase 21 22LINT_ARGS = 23#PC_LINT_ARGS = -DLINT_ARGS 24 25DEBUG_FLAGS = -g 26#PC_DEBUG_FLAGS = -Zi -Od 27 28AR = ar 29AR1 = cr 30AR2 = 31AR3 = 32#PC_AR = lib 33#PC_AR1 = 34#PC_AR2 = + 35#PC_AR3 = ";" 36 37RANLIB = ranlib 38#PC_RANLIB = echo "Done with " 39 40PRINT = print 41 42DEFINES = ${LINT_ARGS} 43 44INCLUDES = -I. 45 46OPTIMIZE = -O 47OPTIMIZE = ${DEBUG_FLAGS} 48 49CFLAGS = $(OPTIMIZE) $(INCLUDES) $(DEFINES) 50 51# Lint flags 52LINTFLAGS = -hbxaz 53 54ALLH = spint.h video.h 55 56ALLC = spintc.c system.c termout.c 57 58ALLASM = spintasm.asm support.asm 59 60ALLO = spintasm$O spintc$O support$O system$O termout$O 61 62ALLPRINT = ${ALLH} ${ALLASM} ${ALLC} 63 64ALLSOURCE = ${ALLPRINT} makefile makefile.mak 65 66.c.obj: 67 ${CC} ${CFLAGS} -c $< 68 69syslib.a: $(ALLO) 70 ${RM} $@ 71 for i in ${ALLO}; do (${AR} ${AR1} $@ ${AR2} $$i${AR3}); done 72 ${RANLIB} $@ 73 74clean: 75 for i in $(ALLO) errs makefile.bak syslib.a; \ 76 do (${RM} $$i); done 77 78sccsclean: 79 -sccs clean 80 -sccs get makefile 81 82sourcelist: ${ALLSOURCE} 83 @for i in ${ALLSOURCE}; \ 84 do (echo ${DIRPATH}$$i); done 85 86print: 87 ${PRINT} ${ALLPRINT} 88 89tags: ${ALLC} ${ALLH} 90 ctags -t ${ALLC} ${ALLH} 91 92action: 93 ${ACTION} 94 95lint: 96 lint ${LINTFLAGS} ${INCLUDES} ${DEFINES} -DTN3270 \ 97 ${TNMAIN} ${MOSTC} -lcurses 98 lint ${LINTFLAGS} ${INCLUDES} ${DEFINES} ${MSMAIN} map3270.c -lcurses 99 100.DEFAULT: 101 sccs get $< 102 103depend: 104 grep '^#include' ${ALLC} ${ALLH} | grep -v '<' | \ 105 sed -e 's/:[^"]*"\([^"]*\)".*/: \1/' \ 106 -e 's/\.c/$$O/' | \ 107 awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \ 108 else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \ 109 else rec = rec " " $$2 } } \ 110 END { print rec } ' > makedep 111 echo '$$r makedep' >>eddep 112 echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep 113 echo '$$r makedep' >>eddep 114 echo 'w' >>eddep 115 -rm -f makefile.bak 116 cp makefile makefile.bak 117 ed - makefile < eddep 118 rm eddep makedep 119 120# DO NOT DELETE THIS LINE 121 122spintc$O: ../general/general.h spint.h 123system$O: ../general/general.h ../ctlr/api.h spint.h ../general/globals.h 124termout$O: ../general/general.h ../api/disp_asc.h 125termout$O: ../ctlr/hostctlr.h 126termout$O: ../ctlr/oia.h 127termout$O: ../ctlr/screen.h ../general/globals.h video.h 128