LDLIBS=-L. -lwiringPi -lcrypt -lm -lrt -lgpio CFLAGS=-g -I. -Wall -Werror -O2 LDFLAGS=-g all: cc_chipid cc_read cc_write cc_erase test: ls *.h *.c Makefile | entr sh -c 'make clean && make' clean: rm -f cc_chipid cc_read cc_write cc_erase cc_erase: cc_erase.o CCDebugger.o libwiringPi.a $(CC) $(LDFLAGS) -o $@ $> $(LDLIBS) cc_write: cc_write.o CCDebugger.o libwiringPi.a $(CC) $(LDFLAGS) -o $@ $> $(LDLIBS) cc_read: cc_read.o CCDebugger.o libwiringPi.a $(CC) $(LDFLAGS) -o $@ $> $(LDLIBS) cc_chipid: cc_chipid.o CCDebugger.o libwiringPi.a $(CC) $(LDFLAGS) -o $@ $> $(LDLIBS) .SUFFIXES: .o .c.o: #cc -o ${.TARGET} -c ${.IMPSRC} $(CC) $(CFLAGS) -c $< CCDebugger.o : CCDebugger.c CCDebugger.h $(CC) $(CFLAGS) -c $*.c wiringPi.o : wiringPi.c wiringPi.h $(CC) $(CFLAGS) -c $*.c libwiringPi.a: wiringPi.o $(AR) crs $@ $>