Created
February 10, 2014 05:26
-
-
Save tcr/8910788 to your computer and use it in GitHub Desktop.
Creating distributable, flattened static libraries for distribution with gyp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
cd out/ARM | |
node -e "console.log('CREATE ' + process.argv[1]); console.log('ADDLIB', 'obj/lib' + process.argv.slice(2).join('.a\nADDLIB obj/lib') + '.a'); console.log('SAVE\nEND')" $@ | |
node -e "console.log('CREATE ' + process.argv[1]); console.log('ADDLIB', 'obj/lib' + process.argv.slice(2).join('.a\nADDLIB obj/lib') + '.a'); console.log('SAVE\nEND')" $@ | arm-none-eabi-ar -M |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"targets": [ | |
{ | |
'target_name': 'flatlib', | |
'type': 'none', | |
'actions': [ | |
{ | |
'action_name': 'flatten', | |
'inputs': [ 'myfile.gyp' ], | |
'outputs': [ '<(PRODUCT_DIR)/lib<(_target_name).a' ], | |
'action': [ 'tools/dist_static_lib.sh', 'lib<(_target_name).a', '<@(_dependencies)' ], | |
} | |
], | |
'dependencies': [ | |
# what i have to include | |
"something", | |
"fatfs", | |
"axtls", | |
"tm-ssl", | |
"tm-tar", | |
"http_parser", | |
"hsregex", | |
"yajl", | |
# what i want to include | |
"some-combined-target", | |
"with-its-deps", | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment