diff --git a/CMakeLists.txt b/CMakeLists.txt index 0d32205..4757bc1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,7 +26,7 @@ ENDIF(WIN32) include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/) add_definitions("-DHAVE_CONFIG_H") -if(MINGW) +if(MINGW AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows") # force MinGW-w64 in 32bit mode add_definitions("-m32") add_definitions("-DNOCRYPT") diff --git a/README.md b/README.md index 0d9b05d..dce4145 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,9 @@ If you are new to _libfreefare_ or the _nfc-tools_, you should collect useful in | Mifare Application Directory (MAD) v3 | Supported (part of Mifare DESFire support) | # Installation + +## For *NIX systems + You can use released version (see **Download** section) or development version: First, ensure all dependencies are installed: @@ -63,6 +66,18 @@ You can now compile **libfreefare** the usual autotools way: make sudo make install ``` +## For Windows Systems + +### Requirements + +* cmake +* make +* mingw{32,64}-gcc + +### Building + + mingw64-cmake -DLIBNFC_INCLUDE_DIRS=/path/to/libnfc-source/include -DLIBNFC_LIBRARIES=/path/to/libnfc.dll + mingw64-make # Debug In order to debug using gdb, you should tune the CFLAGS: