Subversion Repositories f9daq

Rev

Blame | Last modification | View Log | RSS feed


ROOTINC=$(shell root-config  --incdir ) 
ROOTLIB=$(shell root-config  --libs ) 

INC=-I.  -I$(ROOTINC)

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

OBJ_FILES =  wusbxx_dll.o libxxusb.o 

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


LIBFILE = libdaqusb.a

TARGET  = daqusb
FILES  = $(SRC)/daqusb.C
SHLIB    =  $(LIBFILE) -lusb

all: $(TARGET) libdaqusb.so


$(TARGET): $(FILES) library 
        $(CXX) -DMAIN $(FILES) $(CFLAGS) -o $(TARGET) $(SHLIB) -lstdc++


library: $(OBJ_FILES)

wusbxx_dll.o:wusbxx_dll.c wusbxx_dll.h 

libxxusb.o: libxxusb.cpp libxxusb.h

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

.cpp.o:
        $(CXX)  -fPIC  -c $<
        ar r $(LIBFILE) $@

.c.o:
        $(CXX)  -fPIC  -c  $<
        ar r $(LIBFILE) $@



libdaqusb.so: $(FILES)
        @echo "Generating dictionary Dict.C..." 
        rootcint -f Dict.C  -c $(INC)  $(CPPFLAGS)  daq.h  LinkDef.h
        $(CXX) -DG__DICTIONARY $(CPPFLAGS) $(INC)   -fPIC -g -Wall   $(FILES) wusbxx_dll.o libxxusb.o  Dict.C -lusb -shared -o libdaqusb.so

clean:
        rm Dict.C  libdaqusb.so $(TARGET) $(OBJ_FILES) 


tgz:
        tar czvf uklon.tgz Makefile gui.C daq.C daq.h LinkDef.h README start.cxx start.sh