Line | |
---|
1 | #
|
---|
2 | # Makefile for the FADctrl
|
---|
3 | #
|
---|
4 |
|
---|
5 | CC = g++
|
---|
6 |
|
---|
7 | SOURCES = FAD.cc FADctrl.cc FADBoard.cc ../Evidence/Evidence.cc
|
---|
8 | OBJECTS = $(addsuffix .o, $(basename $(SOURCES)))
|
---|
9 | INCDIRS = -I. -I../Evidence -I$(DIMDIR)/dim
|
---|
10 |
|
---|
11 | REVISION = $(shell svnversion -n)
|
---|
12 |
|
---|
13 | CPPFLAGS = -DREVISION='"$(REVISION)"' -O3 -Wall
|
---|
14 | LIBS = -L /usr/lib/termcap -lstdc++ -lz -lpthread -lreadline -ltermcap $(DIMDIR)/linux/libdim.a
|
---|
15 |
|
---|
16 | FADctrl: $(OBJECTS)
|
---|
17 | $(CC) $(CPPFLAGS) -o $@ $(OBJECTS) $(LIBS)
|
---|
18 |
|
---|
19 | clean:
|
---|
20 | @rm -f $(OBJECTS)
|
---|
21 | @rm -f *.d
|
---|
22 | @rm -f *~
|
---|
23 | @rm -f FADctrl
|
---|
24 |
|
---|
25 | -include Dep.d
|
---|
26 |
|
---|
27 | # Implicit rules
|
---|
28 |
|
---|
29 | %.o : %.c
|
---|
30 | $(CC) $(CPPFLAGS) $(INCDIRS) -c -o $@ $<
|
---|
31 | %.o : %.cc
|
---|
32 | $(CC) $(CPPFLAGS) $(INCDIRS) -c -o $@ $<
|
---|
33 | %.o : %.cpp
|
---|
34 | $(CC) $(CPPFLAGS) $(INCDIRS) -c -o $@ $<
|
---|
35 | %.d :
|
---|
36 | @echo "Generating dependencies" $@
|
---|
37 | @$(CC) -MM $(SOURCES) $(INCDIRS) \
|
---|
38 | | sed 's/^\(.*\).o:/$@ \1.o:/' > $@
|
---|
Note:
See
TracBrowser
for help on using the repository browser.