Subversion Repositories f9daq

Rev

Blame | Last modification | View Log | RSS feed

CC = gcc
#CXX = g++ -std=c++11
ROOTINC=$(shell root-config  --incdir ) 
ROOTLIB=$(shell root-config  --libs ) 


INC=-I.  -I$(ROOTINC)

LIBS=$(ROOTLIB) -L./ -lm 
LIBS1=$(shell root-config  --libs --glibs ) 



SRC     = .
INC1     = -I. -I../lib -I/usr/include
DBG     = 
CFLAGS  = $(DBG) $(INC)   -fPIC -DLINUX -Wall


TARGET = daq

FILES  = $(SRC)/daq.C

VMELIB = libf9vme.a

SHLIB   =   -lz

OBJ_FILES = VMEModule.o  CAENV965.o CAEN_V1718.o  VmUsbStack.o 


all: sa02_ctrl  sa02read 

 

sa02_ctrl: sa02lib.c sa02_ctrl.cxx 
        $(CXX) $(CFLAGS)  -I../cvi/instr/vme  -Icvi  -DBELLEPTS  sa02_ctrl.cxx sa02lib.c cvi/H2D.c -L../cvi/instr/vme  -lvme  -ldl -lCAENVME $(SHLIB) -o sa02_ctrl
        cp sa02_ctrl ../bin


wientest: wienvme_dll.c 
        $(CXX) $(CFLAGS)   -Ivmeinterfaces -DMAIN wienvme_dll.c    -lpcivme $(SHLIB) -o wientest
        
        
sa02read: sa02read.C 
        $(CXX) -DMAIN  -Icvi $(CFLAGS)  sa02read.C $(ROOTLIB) -lz -o sa02read
        mikdir -p  ../bin
        cp sa02read ../bin
        
all1: vme daq

usbvme: usbvme.C CAEN_V1718.c 
        $(CXX) $(CFLAGS)  usbvme.C CAEN_V1718.c  $(SHLIB) -o usbvme     

wusbxx_dll.o:vmeinterfaces/wusbxx_dll.c vmeinterfaces/wusbxx_dll.h
        $(CXX) -Ivmeinterfaces -Ivmeinterfaces/VmUsbStack -c $(CFLAGS) vmeinterfaces/wusbxx_dll.c

libxxusb.o:vmeinterfaces/libxxusb.c vmeinterfaces/libxxusb.h
        $(CXX) -Ivmeinterfaces -c $(CFLAGS) vmeinterfaces/libxxusb.cpp

VmUsbStack_cvi.o:vmeinterfaces/VmUsbStack/VmUsbStack_cvi.c vmeinterfaces/VmUsbStack/VmUsbStack_cvi.h
        $(CXX) -Ivmeinterfaces -Ivmeinterfaces/VmUsbStack -c $(CFLAGS) vmeinterfaces/VmUsbStack/VmUsbStack_cvi.c
        
        
.cpp.o:
        $(CXX) -c $(CFLAGS) $<
        ar r $(VMELIB) $@

.C.o:
        $(CXX) -c $(CFLAGS) $<
        ar r $(VMELIB) $@


.cc.o:
        $(CXX) -c $(CFLAGS) $<
        ar r $(VMELIB) $@

.c.o:
        $(CXX) -Ivmeinterfaces -c $(CFLAGS) $<
        ar r $(VMELIB) $@

vme: $(OBJ_FILES)

CAEN_V1718.o: CAEN_V1718.c

VMEModule.o: VMEModule.hh VMEModule.cc

CAENV965.o: CAENV965.h CAENV965_DEF.h CAENV965.c


$(TARGET): $(FILES)  $(OBJ_FILES) 
        $(CXX) -DMAIN $(CFLAGS) $(FILES) $(OBJ_FILES) $(SHLIB)  -o $(TARGET)



libdaq.so: $(FILES)
        @echo "Generating dictionary Dict.C..." 
        rootcint -f Dict.C  -c $(INC)  $(CPPFLAGS)  daq.h  LinkDef.h
        $(CXX) -DG__DICTIONARY $(CFLAGS) $(INC)   $(FILES) Dict.C -L. $(SHLIB) -shared -o libdaq.so

clean:
        rm sa02_wienvme_ctrl sa02_caenusb_ctrl sa02_wvmusb_ctrl wientest Dict.C  libdaq.so $(TARGET1) *.o


tgz:
        tar czvf vme.tgz Makefile *.c *.h *.C *.cc *.hh