#-----------------------------------------------------------------------------
#
# make 		- build the RTLinux modules for real-time control
#
# make clean 	- Remove object and backup files
#
# make install  - Build, also move modules and scripts to binary directory
#-----------------------------------------------------------------------------


CFLAGS = $(RCC_CFLAGS) -O2 -Wall

OBJS = 	pumaInterface.o moperx.o simdevice.o 

control: $(OBJS)
include $(RTLDIR)/rtl.mk

basicModule(pumaInterface)
basicModule(moperx)
basicModule(simdevice)

jls_test: jls_test.c
	$(CC) ${INCLUDE} -O2 -g -Wall -o $@ jls_test.c 

dumpdata: dumpdata.c
	$(CC) ${INCLUDE} -O2 -g -Wall -o $@ dumpdata.c 

install: $(OBJS)
	cp pumaInterface.o $(BDIR)
	cp moperx.o $(BDIR)
	cp simdevice.o $(BDIR)
	cat insrci.tmpl | sed -e 's@modules@$(RTLDIR)/modules@' > insrci
	cp insrci $(BDIR)
	cp inssim $(BDIR)
	cp rmrci $(BDIR)


makeClean($(OBJS))


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

