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.

61 lines
2.2 KiB

# File: Makefile
# Author: M. P. Hayes, UCECE
# Date: 11 Sep 2010
# Descr: Makefile for task2
CC = gcc
CFLAGS = -Wall -Wstrict-prototypes -Wextra -g -I. -I../../utils -I../../drivers -I../../drivers/test
DEL = rm
# Default target.
all: task2
# Compile: create object files from C source files.
timer-test.o: ../../drivers/test/timer.c ../../drivers/test/timer.h ../../drivers/test/system.h
$(CC) -c $(CFLAGS) $< -o $@
led-test.o: ../../drivers/led.c ../../drivers/led.h ../../drivers/test/pio.h ../../drivers/test/avrtest.h ../../drivers/test/system.h
$(CC) -c $(CFLAGS) $< -o $@
display-test.o: ../../drivers/display.c ../../drivers/ledmat.h ../../drivers/display.h ../../drivers/test/system.h
$(CC) -c $(CFLAGS) $< -o $@
pio-test.o: ../../drivers/test/pio.c
$(CC) -c $(CFLAGS) $< -o $@
task-test.o: ../../utils/task.c ../../drivers/test/timer.h ../../utils/task.h ../../drivers/test/system.h
$(CC) -c $(CFLAGS) $< -o $@
tinygl-test.o: ../../utils/tinygl.c ../../drivers/display.h ../../utils/font.h ../../utils/tinygl.h ../../drivers/test/system.h
$(CC) -c $(CFLAGS) $< -o $@
ledmat-test.o: ../../drivers/ledmat.c ../../drivers/test/avrtest.h ../../drivers/test/pio.h ../../drivers/ledmat.h ../../drivers/test/system.h
$(CC) -c $(CFLAGS) $< -o $@
system-test.o: ../../drivers/test/system.c ../../drivers/test/pio.h ../../drivers/test/avrtest.h ../../drivers/test/mgetkey.h ../../drivers/test/system.h
$(CC) -c $(CFLAGS) $< -o $@
mgetkey-test.o: ../../drivers/test/mgetkey.c ../../drivers/test/mgetkey.h
$(CC) -c $(CFLAGS) $< -o $@
task2-test.o: task2.c ../../utils/task.h ../../drivers/test/system.h ../../drivers/test/timer.h ../../utils/font.h ../../drivers/led.h ../../utils/tinygl.h ../../drivers/display.h ../../fonts/font5x7_1.h
$(CC) -c $(CFLAGS) $< -o $@
# Link: create executable file from object files.
task2: timer-test.o led-test.o display-test.o pio-test.o task-test.o tinygl-test.o ledmat-test.o system-test.o mgetkey-test.o task2-test.o
$(CC) $(CFLAGS) $^ -o $@ -lrt
# Clean: delete derived files.
.PHONY: clean
clean:
-$(DEL) task2 timer-test.o led-test.o display-test.o pio-test.o task-test.o tinygl-test.o ledmat-test.o system-test.o mgetkey-test.o task2-test.o