1 | #
|
---|
2 | # Makefile for the DRS DAQ
|
---|
3 | #
|
---|
4 | # Compiled and streamlined from original makefiles - O. Grimm, Nov 2008
|
---|
5 | # Use the VMECTRL flag to switch between different VME controllers: -DCT_VME
|
---|
6 | # for Concurrent Technologies, -DSTRUCK_VME for Struck
|
---|
7 |
|
---|
8 | VMECTRL = -DCT_VME
|
---|
9 |
|
---|
10 | CC = g++ # Compiler to use
|
---|
11 |
|
---|
12 | SOURCES = HVFeedback.cc DAQReadout.cc RawDataCTX.cc SlowData.cc ../pixelmap/Pixel.cc ../pixelmap/PixelMap.cc DRS/DRS.cc DRS/mxml.c DRS/strlcpy.c drsdaq.cpp
|
---|
13 | OBJECTS = $(addsuffix .o, $(basename $(SOURCES)))
|
---|
14 | INCDIRS = -I. -IDRS -I../pixelmap
|
---|
15 |
|
---|
16 | REVISION = $(shell svnversion -n)
|
---|
17 |
|
---|
18 | ifeq ($(VMECTRL),-DCT_VME)
|
---|
19 | VMELIB = -L./VME/atlas/lib -lvme_rcc -lcmem_rcc -lrcc_time_stamp
|
---|
20 | INCDIRS := $(INCDIRS) -I./VME/atlas/include/
|
---|
21 | else
|
---|
22 | VMELIB = -L./VME/struck
|
---|
23 | INCDIRS := $(INCDIRS) -I./VME/struck/
|
---|
24 | OBJECTS := $(OBJECTS) ./VME/struck/sis3100.o ./VME/struck/sis3100_vme_calls.o
|
---|
25 | endif
|
---|
26 |
|
---|
27 | CPPFLAGS = -DREVISION='"$(REVISION)"' -Wl,-rpath,VME/atlas/lib -O3 -Wall $(VMECTRL)
|
---|
28 | LIBS = -lstdc++ -lz -lpthread -lutil -lfl -lreadline -ltermcap $(VMELIB)
|
---|
29 |
|
---|
30 | drsdaq: $(OBJECTS)
|
---|
31 | $(CC) $(CPPFLAGS) -o $@ $(OBJECTS) $(LIBS)
|
---|
32 |
|
---|
33 | clean:
|
---|
34 | @rm -f $(OBJECTS)
|
---|
35 | @rm -f *.d
|
---|
36 | @rm -f *~
|
---|
37 |
|
---|
38 | -include Dep.d
|
---|
39 |
|
---|
40 | # Implicit rules
|
---|
41 |
|
---|
42 | %.o : %.c
|
---|
43 | $(CC) $(CPPFLAGS) $(INCDIRS) -c -o $@ $<
|
---|
44 | %.o : %.cc
|
---|
45 | $(CC) $(CPPFLAGS) $(INCDIRS) -c -o $@ $<
|
---|
46 | %.o : %.cpp
|
---|
47 | $(CC) $(CPPFLAGS) $(INCDIRS) -c -o $@ $<
|
---|
48 | %.d :
|
---|
49 | @echo "Generating dependencies" $@
|
---|
50 | @$(CC) -MM $(SOURCES) $(INCDIRS) \
|
---|
51 | | sed 's/^\(.*\).o:/$@ \1.o:/' > $@
|
---|