source: drsdaq/Makefile@ 23

Last change on this file since 23 was 22, checked in by ogrimm, 16 years ago
First commit of drsdaq 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
10#CC = g++ # Compiler to use
11
12SOURCES = HVFeedback.cc DAQReadout.cc RawDataCTX.cc ../pixelmap/Pixel.cc ../pixelmap/PixelMap.cc DRS/DRS.cc DRS/mxml.c DRS/strlcpy.c drsdaq.cpp
13OBJECTS = $(addsuffix .o, $(basename $(SOURCES)))
14
15SOBJECTS = RawDataCTX
16INCDIRS = -I. -IDRS -I../pixelmap
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
27CFLAGS = -pipe -fthread-jumps -funroll-all-loops -O3 -Wall -DOS_LINUX
28CPPFLAGS = -pipe -fPIC -fthread-jumps -funroll-all-loops -O3 -Wall -DOS_LINUX $(VMECTRL)
29LIBS = -lstdc++ -lz -lpthread -lutil -lfl $(VMELIB)
30
31drsdaq: $(OBJECTS)
32 $(CC) $(CPPFLAGS) -o $@ $(OBJECTS) $(LIBS)
33 $(CC) -shared -Wl,-soname,$(SOBJECTS).so -o $(SOBJECTS).so $(SOBJECTS).o -lc
34
35clean:
36 @rm -f $(OBJECTS) $(SOBJECTS).so
37 @rm -f *.d
38 @rm -f *~
39
40-include Dep.d
41
42# Implicit rules
43
44%.o : %.c
45 $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $<
46%.o : %.cc
47 $(CC) $(CPPFLAGS) $(INCDIRS) -c -o $@ $<
48%.o : %.cpp
49 $(CC) $(CPPFLAGS) $(INCDIRS) -c -o $@ $<
50%.d :
51 @echo "Generating dependencies" $@
52 @$(CC) -MM $(SOURCES) $(INCDIRS) \
53 | sed 's/^\(.*\).o:/$@ \1.o:/' > $@
Note: See TracBrowser for help on using the repository browser.