allow to cross-compile 32 and 64 bit dlls using MinGW
This commit is contained in:
parent
45ff2ddf19
commit
4903258749
2 changed files with 16 additions and 1 deletions
|
@ -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")
|
||||
|
|
15
README.md
15
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:
|
||||
|
|
Loading…
Reference in a new issue