source: drsdaq/Makefile@ 5516

Last change on this file since 5516 was 269, checked in by ogrimm, 14 years ago
First commit of separated Feedback program
File size: 1.5 KB
Line 
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
8VMECTRL = -DCT_VME
9
10CC = g++ # Compiler to use
11
12SOURCES = DAQReadout.cc RawDataCTX.cc ../pixelmap/Pixel.cc ../pixelmap/PixelMap.cc DRS/DRS.cc DRS/mxml.c DRS/strlcpy.c drsdaq.cpp ../Evidence/Evidence.cc
13OBJECTS = $(addsuffix .o, $(basename $(SOURCES)))
14INCDIRS = -I. -IDRS -I../pixelmap -I../Evidence -I$(DIMDIR)/dim
15
16REVISION = $(shell svnversion -n)
17
18ifeq ($(VMECTRL),-DCT_VME)
19 VMELIB = -L./VME/atlas/lib -lvme_rcc -lcmem_rcc -lrcc_time_stamp
20 INCDIRS := $(INCDIRS) -I./VME/atlas/include/
21else
22 VMELIB = -L./VME/struck
23 INCDIRS := $(INCDIRS) -I./VME/struck/
24 OBJECTS := $(OBJECTS) ./VME/struck/sis3100.o ./VME/struck/sis3100_vme_calls.o
25endif
26
27CPPFLAGS = -DREVISION='"$(REVISION)"' -O3 -Wall $(VMECTRL)
28LIBS = -lstdc++ -lz -lpthread -lutil -lfl -lreadline -ltermcap $(VMELIB) $(DIMDIR)/linux/libdim.a
29
30drsdaq: $(OBJECTS)
31 $(CC) $(CPPFLAGS) -Wl,-rpath,VME/atlas/lib -o $@ $(OBJECTS) $(LIBS)
32
33clean:
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:/' > $@
Note: See TracBrowser for help on using the repository browser.