diff --git a/apps/pacerdemo1/Makefile.test b/apps/pacerdemo1/Makefile.test new file mode 100644 index 0000000..0e6e90b --- /dev/null +++ b/apps/pacerdemo1/Makefile.test @@ -0,0 +1,52 @@ +# File: Makefile +# Author: M. P. Hayes, UCECE +# Date: 11 Sep 2010 +# Descr: Makefile for pacerdemo1 + +CC = gcc +CFLAGS = -Wall -Wstrict-prototypes -Wextra -g -I../../drivers/test -I../../drivers -I../../utils + +DEL = rm + + +# Default target. +all: pacerdemo1 + + +# Compile: create object files from C source files. +pacerdemo1-test.o: pacerdemo1.c ../../drivers/led.h ../../drivers/test/avrtest.h ../../drivers/test/pio.h ../../drivers/test/system.h ../../utils/pacer.h + $(CC) -c $(CFLAGS) $< -o $@ + +led-test.o: ../../drivers/led.c ../../drivers/led.h ../../drivers/test/avrtest.h ../../drivers/test/pio.h ../../drivers/test/system.h + $(CC) -c $(CFLAGS) $< -o $@ + +mgetkey-test.o: ../../drivers/test/mgetkey.c ../../drivers/test/mgetkey.h + $(CC) -c $(CFLAGS) $< -o $@ + +pio-test.o: ../../drivers/test/pio.c ../../drivers/test/avrtest.h ../../drivers/test/pio.h ../../drivers/test/system.h + $(CC) -c $(CFLAGS) $< -o $@ + +system-test.o: ../../drivers/test/system.c ../../drivers/test/avrtest.h ../../drivers/test/mgetkey.h ../../drivers/test/pio.h ../../drivers/test/system.h + $(CC) -c $(CFLAGS) $< -o $@ + +timer-test.o: ../../drivers/test/timer.c ../../drivers/test/system.h ../../drivers/test/timer.h + $(CC) -c $(CFLAGS) $< -o $@ + +pacer-test.o: ../../utils/pacer.c ../../drivers/test/system.h ../../drivers/test/timer.h ../../utils/pacer.h + $(CC) -c $(CFLAGS) $< -o $@ + + + + +# Link: create executable file from object files. +pacerdemo1: pacerdemo1-test.o led-test.o mgetkey-test.o pio-test.o system-test.o timer-test.o pacer-test.o + $(CC) $(CFLAGS) $^ -o $@ -lrt + + +# Clean: delete derived files. +.PHONY: clean +clean: + -$(DEL) pacerdemo1 pacerdemo1-test.o led-test.o mgetkey-test.o pio-test.o system-test.o timer-test.o pacer-test.o + + +