On Tue, Sep 29, 2015 at 2:30 AM, Andreas Jellinghaus
<
and...@ionisiert.de> wrote:
> What is the proper way for my own app (e.g. a chrome extension) to include
> stuff from naclports?
naclports installs directly into the toolchain so you shouldn't need
to do anything special. The headers and libraries should be available
at compile and link time automatically.
> What about extra libraries I build but won't be able to contribute - can I
> manage them simular to naclports?
You could add your ports to a local/private fork of naclports. If
this doesn't work for you would probably want to add a NaCl
configuration to your existing project.
>
> LIBS += foo bar
> EXTRA_LIB_PATHS += $HOME/some/dir/with/lib
>
> above is my current try, after starting with one of the example code
> packages from the naclsdk.
> It that works for one config with the binary package I unpacked or the
> compile tree I copied over.
>
> Thus not a deal if I want to use/try/test pnacl only, but if I wanted to
> check if my extension would work
> with all possible setups, it would be nicer to have a make_all.sh like
> approach, that will compile my
> extension with all configs, and always include the dependencies from the
> proper NACLPORTS path.
If you are using the SDK build system to build and app or extension
you would normally just pick one toolchain to use and stick with it.
There should be no reason to support more than one toolchain at a
given time. If you pick newlib or glibc the build system will build
all three architectures with you type, for example 'make
TOOLCHAIN=newlib'.
>
> Is there something like that? Or a setting like NACLPORTS= and it is already
> included?
>
> Or has NACLPORTS a copy of the tutorial/example/getting started packages
> from nacl_sdk, but with
> makefiles that help using components from naclports?
>
> Also it might be nice to have a "download_all.sh $package" script that
> downloads the precompiled
> binaries listed in src/lib/prebuild.txt, so the user can use them without
> compiling. Only useful for those
> packages that have content - it seems maybe half of the packages are empty?
Support for prebuilt naclports packages has not been well maintained
but the idea is that you should be able to install prebuilt packages
rather than building them locally. The regular 'naclports install'
command should do this if it can find a compatible version in
prebuilt.txt, but prebuilt.txt is very out-of-date at this point.