Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
326 | f9daq | 1 | CC = gcc |
2 | #CXX = g++ -std=c++11 |
||
3 | ROOTINC=$(shell root-config --incdir ) |
||
4 | ROOTLIB=$(shell root-config --libs ) |
||
5 | |||
6 | |||
7 | INC=-I. -I$(ROOTINC) |
||
8 | |||
9 | LIBS=$(ROOTLIB) -L./ -lm |
||
10 | LIBS1=$(shell root-config --libs --glibs ) |
||
11 | |||
12 | |||
13 | |||
14 | SRC = . |
||
15 | INC1 = -I. -I../lib -I/usr/include |
||
16 | DBG = |
||
17 | CFLAGS = $(DBG) $(INC) -fPIC -DLINUX -Wall |
||
18 | |||
19 | |||
20 | TARGET = daq |
||
21 | |||
22 | FILES = $(SRC)/daq.C |
||
23 | |||
24 | VMELIB = libf9vme.a |
||
25 | |||
26 | SHLIB = -lz |
||
27 | |||
28 | OBJ_FILES = VMEModule.o CAENV965.o CAEN_V1718.o VmUsbStack.o |
||
29 | |||
30 | |||
31 | all: sa02_ctrl sa02read |
||
32 | |||
33 | |||
34 | |||
35 | sa02_ctrl: sa02lib.c sa02_ctrl.cxx |
||
36 | $(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 |
||
37 | cp sa02_ctrl ../bin |
||
38 | |||
39 | |||
40 | wientest: wienvme_dll.c |
||
41 | $(CXX) $(CFLAGS) -Ivmeinterfaces -DMAIN wienvme_dll.c -lpcivme $(SHLIB) -o wientest |
||
42 | |||
43 | |||
44 | sa02read: sa02read.C |
||
45 | $(CXX) -DMAIN -Icvi $(CFLAGS) sa02read.C $(ROOTLIB) -lz -o sa02read |
||
46 | mikdir -p ../bin |
||
47 | cp sa02read ../bin |
||
48 | |||
49 | all1: vme daq |
||
50 | |||
51 | usbvme: usbvme.C CAEN_V1718.c |
||
52 | $(CXX) $(CFLAGS) usbvme.C CAEN_V1718.c $(SHLIB) -o usbvme |
||
53 | |||
54 | wusbxx_dll.o:vmeinterfaces/wusbxx_dll.c vmeinterfaces/wusbxx_dll.h |
||
55 | $(CXX) -Ivmeinterfaces -Ivmeinterfaces/VmUsbStack -c $(CFLAGS) vmeinterfaces/wusbxx_dll.c |
||
56 | |||
57 | libxxusb.o:vmeinterfaces/libxxusb.c vmeinterfaces/libxxusb.h |
||
58 | $(CXX) -Ivmeinterfaces -c $(CFLAGS) vmeinterfaces/libxxusb.cpp |
||
59 | |||
60 | VmUsbStack_cvi.o:vmeinterfaces/VmUsbStack/VmUsbStack_cvi.c vmeinterfaces/VmUsbStack/VmUsbStack_cvi.h |
||
61 | $(CXX) -Ivmeinterfaces -Ivmeinterfaces/VmUsbStack -c $(CFLAGS) vmeinterfaces/VmUsbStack/VmUsbStack_cvi.c |
||
62 | |||
63 | |||
64 | .cpp.o: |
||
65 | $(CXX) -c $(CFLAGS) $< |
||
66 | ar r $(VMELIB) $@ |
||
67 | |||
68 | .C.o: |
||
69 | $(CXX) -c $(CFLAGS) $< |
||
70 | ar r $(VMELIB) $@ |
||
71 | |||
72 | |||
73 | .cc.o: |
||
74 | $(CXX) -c $(CFLAGS) $< |
||
75 | ar r $(VMELIB) $@ |
||
76 | |||
77 | .c.o: |
||
78 | $(CXX) -Ivmeinterfaces -c $(CFLAGS) $< |
||
79 | ar r $(VMELIB) $@ |
||
80 | |||
81 | vme: $(OBJ_FILES) |
||
82 | |||
83 | CAEN_V1718.o: CAEN_V1718.c |
||
84 | |||
85 | VMEModule.o: VMEModule.hh VMEModule.cc |
||
86 | |||
87 | CAENV965.o: CAENV965.h CAENV965_DEF.h CAENV965.c |
||
88 | |||
89 | |||
90 | $(TARGET): $(FILES) $(OBJ_FILES) |
||
91 | $(CXX) -DMAIN $(CFLAGS) $(FILES) $(OBJ_FILES) $(SHLIB) -o $(TARGET) |
||
92 | |||
93 | |||
94 | |||
95 | libdaq.so: $(FILES) |
||
96 | @echo "Generating dictionary Dict.C..." |
||
97 | rootcint -f Dict.C -c $(INC) $(CPPFLAGS) daq.h LinkDef.h |
||
98 | $(CXX) -DG__DICTIONARY $(CFLAGS) $(INC) $(FILES) Dict.C -L. $(SHLIB) -shared -o libdaq.so |
||
99 | |||
100 | clean: |
||
101 | rm sa02_wienvme_ctrl sa02_caenusb_ctrl sa02_wvmusb_ctrl wientest Dict.C libdaq.so $(TARGET1) *.o |
||
102 | |||
103 | |||
104 | tgz: |
||
105 | tar czvf vme.tgz Makefile *.c *.h *.C *.cc *.hh |