# file: Makefile
#

LFLAGS     = -L. -L$(DAQ_LIB_DIR) \
             -lRCCVmeInterface -lpthread \
	     -lvme_rcc -lcmem_rcc -lio_rcc -lrcc_error -lgetinput

CFLAGS     = -DTSTAMP -funsigned-char -Wall \
             -I. -I$(DAQ_INCL_DIR) -I$(ROD_DAQ)/CommonWithDsp

all:libRCCVmeInterface.a libDummyVmeInterface.a libVmeModule.a libBaseException.a

libRCCVmeInterface.a: RCCVmeInterface.o
	ar rv libRCCVmeInterface.a RCCVmeInterface.o ; ranlib libRCCVmeInterface.a ; 

RCCVmeInterface.o: RCCVmeInterface.cxx RCCVmeInterface.h \
                   VmeInterface.h VmePort.h
	g++ -c $(CFLAGS) RCCVmeInterface.cxx -o RCCVmeInterface.o 

libDummyVmeInterface.a: DummyVmeInterface.o
	ar rv libDummyVmeInterface.a DummyVmeInterface.o ; ranlib libDummyVmeInterface.a ; 

DummyVmeInterface.o: DummyVmeInterface.cxx DummyVmeInterface.h \
                   VmeInterface.h VmePort.h
	g++ -c $(CFLAGS) DummyVmeInterface.cxx -o DummyVmeInterface.o 

VmeModule.o: VmeModule.cxx VmeModule.h
	g++ -c $(CFLAGS) -DI_AM_LINUX_HOST -o VmeModule.o VmeModule.cxx

BaseException.o: BaseException.cxx BaseException.h
	g++ -c $(CFLAGS) -DI_AM_LINUX_HOST -o BaseException.o BaseException.cxx

libVmeModule.a: VmeModule.o
	ar rv libVmeModule.a VmeModule.o ; ranlib libVmeModule.a ; 

libBaseException.a: BaseException.o
	ar rv libBaseException.a BaseException.o ; ranlib libBaseException.a ;

clean:
	rm *.o *.a
