mirror of
https://github.com/skeeto/w64devkit.git
synced 2025-07-30 04:03:05 +03:00
If someone has their heart set on Cppcheck, this makes it even easier to install just as it used to be distributed.
27 lines
909 B
Makefile
27 lines
909 B
Makefile
# Build and install Cppcheck inside w64devkit
|
|
#
|
|
# Invoke in a Cppcheck source tree:
|
|
# $ make -j$(nproc) -f path/to/cppcheck.mak install
|
|
#
|
|
# Alternatively, use the default target and run it in place in the
|
|
# source tree without installing.
|
|
|
|
ext := $(shell find externals -mindepth 1 -type d)
|
|
src := $(shell find cli lib externals -name '*.cpp')
|
|
obj := $(src:.cpp=.o)
|
|
CXXFLAGS := -w -O2 -Ilib $(addprefix -I,$(ext))
|
|
|
|
cppcheck.exe: $(obj)
|
|
$(CXX) -s -o $@ $(obj) -lshlwapi
|
|
|
|
install: cppcheck.exe
|
|
mkdir -p "$$W64DEVKIT_HOME"/share/cppcheck
|
|
cp -r cppcheck.exe cfg/ "$$W64DEVKIT_HOME"/share/cppcheck/
|
|
$(CC) -DEXE=../share/cppcheck/cppcheck.exe -DCMD=cppcheck \
|
|
-Oz -s -nostartfiles -o "$$W64DEVKIT_HOME"/bin/cppcheck.exe \
|
|
"$$W64DEVKIT_HOME"/src/alias.c
|
|
|
|
uninstall:
|
|
rm -rf "$$W64DEVKIT_HOME"/share/cppcheck/ \
|
|
"$$W64DEVKIT_HOME"/bin/cppcheck.exe
|