Permalink
Browse files

Makefileanpassungen fuer die statische Codeanalyse

  • Loading branch information...
ingo ingo
ingo authored and ingo committed Nov 22, 2017
1 parent 71248c8 commit c6643d0682315683d464eecc41cab5f4fb2bc707
Showing with 50 additions and 63 deletions.
  1. +9 −10 Makefile
  2. +9 −10 check_hcan/Makefile
  3. BIN check_hcan/check_hcan
  4. +12 −15 hcandq/Makefile
  5. +11 −14 hcanswd/Makefile
  6. +9 −14 libhcandata/Makefile
View
@@ -23,7 +23,6 @@ include ./ARCH.inc
alles:
make clean
make dep
make all
make install
make tools xx="sudo make all"
@@ -37,10 +36,7 @@ clean:
make firmwareOhneEds xx="sudo make clean"
make tools xx="sudo make clean"
#
sudo find -type f -name ".depend" | xargs rm -f
dep:
make cppDienste xx="sudo make dep"
@#sudo find -type f -name ".depend" | xargs rm -f
all:
make strukturen xx="make all"
@@ -60,8 +56,11 @@ install:
staticAnalyse:
make cDienste xx="scan-build -o ./scanBuild make all -j4"
make cppDienste xx="scan-build -o ./scanBuild make allSrc -j4"
@# avr-clang notwendig: make firmware xx="scan-build -o ./scanBuild make all -j4"
@# allSrc fuer alle umsetzen: make cppDienste xx="scan-build -o ./scanBuild make allSrc -j4"
staticAnalyseClean:
sudo find -type f -name "scanBuild" | xargs rm -f
strukturen:
cd xml; $(xx)
@@ -75,10 +74,10 @@ cDienste:
cppDienste:
cd libhcan++; $(xx)
cd telican; $(xx)
cd libhcandata; test -d .depend || sudo echo "" > .depend; $(xx)
cd check_hcan; test -d .depend || sudo echo "" > .depend; $(xx)
cd hcanswd; test -d .depend || sudo echo "" > .depend; $(xx)
cd hcandq; test -d .depend || sudo echo "" > .depend; $(xx)
cd libhcandata; $(xx)
cd check_hcan; $(xx)
cd hcanswd; $(xx)
cd hcandq; $(xx)
firmware:
cd hcanbl; $(xx) $(parm2)
View
@@ -1,16 +1,19 @@
# check_hcan
#
.PHONY: libhcan++
TARGET = check_hcan
OBJ = main.o
SRC = main.cc
LD_FLAGS = -Wl,--export-dynamic -L ../libhcan++ \
-lhcan++ -lboost_program_options -lboost_regex \
`pkg-config libxml++-2.6 --libs` -fPIC
CXX = g++
INC = -I. -I.. -I../libhcan++ -I../include
CXXFLAGS = -Wall -O2 $(INC)
CXXFLAGS = -Wall -O2
CXXFLAGS += -I. -I.. -I../libhcan++ -I../include
CXXFLAGS += -Werror
all: libhcan++ $(TARGET)
@@ -22,19 +25,15 @@ libhcan++:
$(TARGET): $(OBJ) libhcan++
$(CXX) -o $@ $(OBJ) $(LD_FLAGS)
allSrc:
$(CXX) $(CXXFLAGS) -o $(SRC) -o $(TARGET) $(LD_FLAGS)
clean:
rm -f *.o
rm -f *.o $(TARGET)
cd ../libhcan++ && make clean
ctags:
ctags *.cc *.h ../libhcan++/*.cc ../libhcan++/*.h
install:
#strip ./$(TARGET)
install $(TARGET) /usr/bin
dep:
(for i in *.cc; do echo; $(CXX) -M -MG $(INC) $$i; done) > .depend
include .depend
View
BIN -146 KB check_hcan/check_hcan
Binary file not shown.
View
@@ -1,19 +1,21 @@
# hcandq
#
.PHONY: libhcan++ libhcandata
TARGET = hcandq
OBJ = main.o
SRC = main.cc
LD_FLAGS = -Wl,--export-dynamic \
-L ../libhcandata -lhcandata \
-L ../libhcan++ -lhcan++ \
-lboost_program_options \
-lboost_regex \
-L ../libhcandata -lhcandata -L ../libhcan++ -lhcan++ \
-lboost_program_options -lboost_regex \
`pkg-config libxml++-2.6 --libs`
CXX = g++
INC = -I. -I.. -I../libhcan++ -I../libhcandata -I../include
CXXFLAGS = -Wall -Werror -O2 $(INC) -g
CXXFLAGS = -Wall -Werror -O2
CXXFLAGS += -I. -I.. -I../libhcan++ -I../libhcandata -I../include
CXXFLAGS += -g
all: libhcan++ libhcandata $(TARGET)
@@ -27,19 +29,14 @@ libhcandata:
$(TARGET): $(OBJ) libhcan++ libhcandata
$(CXX) -o $@ $(OBJ) $(LD_FLAGS)
allSrc:
$(CXX) $(CXXFLAGS) -o $(SRC) -o $(TARGET) $(LD_FLAGS)
clean:
rm -f *.o
sudo rm -f ./$(TARGET)
ctags:
ctags *.cc *.h ../libhcan++/*.cc ../libhcan++/*.h ../libhcandata/*.cc ../libhcandata/*.h
sudo rm -f $(TARGET)
install:
strip $(TARGET)
sudo install $(TARGET) /usr/bin
dep:
(for i in *.cc; do echo; $(CXX) -M -MG $(INC) $$i; done) > .depend
include .depend
View
@@ -1,19 +1,21 @@
# hcanswd
#
PHONY: libhcan++ libhcandata
TARGET = hcanswd
OBJ = main.o
SRC = main.cc
LD_FLAGS = -Wl,--export-dynamic \
-L ../libhcandata -lhcandata \
-L ../libhcan++ -lhcan++ \
-lboost_program_options \
-lboost_regex \
-L ../libhcandata -lhcandata -L ../libhcan++ -lhcan++ \
-lboost_program_options -lboost_regex \
`pkg-config libxml++-2.6 --libs`
CXX = g++
INC = -I. -I.. -I../libhcan++ -I../libhcandata -I../include
CXXFLAGS = -Wall -Werror -O2 $(INC) -g
CXXFLAGS = -Wall -Werror -O2
CXXFLAGS += -I. -I.. -I../libhcan++ -I../libhcandata -I../include
CXXFLAGS += -g
all: libhcan++ libhcandata $(TARGET)
@@ -27,18 +29,13 @@ libhcandata:
$(TARGET): $(OBJ) libhcan++ libhcandata
$(CXX) -o $@ $(OBJ) $(LD_FLAGS)
allSrc:
$(CXX) $(CXXFLAGS) -o $(SRC) -o $(TARGET) $(LD_FLAGS)
clean:
rm -f *.o $(TARGET)
ctags:
ctags *.cc *.h ../libhcan++/*.cc ../libhcan++/*.h ../libhcandata/*.cc ../libhcandata/*.h
install:
# strip ./$(TARGET)
sudo install ./$(TARGET) /usr/sbin
dep:
(for i in *.cc; do echo; $(CXX) -M -MG $(INC) $$i; done) > .depend
include .depend
View
@@ -1,5 +1,9 @@
# libhcandata
#
TARGET = libhcandata
OBJ = file_format_v1.o data_file_writer.o data_storage.o data_file.o data_query.o
SRC = $(patsubst %.cc, %.cc , $(wildcard *.cc))
OBJ = $(patsubst %.cc,%.o,$(wildcard *.cc))
CXX = clang
@@ -16,23 +20,14 @@ install:
$(TARGET).so: $(OBJ)
$(CXX) -shared -o $@ -Wl,-soname,$(TARGET).so $(OBJ)
$(TARGET).a: $(OBJ)
$(ARXX) rcs $@ $(OBJ)
$(OBJ): %.o:%.cc
$(CXX) $(CXXFLAGS) -o $@ -c $<
allSrc:
$(CXX) $(CXXFLAGS) -o $(SRC) -shared -o $(TARGET).so -fPIC -Wl,-soname,$(TARGET).so -Wl,-Map=$(TARGET).map
clean:
sudo rm -f *.o ./$(TARGET).*
ctags:
ctags *.cc *.h
dep:
(for i in *.cc; do echo; $(CXX) -M -MG $(INC) $$i; done) > .depend
sudo rm -f *.o $(TARGET).*
doc:
doxygen
include .depend

0 comments on commit c6643d0

Please sign in to comment.