Added Markdown to HACKING file

This commit is contained in:
Hidde Wieringa 2016-04-08 11:02:40 +02:00
parent 291f70edee
commit 1f68888020
No known key found for this signature in database
GPG key ID: 014B9FCF5F3BFA95
2 changed files with 37 additions and 24 deletions

View file

@ -15,41 +15,54 @@ Here are some directions to get you started:
Helper script to get some uniformity in the style: Helper script to get some uniformity in the style:
$ make style $ make style
If you use vim see the "Vim: How to prevent trailing whitespaces" If you use vim see the [Vim: How to prevent trailing whitespaces](http://www.carbon-project.org/Vim__How_to_prevent_trailing_whitespaces.html).
http://www.carbon-project.org/Vim__How_to_prevent_trailing_whitespaces.html
2. Chase warnings: no warning should be introduced by your changes 2. Chase warnings: no warning should be introduced by your changes
Depending what you touch, you can check with: Depending what you touch, you can check with:
2.1 When using autotools 2.1 When using autotools
$ autoreconf -Wall -vis
$ autoreconf -Wall -vis
2.2 When compiling 2.2 When compiling
2.2.1 Using extra flags: 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 \ $ export CFLAGS="-Wall -g -O2 -Wextra -pipe -funsigned-char -fstrict-aliasing \
-Wuninitialized -Wpointer-arith -Wredundant-decls -Winline -Wformat \ -Wchar-subscripts -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wunused \
-Wformat-security -Wswitch-enum -Winit-self -Wmissing-include-dirs \ -Wuninitialized -Wpointer-arith -Wredundant-decls -Winline -Wformat \
-Wmissing-prototypes -Wstrict-prototypes -Wold-style-definition \ -Wformat-security -Wswitch-enum -Winit-self -Wmissing-include-dirs \
-Wbad-function-cast -Wnested-externs -Wmissing-declarations" -Wmissing-prototypes -Wstrict-prototypes -Wold-style-definition \
$ ./configure -Wbad-function-cast -Wnested-externs -Wmissing-declarations"
$ make clean $ ./configure
$ make $ make clean
$ make
2.2.2 Using clang: 2.2.2 Using clang:
You can use same CFLAGS but also "-Wunreachable-code"
$ scan-build ./configure You can use same CFLAGS but also `-Wunreachable-code`
$ make clean
$ scan-build make $ scan-build ./configure
2.2.3 Using cppcheck (v1.58 or higher): $ make clean
$ make cppcheck $ scan-build make
2.2.3 Using `cppcheck` (v1.58 or higher):
$ make cppcheck
2.3 When Debianizing 2.3 When Debianizing
$ lintian --info --display-info --display-experimental *deb
or (shorter version) $ lintian --info --display-info --display-experimental *deb
$ lintian -iIE *deb or (shorter version)
$ lintian -iIE *deb
3. Preserve cross-platform compatility 3. Preserve cross-platform compatility
The source code should remain compilable across various platforms, The source code should remain compilable across various platforms,
including some you probably cannot test alone so keep it in mind. including some you probably cannot test alone so keep it in mind.
Supported platforms: Supported platforms:
- Linux - Linux
- FreeBSD - FreeBSD
- Mac OS X - Mac OS X
- Windows with Mingw - Windows with MinGW

View file

@ -40,8 +40,8 @@ path, this is optional during installation of CMake):
- Now it is possible to run CMake and mingw32-make: - Now it is possible to run CMake and mingw32-make:
C:\dev\libnfc-read-only> mkdir ..\libnfc-build C:\dev\libnfc-read-only> mkdir ..\libnfc-build
C:\dev\libnfc-read-only> cd ..\libnfc-build C:\dev\libnfc-read-only> cd ..\libnfc-build
C:\dev\libnfc-build> cmake-gui . C:\dev\libnfc-build> cmake-gui .
Now you can configure the build. Press "Configure", specify "MinGW32 Makefiles" Now you can configure the build. Press "Configure", specify "MinGW32 Makefiles"
and then you have the opportunity to set some configuration variables. If you and then you have the opportunity to set some configuration variables. If you