MAKEFILE = Makefile SHELL = /bin/sh DEFINES = CFLAGS = -Oa -w $(DEFINES) #The -Os flag tells you what the optimizer has done. Somewhat noisy. #CFLAGS = -Oas -w $(DEFINES) LIBPREFIX=/usr/lib TARGET=linkz80 YFLAGS = -d LDFLAGS = -n -s LIBS = # Directory where program is installed INSDIR = /h/mts/tools LINT = lint LINT1 = /usr/lib/lint/lint1 LINTFLAGS = -acux AR = ar AS = as RANLIB = ranlib REVISION = CO = co CI = ci COFLAGS = -q -r$(REVISION) CIFLAGS = -u -Y HEADERS = link.h INCLUDES= CFILES = buff.c error.c getopt.c include.c main.c misc.c pass.c \ printl.c putobj.c symbol.c time.c FFILES = ASFILES = YACCFILES= LEXFILES= SHFILES = MANFILES= DOCFILES= OTHERS = OBJECTS = buff.o error.o getopt.o include.o main.o misc.o pass.o \ printl.o putobj.o symbol.o time.o SOURCE = $(MAKEFILE) $(MANFILES) $(DOCFILES) $(SHFILES) $(OTHERS) \ $(HEADERS) $(INCLUDES) $(YACCFILES) $(LEXFILES) $(CFILES) \ $(FFILES) $(ASFILES) $(TARGET): $(OBJECTS) $(CC) $(LDFLAGS) $(OBJECTS) -o $(TARGET) $(LIBS) install: $(INSDIR)/$(TARGET) $(INSDIR)/$(TARGET): $(TARGET) cp $(TARGET) $(INSDIR)/$(TARGET) lint: $(LINT) $(LINTFLAGS) $(DEFINES) $(CFILES) lib: llib-link.ln llib-link.ln: llib-link $(CPP) -C llib-link | $(LINT1) -vx -H/tmp/hlint > /usr/lib/lint/llib-link.ln $(RM) -f /tmp/hlint llib-link: lintlib $(CFILES) > llib-link clean: -rm -f $(OBJECTS) clobber: clean -rm -f $(TARGET) checkin: $(CI) $(CIFLAGS) $(SOURCE) checkout: $(CO) $(COFLAGS) $(SOURCE) tags: ctags $(CFILES) $(HEADERS) depend: sed -n -e '1,/^### DO NOT DELETE THIS LINE./p' < $(MAKEFILE) > $(MAKEFILE).new -for i in $(YACCFILES) $(LEXFILES) $(CFILES) $(FFILES) ; do\ base=`expr $$i ':' '\(.*\).[cylf]$$'`;\ suffix=`expr $$i ':' '.*\.\([cylf]\)$$'`;\ if /bin/test $$suffix = l ; then\ lex $$i;\ mv lex.yy.c $$base.c;\ suffix=c;\ echo "$$base.c: $$base.l" >> $(MAKEFILE).new;\ elif /bin/test $$suffix = y ; then\ yacc $(YFLAGS) $$i;\ mv y.tab.c $$base.c;\ suffix=c;\ echo "$$base.c: $$base.y" >> $(MAKEFILE).new;\ echo "y.tab.h: $$base.y" >> $(MAKEFILE).new;\ fi;\ $(CC) $(DEFINES) -E $$base.$$suffix |\ grep '^# [0-9][0-9]* ".*\.h"$$' > /tmp/grep$$$$;\ sed -e 's/.*"\(.*\)"$$/\1/' -e 's/^.\///' < /tmp/grep$$$$ |\ sort -u |\ awk\ "BEGIN { line=\"$$base.o: \"}\ {\ if(length(line \$$0)>63)\ {\ print line,\"\\\\\";\ line=\" \"\$$0\ }\ else\ line=line\" \"\$$0\ }\ END { print line}"\ >> $(MAKEFILE).new;\ done;\ rm /tmp/grep$$$$ mv $(MAKEFILE).new $(MAKEFILE) ### The following dependancies are/can be generated automatically ### by 'make depend'. Listen to this warning ### ### Do NOT put any of your own dependancies below this line, ### they will be removed ### DO NOT DELETE THIS LINE. USED FOR MAKE DEPEND buff.o: /usr/include/stdio.h /usr/include/void.h link.h error.o: /usr/include/stdio.h /usr/include/void.h link.h getopt.o: /usr/include/stdio.h /usr/include/void.h include.o: /usr/include/stdio.h /usr/include/void.h link.h main.o: /usr/include/signal.h /usr/include/stdio.h \ /usr/include/void.h link.h misc.o: /usr/include/stdio.h /usr/include/void.h link.h pass.o: /usr/include/stdio.h /usr/include/void.h link.h printl.o: /usr/include/stdio.h /usr/include/void.h link.h putobj.o: /usr/include/stdio.h /usr/include/void.h link.h symbol.o: /usr/include/stdio.h /usr/include/void.h link.h time.o: /usr/include/stdio.h /usr/include/time.h \ /usr/include/void.h link.h