#-----------------------------------------------------------------------------
#
# make 		- build the RTLinux modules for testing real-time function
#		  and TRC004/006 functioning
#
# make clean 	- Remove object and backup files
#
#
#-----------------------------------------------------------------------------


CFLAGS = $(RCC_CFLAGS) -O2 -Wall

OBJS = 	control_module.o pumaInttest control_app robot 

all:    control_app pumaInttest control_module.o robot 
include $(RTLDIR)/rtl.mk

control_app: control_app.c
	$(CC) ${INCLUDE} -O2 -Wall control_app.c -o control_app

pumaInttest: pumaInttest.c  pumaInterface.c
	$(CC) ${INCLUDE} -g -O2 -Wall pumaInttest.c pumaInterface.c -o pumaInttest

control_module.o: control_module.c
	$(CC) ${INCLUDE} -O2 ${CFLAGS} -c control_module.c -o control_module.o 


robot: robot.c cfig.c robotusr.c sched.c rt_control.c 
	$(CC) ${INCLUDE} -O2 -g -Wall  robot.c cfig.c robotusr.c sched.c rt_control.c -o robot



install: $(OBJS)
	cat $(RTLDIR)/scripts/insrtl | sed -e 's@modules@$(RTLDIR)/modules@' > insrtl	
	cp $(RTLDIR)/scripts/rmrtl .


makeClean($(OBJS))
	rm -f insrtl
	rm -f rmrtl


#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

