2 Replies Latest reply on Apr 4, 2017 10:55 PM by rameshm_61

    Make a static library from source using build scripts from the SDK

      I'm trying to compile a project as a static archive (.a) to supply it as a component for the SDK. The static library should expose only certain symbols, so an additional preparation is necessary.

      Is there any way to do it natively by using standard build scripts from the SDK? I tried to analyse build scripts in <SDK>/tools/makefiles but didn't find any graceful solution.

      Now as a temporary solution I use a workaround:

      1. compile the project as always, but without application_start() symbol and just ignore link error.
      2. ld -r $(find build/proj.wiced-platform-os/Modules/apps/proj/ -name "*.o") -o Lib_proj.o
      3. objcopy Lib_proj.o --localize-hidden
      4. ar rcs Lib_proj.a Lib_prj.o