CFLAGS= -O -R LIBS= ../lib/lib.a STD= fixfix showfont showtfmwidth checkw all: ${STD} ${STD}: ${LIBS} ${CC} ${CFLAGS} -o $@ $@.c ${LIBS} install: all @echo "these programs don't get installed..." clean: rm -f ${STD} *.o a.out core depend: for i in ${STD}; do \ ${CC} -M ${CFLAGS} $$i.c | sed -e 's/\.o:/:/' -e 's, ./, ,' | \ awk '{ if ($$1 != prev) { if (rec != "") print rec; \ rec = $$0; prev = $$1; } \ else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \ else rec = rec " " $$2 } } \ END { print rec }'; done >makedep echo '/^# DO NOT DELETE THIS LINE/+2,$$d' >eddep echo '$$r makedep' >>eddep echo 'w' >>eddep cp Makefile Makefile.bak ed - Makefile >Makefile echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >>Makefile echo '# see make depend above' >>Makefile # DO NOT DELETE THIS LINE -- make depend uses it fixfix: fixfix.c /usr/include/stdio.h showtfmwidth: showtfmwidth.c /usr/include/stdio.h ../h/types.h ../h/fio.h checkw: checkw.c /usr/include/stdio.h /usr/include/sys/types.h checkw: /usr/include/sys/stat.h ../h/types.h ../h/fio.h showfont.o: showfont.c /usr/include/stdio.h ../h/font.h ../h/types.h ../h/conv.h # DEPENDENCIES MUST END AT END OF FILE # IF YOU PUT STUFF HERE IT WILL GO AWAY # see make depend above