File tree Expand file tree Collapse file tree 1 file changed +21
-3
lines changed Expand file tree Collapse file tree 1 file changed +21
-3
lines changed Original file line number Diff line number Diff line change
1
+ # Build and install Cppcheck inside w64devkit
2
+ #
3
+ # Invoke in a Cppcheck source tree:
4
+ # $ make -j$(nproc) -f path/to/cppcheck.mak install
5
+ #
6
+ # Alternatively, use the default target and run it in place in the
7
+ # source tree without installing.
8
+
1
9
ext := $(shell find externals -mindepth 1 -type d)
2
10
src := $(shell find cli lib externals -name '* .cpp')
3
11
obj := $(src:.cpp=.o )
4
- CXXFLAGS := -w -Os -Ilib $(addprefix -I,$(ext ) )
12
+ CXXFLAGS := -w -O2 -Ilib $(addprefix -I,$(ext ) )
13
+
5
14
cppcheck.exe : $(obj )
6
15
$(CXX ) -s -o $@ $(obj ) -lshlwapi
7
- cppcheck : $(obj )
8
- $(CXX ) -pthread -s -o $@ $(obj )
16
+
17
+ install : cppcheck.exe
18
+ mkdir -p " $$ W64DEVKIT_HOME" /share/cppcheck
19
+ cp -r cppcheck.exe cfg/ " $$ W64DEVKIT_HOME" /share/cppcheck/
20
+ $(CC ) -DEXE=../share/cppcheck/cppcheck.exe -DCMD=cppcheck \
21
+ -Oz -s -nostartfiles -o " $$ W64DEVKIT_HOME" /bin/cppcheck.exe \
22
+ " $$ W64DEVKIT_HOME" /src/alias.c
23
+
24
+ uninstall :
25
+ rm -rf " $$ W64DEVKIT_HOME" /share/cppcheck/ \
26
+ " $$ W64DEVKIT_HOME" /bin/cppcheck.exe
You can’t perform that action at this time.
0 commit comments