Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
145 | f9daq | 1 | # Make variables ---------------------------------------------------- |
2 | |||
3 | # ROOT include and libraries |
||
4 | ROOTINC=$(shell root-config --incdir ) |
||
5 | ROOTLIB=$(shell root-config --libs ) |
||
6 | LIBS1=$(shell root-config --cflags --glibs ) |
||
7 | |||
8 | # Includes, 32 vs. 64 bit type, libraries |
||
9 | INC=-I. -I$(ROOTINC) |
||
10 | OSTYPE=none |
||
11 | LIBS=$(ROOTLIB) -L./ -lm |
||
12 | |||
13 | # Source and debug prefixes |
||
14 | SRC = . |
||
15 | DBG = |
||
16 | |||
17 | # CAMAC DAQ library variables |
||
18 | OBJ_FILES = wusbxx_dll.o libxxusb.o |
||
19 | LIBFILE = libdaqusb.a |
||
20 | |||
21 | # Specific variables for the main program |
||
22 | TARGET = windowed_test |
||
23 | DAQFILE = $(SRC)/daqusb.C |
||
24 | FILES = $(SRC)/daqusb.C $(SRC)/windowed_test.C $(SRC)/daqscope.C |
||
25 | HEADER = daq.h workstation.h root_include.h windowed_test.h |
||
26 | CAMLIB = $(LIBFILE) |
||
27 | SHLIB = $(LIBFILE) libvxi11.a |
||
28 | |||
29 | # VXI scope connection variables, Scope DAQ library variables |
||
30 | VXIDIR = ./vxi11_$(OSTYPE) |
||
31 | #VXI_FILES = $(VXIDIR)/vxi11_user.o $(VXIDIR)/vxi11.h $(VXIDIR)/vxi11_clnt.c $(VXIDIR)/vxi11_xdr.c |
||
32 | VXI_OBJECT = $(VXIDIR)/vxi11_user.o $(VXIDIR)/vxi11_clnt.o $(VXIDIR)/vxi11_xdr.o |
||
33 | # ----------------------------------------------------------------------------- |
||
34 | |||
35 | # Base rules ------------------------------------------------------------------ |
||
36 | |||
37 | # Make the main program and libraries |
||
38 | all: $(TARGET) libdaqusb.so libvxi11.so |
||
39 | |||
40 | # Rules for making the main program |
||
41 | $(TARGET): $(FILES) workstation.h daq.h library $(SHLIB) |
||
42 | @echo "Generating dictionary Dict.C..." |
||
43 | rootcint -f GuiDict.C -c $(INC) $(CPPFLAGS) windowed_test.h GuiLinkDef.h |
||
44 | $(CXX) $(INC) -fPIC -g -Wall $(FILES) GuiDict.C $(CPPFLAGS) $(VXI_OBJECT) -o $(TARGET) $(SHLIB) $(LIBS1) -lstdc++ -lSpectrum |
||
45 | # ----------------------------------------------------------------------------- |
||
46 | |||
47 | # CAMAC DAQ library rules ----------------------------------------------------- |
||
48 | |||
49 | # Rules for making CAMAC DAQ library source files (wusbxx_dll and libxxusb) |
||
50 | library: $(OBJ_FILES) |
||
51 | |||
52 | wusbxx_dll.o:wusbxx_dll.c wusbxx_dll.h |
||
53 | libxxusb.o: libxxusb.cpp libxxusb.h |
||
54 | |||
55 | .cc.o: |
||
56 | $(CXX) -fPIC -c $< |
||
57 | ar r $(LIBFILE) $@ |
||
58 | |||
59 | .cpp.o: |
||
60 | $(CXX) -fPIC -c $< |
||
61 | ar r $(LIBFILE) $@ |
||
62 | |||
63 | .c.o: |
||
64 | $(CXX) -fPIC -c $< |
||
65 | ar r $(LIBFILE) $@ |
||
66 | |||
67 | # Rules for recreating the CAMAC DAQ libraries even if they exist (libdaqusb.so/.a) |
||
68 | relib: |
||
69 | rm -f libdaqusb.so libdaqusb.a libvxi11.so libvxi11.a |
||
70 | make libdaqusb.so libvxi11.so |
||
71 | |||
72 | # Rule for making the CAMAC DAQ library (libdaqusb.so) |
||
73 | libdaqusb.so: $(DAQFILE) $(LIBFILE) |
||
74 | @echo "Generating dictionary Dict.C..." |
||
75 | rootcint -f Dict.C -c $(INC) $(CPPFLAGS) $(HEADER) GuiLinkDef.h |
||
76 | $(CXX) $(CPPFLAGS) $(INC) -fPIC -g -Wall $(DAQFILE) Dict.C $(CAMLIB) -shared -o $@ |
||
77 | |||
78 | # Rule for making the CAMAC DAQ library (libdaqusb.a) |
||
79 | $(LIBFILE): $(OBJ_FILES) |
||
80 | ar r $@ $^ |
||
81 | # ----------------------------------------------------------------------------- |
||
82 | |||
83 | # Scope DAQ library rules ----------------------------------------------------- |
||
84 | |||
85 | libvxi11.so: libvxi11.a |
||
86 | @echo "Generating dictionary VxiDict.C..." |
||
87 | rootcint -f VxiDict.C -c $(INC) $(CPPFLAGS) daqscope.h GuiLinkDef.h |
||
88 | $(CXX) $(CPPFLAGS) $(INC) -fPIC -g -Wall daqscope.C VxiDict.C -L. libvxi11.a -shared -o $@ |
||
89 | |||
90 | libvxi11.a: $(VXI_OBJECT) |
||
91 | ar r $@ $^ |
||
92 | # ----------------------------------------------------------------------------- |
||
93 | |||
94 | # Clean rule ------------------------------------------------------------------ |
||
95 | |||
96 | # Rule for cleaning the installation |
||
97 | clean: |
||
98 | rm -f Dict.C Dict.h GuiDict.C GuiDict.h windowed_test windowed_test_C.d windowed_test_C.so curpos.txt curvolt.txt workstation.h VxiDict.C VxiDict.h daqscope.C daqusb.C start.sh usb.h libxxusb.h libdaqusb.a libdaqusb.so libvxi11.a libvxi11.so *.o finish_sig.txt |
||
99 | # ----------------------------------------------------------------------------- |