all: rt_process.o rt_irq.o rt_irq_gen.o nonrt_irq.o monitor

# you might have to change this

# the path to the rt-linux kernel 
RTLINUX = ../../../linux
INCLUDE = .

CFLAGS = -O2 -Wall


monitor: monitor.c
	gcc -I${INCLUDE} ${CFLAGS} -o monitor monitor.c

rt_process.o: rt_process.c common.h
	gcc -I${INCLUDE} ${CFLAGS} -D__KERNEL__ -D__RT__  -c rt_process.c

rt_irq.o: rt_irq.c common.h
	gcc -I${INCLUDE} ${CFLAGS} -D__KERNEL__ -D__RT__  -c rt_irq.c

rt_irq_gen.o: rt_irq_gen.c common.h
	gcc -I${INCLUDE} ${CFLAGS} -D__KERNEL__ -D__RT__  -c rt_irq_gen.c

nonrt_irq.o: nonrt_irq.c common.h
	gcc -I${INCLUDE} ${CFLAGS} -D__KERNEL__ -D__RT__  -c nonrt_irq.c

clean:
	rm -f app rt_process.o rt_irq_gen.o
