Subversion Repositories f9daq

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
109 f9daq 1
 
2
ROOTINC=$(shell root-config  --incdir )
3
ROOTLIB=$(shell root-config  --libs )
4
 
5
INC=-I.  -I$(ROOTINC)
6
 
7
 
8
LIBS=$(ROOTLIB) -L./ -lm
9
LIBS1=$(shell root-config  --libs --glibs )
10
 
11
OBJ_FILES =  wusbxx_dll.o libxxusb.o
12
 
13
SRC     = .
14
INC1     = -I. -I../lib -I/usr/include
15
DBG     =
16
CFLAGS  = $(DBG) $(INC1) -Wall
17
 
18
 
19
LIBFILE = libdaqusb.a
20
 
21
TARGET  = daqusb
22
FILES  = $(SRC)/daqusb.C
23
SHLIB    =  $(LIBFILE) -lusb
24
 
25
all: $(TARGET) libdaqusb.so
26
 
27
 
28
$(TARGET): $(FILES) library
29
	$(CXX) -DMAIN $(FILES) $(CFLAGS) -o $(TARGET) $(SHLIB) -lstdc++
30
 
31
 
32
library: $(OBJ_FILES)
33
 
34
wusbxx_dll.o:wusbxx_dll.c wusbxx_dll.h
35
 
36
libxxusb.o: libxxusb.cpp libxxusb.h
37
 
38
.cc.o:
39
	$(CXX) -c $<
40
	ar r $(LIBFILE) $@
41
 
42
.cpp.o:
43
	$(CXX)  -fPIC  -c $<
44
	ar r $(LIBFILE) $@
45
 
46
.c.o:
47
	$(CXX)  -fPIC  -c  $<
48
	ar r $(LIBFILE) $@
49
 
50
 
51
 
52
libdaqusb.so: $(FILES)
53
	@echo "Generating dictionary Dict.C..."
54
	rootcint -f Dict.C  -c $(INC)  $(CPPFLAGS)  daq.h  LinkDef.h
55
	$(CXX) -DG__DICTIONARY $(CPPFLAGS) $(INC)   -fPIC -g -Wall   $(FILES) wusbxx_dll.o libxxusb.o  Dict.C -lusb -shared -o libdaqusb.so
56
 
57
clean:
58
	rm Dict.C  libdaqusb.so $(TARGET) $(OBJ_FILES)
59
 
60
 
61
tgz:
62
	tar czvf lc2277.tgz Makefile gui.C daq.C daq.h LinkDef.h README start.cxx start.sh readtdcfile.cxx readtdcfile.sh