You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.3 KiB
47 lines
1.3 KiB
# File: Makefile
|
|
# Author: M. P. Hayes, UCECE
|
|
# Date: 11 Sep 2010
|
|
# Descr: Makefile for demo2
|
|
|
|
CC = gcc
|
|
CFLAGS = -Wall -Wstrict-prototypes -Wextra -g -I../../drivers/test -I../../drivers
|
|
|
|
DEL = rm
|
|
|
|
|
|
# Default target.
|
|
all: demo2
|
|
|
|
|
|
# Compile: create object files from C source files.
|
|
demo2-test.o: demo2.c ../../drivers/led.h ../../drivers/test/system.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 $@
|
|
|
|
|
|
|
|
|
|
# Link: create executable file from object files.
|
|
demo2: demo2-test.o led-test.o mgetkey-test.o pio-test.o system-test.o
|
|
$(CC) $(CFLAGS) $^ -o $@ -lrt
|
|
|
|
|
|
# Clean: delete derived files.
|
|
.PHONY: clean
|
|
clean:
|
|
-$(DEL) demo2 demo2-test.o led-test.o mgetkey-test.o pio-test.o system-test.o
|
|
|
|
|
|
|