-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathxmake.lua
More file actions
44 lines (36 loc) · 1.14 KB
/
Copy pathxmake.lua
File metadata and controls
44 lines (36 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
add_rules('mode.debug', 'mode.release')
add_requires('libnfc')
set_version('0.1.0')
option('crapto1')
set_default(false)
set_showmenu(true)
set_description('Enable crapto1 support, you must comply with the GPLv3 license.')
option('examples')
set_default(false)
set_showmenu(true)
set_description('Build examples.')
target('nfc-extra')
set_kind('headeronly')
add_headerfiles('src/nfc-extra/*.h', {prefixdir = 'nfcpp', rootdir= 'src'})
if has_config('crapto1') then
target('crapto1')
set_kind('static')
set_languages('c99')
add_files('src/crapto1/*.c')
add_headerfiles('src/crapto1/*.h', {prefixdir = 'nfcpp', rootdir= 'src'})
end
target('nfcpp')
set_kind('headeronly')
add_headerfiles('src/*.hpp', {prefixdir = 'nfcpp', rootdir = 'src'})
add_packages('libnfc', {public = true})
add_deps('nfc-extra')
add_options('crapto1')
on_load(function (target)
if has_config('crapto1') then
target:add('deps', 'crapto1')
target:add('defines', 'NFCPP_ENABLE_CRAPTO1=1', {public = true})
end
end)
if has_config('examples') then
includes('examples')
end