CXX = g++ --std=c++11
LDXX = g++
+CPPCHECK = cppcheck -q --std=c++11 \
+ --enable=warning,style,performance,portability,unusedFunction,missingInclude \
+ --error-exitcode=1
LIBS = sdl2 SDL2_image SDL2_net SDL2_ttf glew openal freealut zlib
@echo run: codecov.io
@bash -c 'bash <(curl -s https://codecov.io/bash) -Z'
+lint:
+ @echo lint: source
+ @$(CPPCHECK) $(SOURCE_DIR)
+ @echo lint: tests
+ @$(CPPCHECK) -I $(SOURCE_DIR) $(TEST_SRC_DIR)
+
clean:
rm -f $(OBJ)
rm -f $(DEP)
rm -f $(BIN) cachegrind.out.* callgrind.out.*
rm -Rf build client-saves saves
-.PHONY: all release cover debug profile tests run gdb cachegrind callgrind test coverage codecov clean distclean
+.PHONY: all release cover debug profile tests run gdb cachegrind callgrind test coverage codecov lint clean distclean
-include $(DEP)
GLEW, GLM, SDL2, SDL2_image, SDL2_net, SDL2_ttf, OpenAL, freealut, zlib
CppUnit for tests
+ Cppcheck for linting
-archlinux: pacman -S glew glm sdl2 sdl2_image sdl2_net sdl2_ttf openal freealut zlib cppunit
-debian: apt-get install libglew-dev libglm-dev libsdl2-dev libsdl2-image-dev libsdl2-net-dev libsdl2-ttf-dev libopenal-dev libalut-dev zlib1g-dev libcppunit-dev
+archlinux: pacman -S \
+ glew glm sdl2 sdl2_image sdl2_net sdl2_ttf openal freealut zlib \
+ cppunit cppcheck
+
+debian: apt install \
+ libglew-dev libglm-dev libsdl2-dev libsdl2-image-dev libsdl2-net-dev \
+ libsdl2-ttf-dev libopenal-dev libalut-dev zlib1g-dev \
+ libcppunit-dev cppcheck
-debian (jessie): apt-get install libglew-dev libglm-dev libsdl2-dev libsdl2-image-dev libsdl2-net-dev libsdl2-ttf-dev libopenal-dev libalut-dev zlib1g-dev libcppunit-dev
(!) you may have to build the tests with CPPFLAGS=-D_GLIBCXX_USE_CXX11_ABI=0
-centos (7): yum install glew-devel glm-devel SDL2-devel SDL2_image-devel SDL2_net-devel SDL2_ttf-devel openal-soft-devel freealut-devel zlib-devel cppunit-devel
+centos: yum install \
+ glew-devel glm-devel SDL2-devel SDL2_image-devel SDL2_net-devel \
+ SDL2_ttf-devel openal-soft-devel freealut-devel zlib-devel \
+ cppunit-devel cppcheck
+
(!) you need the "epel" repository for SDL2 et al. `yum install epel-release`
manual:
+ Cppcheck: http://cppcheck.sourceforge.net/
CppUnit http://sourceforge.net/projects/cppunit/
GLEW http://glew.sourceforge.net/
GLM http://glm.g-truc.net/0.9.6/index.html
GLEW, GLM, SDL2, SDL2_image, SDL2_net, SDL2_ttf, OpenAL, freealut, zlib
archlinux:
- pacman -S glew glm sdl2 sdl2_image sdl2_net sdl2_ttf openal freealut zlib
+ pacman -S \
+ glew glm sdl2 sdl2_image sdl2_net sdl2_ttf openal freealut zlib
-debian (jessie):
- apt install --no-install-recommends libglew1.10 libglu1-mesa libsdl2-2.0-0 libsdl2-image-2.0-0 libsdl2-net-2.0-0 libsdl2-ttf-2.0-0 libopenal1 libalut0 zlib1g
+debian:
+ apt install --no-install-recommends \
+ libglew1.10 libglu1-mesa libsdl2-2.0-0 libsdl2-image-2.0-0 \
+ libsdl2-net-2.0-0 libsdl2-ttf-2.0-0 libopenal1 libalut0 zlib1g
-centos (7):
- yum install glew SDL2 SDL2_image SDL2_net SDL2_ttf openal-soft freealut zlib
+centos:
+ yum install \
+ glew SDL2 SDL2_image SDL2_net SDL2_ttf openal-soft freealut zlib
Arguments
=========
FROM rafaelsoares/archlinux-devel
RUN sudo pacman -S --noconfirm \
+ cppcheck \
cppunit \
freealut \
git \
&& yum -y update \
&& yum -y group install "Development Tools"
RUN yum -y install \
+ cppcheck \
cppunit-devel \
freealut-devel \
glew-devel \
RUN apt update \
&& apt -y install build-essential
RUN apt -y install --no-install-recommends \
+ cppcheck \
libalut-dev \
libcppunit-dev \
libglew-dev \
RUN apt update \
&& apt -y install build-essential
RUN apt -y install --no-install-recommends \
+ cppcheck \
libalut-dev \
libcppunit-dev \
libglew-dev \
RUN apt update \
&& apt -y install build-essential
RUN apt -y install --no-install-recommends \
+ cppcheck \
libalut-dev \
libcppunit-dev \
libglew-dev \
RUN apt update \
&& apt -y install build-essential
RUN apt -y install --no-install-recommends \
+ cppcheck \
libalut-dev \
libcppunit-dev \
libglew-dev \