diff --git a/HACKING.md b/HACKING.md index 56930af..da1b244 100644 --- a/HACKING.md +++ b/HACKING.md @@ -15,41 +15,54 @@ Here are some directions to get you started: Helper script to get some uniformity in the style: $ make style - If you use vim see the "Vim: How to prevent trailing whitespaces" - http://www.carbon-project.org/Vim__How_to_prevent_trailing_whitespaces.html + If you use vim see the [Vim: How to prevent trailing whitespaces](http://www.carbon-project.org/Vim__How_to_prevent_trailing_whitespaces.html). 2. Chase warnings: no warning should be introduced by your changes Depending what you touch, you can check with: + 2.1 When using autotools - $ autoreconf -Wall -vis + + $ autoreconf -Wall -vis + 2.2 When compiling + 2.2.1 Using extra flags: - $ export CFLAGS="-Wall -g -O2 -Wextra -pipe -funsigned-char -fstrict-aliasing \ - -Wchar-subscripts -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wunused \ - -Wuninitialized -Wpointer-arith -Wredundant-decls -Winline -Wformat \ - -Wformat-security -Wswitch-enum -Winit-self -Wmissing-include-dirs \ - -Wmissing-prototypes -Wstrict-prototypes -Wold-style-definition \ - -Wbad-function-cast -Wnested-externs -Wmissing-declarations" - $ ./configure - $ make clean - $ make + + $ export CFLAGS="-Wall -g -O2 -Wextra -pipe -funsigned-char -fstrict-aliasing \ + -Wchar-subscripts -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wunused \ + -Wuninitialized -Wpointer-arith -Wredundant-decls -Winline -Wformat \ + -Wformat-security -Wswitch-enum -Winit-self -Wmissing-include-dirs \ + -Wmissing-prototypes -Wstrict-prototypes -Wold-style-definition \ + -Wbad-function-cast -Wnested-externs -Wmissing-declarations" + $ ./configure + $ make clean + $ make + 2.2.2 Using clang: - You can use same CFLAGS but also "-Wunreachable-code" - $ scan-build ./configure - $ make clean - $ scan-build make - 2.2.3 Using cppcheck (v1.58 or higher): - $ make cppcheck + + You can use same CFLAGS but also `-Wunreachable-code` + + $ scan-build ./configure + $ make clean + $ scan-build make + + 2.2.3 Using `cppcheck` (v1.58 or higher): + + $ make cppcheck + 2.3 When Debianizing - $ lintian --info --display-info --display-experimental *deb - or (shorter version) - $ lintian -iIE *deb + + $ lintian --info --display-info --display-experimental *deb + or (shorter version) + $ lintian -iIE *deb 3. Preserve cross-platform compatility + The source code should remain compilable across various platforms, including some you probably cannot test alone so keep it in mind. Supported platforms: + - Linux - FreeBSD - Mac OS X - - Windows with Mingw + - Windows with MinGW diff --git a/README-Windows.md b/README-Windows.md index 2f3a254..8b22bf2 100644 --- a/README-Windows.md +++ b/README-Windows.md @@ -40,8 +40,8 @@ path, this is optional during installation of CMake): - Now it is possible to run CMake and mingw32-make: C:\dev\libnfc-read-only> mkdir ..\libnfc-build - C:\dev\libnfc-read-only> cd ..\libnfc-build - C:\dev\libnfc-build> cmake-gui . + C:\dev\libnfc-read-only> cd ..\libnfc-build + C:\dev\libnfc-build> cmake-gui . Now you can configure the build. Press "Configure", specify "MinGW32 Makefiles" and then you have the opportunity to set some configuration variables. If you