Blame | Last modification | View Log | RSS feed
# Make variables ----------------------------------------------------# ROOT include and librariesROOTINC=$(shell root-config --incdir )ROOTLIB=$(shell root-config --libs )LIBS1=$(shell root-config --cflags --glibs )# Includes, 32 vs. 64 bit type, librariesINC=-I. -I$(ROOTINC)OSTYPE=noneLIBS=$(ROOTLIB) -L./ -lm# Source and debug prefixesSRC = .DBG =# CAMAC DAQ library variablesOBJ_FILES = wusbxx_dll.o libxxusb.oLIBFILE = libdaqusb.a# Specific variables for the main programTARGET = windowed_testDAQFILE = $(SRC)/daqusb.CFILES = $(SRC)/daqusb.C $(SRC)/windowed_test.C $(SRC)/daqscope.CHEADER = daq.h workstation.h root_include.h windowed_test.hCAMLIB = $(LIBFILE)SHLIB = $(LIBFILE) libvxi11.a# VXI scope connection variables, Scope DAQ library variablesVXIDIR = ./vxi11_$(OSTYPE)#VXI_FILES = $(VXIDIR)/vxi11_user.o $(VXIDIR)/vxi11.h $(VXIDIR)/vxi11_clnt.c $(VXIDIR)/vxi11_xdr.cVXI_OBJECT = $(VXIDIR)/vxi11_user.o $(VXIDIR)/vxi11_clnt.o $(VXIDIR)/vxi11_xdr.o# -----------------------------------------------------------------------------# Base rules ------------------------------------------------------------------# Make the main program and librariesall: $(TARGET) libdaqusb.so libvxi11.so# Rules for making the main program$(TARGET): $(FILES) workstation.h daq.h library $(SHLIB)@echo "Generating dictionary Dict.C..."rootcint -f GuiDict.C -c $(INC) $(CPPFLAGS) windowed_test.h GuiLinkDef.h$(CXX) $(INC) -fPIC -g -Wall $(FILES) GuiDict.C $(CPPFLAGS) $(VXI_OBJECT) -o $(TARGET) $(SHLIB) $(LIBS1) -lstdc++ -lSpectrum# -----------------------------------------------------------------------------# CAMAC DAQ library rules -----------------------------------------------------# Rules for making CAMAC DAQ library source files (wusbxx_dll and libxxusb)library: $(OBJ_FILES)wusbxx_dll.o:wusbxx_dll.c wusbxx_dll.hlibxxusb.o: libxxusb.cpp libxxusb.h.cc.o:$(CXX) -fPIC -c $<ar r $(LIBFILE) $@.cpp.o:$(CXX) -fPIC -c $<ar r $(LIBFILE) $@.c.o:$(CXX) -fPIC -c $<ar r $(LIBFILE) $@# Rules for recreating the CAMAC DAQ libraries even if they exist (libdaqusb.so/.a)relib:rm -f libdaqusb.so libdaqusb.a libvxi11.so libvxi11.amake libdaqusb.so libvxi11.so# Rule for making the CAMAC DAQ library (libdaqusb.so)libdaqusb.so: $(DAQFILE) $(LIBFILE)@echo "Generating dictionary Dict.C..."rootcint -f Dict.C -c $(INC) $(CPPFLAGS) $(HEADER) GuiLinkDef.h$(CXX) $(CPPFLAGS) $(INC) -fPIC -g -Wall $(DAQFILE) Dict.C $(CAMLIB) -shared -o $@# Rule for making the CAMAC DAQ library (libdaqusb.a)$(LIBFILE): $(OBJ_FILES)ar r $@ $^# -----------------------------------------------------------------------------# Scope DAQ library rules -----------------------------------------------------libvxi11.so: libvxi11.a@echo "Generating dictionary VxiDict.C..."rootcint -f VxiDict.C -c $(INC) $(CPPFLAGS) daqscope.h GuiLinkDef.h$(CXX) $(CPPFLAGS) $(INC) -fPIC -g -Wall daqscope.C VxiDict.C -L. libvxi11.a -shared -o $@libvxi11.a: $(VXI_OBJECT)ar r $@ $^# -----------------------------------------------------------------------------# Clean rule ------------------------------------------------------------------# Rule for cleaning the installationclean: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# -----------------------------------------------------------------------------