On 05/08/2014, at 8:56 PM, Jeffrey Beu wrote:

> Hello,
> 
> Maybe I am being naive but I was hoping that flx could generate everyting 
> needed to 
> compile a program with external tools.

It can do this partially. There is an option to put everything in a single
directory ready to ship elsewhere. 

flx --bundle-dir=dir .....

should do that.

At present this does NOT include the RTL. So you will need to separately build 
the
RTL for you target platform, once, and link against it.

> I didn't want to have to link with shared libraries.

You can the --static option for static linkage.

> Basically I just wanted to copy the felix generated cpp files to NDK/jni then 
> invoke ndk-build.

Sorry i have no idea what ndk-build is or does.

> For me this would be the path of least resistance. Can I do this with FLX? I 
> tried but none of the 
> rtl stuff is generated.

I'm not sure exactly what you expect. The RTL sources and header files in 
the share directory** are invariant, i.e. platform independent, so you can just 
copy
them. However they #include files in the platform specific target directory,
the default is 'host'.***

** /usr/local/lib/felix/felix-latest/share
*** /usr/local/lib/felix/felix-latest/host

These files may contain MACROS to condition the build to the particular
platform.

I would copy these to your target and modify them to suit the target
by hand.  You only need to do that once (well .. until I change the RTL :)

You can leave out stuff you don't want, eg demux, faio (async I/O stuff).

Felix stuiff is specifically designed to build with the same options
on each kind of build step, eg all C compiles of static objects are the same.
All C compiles of position independent code needed for share libs
are the same. This includes the RTL and all user generated code.


> Which means I have to cross-compile the whole felix framework.

You could either cross compile, or compile on the target directly
if that's possible. You con't need to build the whole framework,
only the libraries you want to use. At present you MUST build
Judy, the GC, threads, and a few other things. You do not have to
build faio or demux, RE2, sqlite3 or other "useful" things although 
you probably  should.****

**** I'm working on a package manager so these things can be easily
split out. It's the merge of some recent code I wrote and some older
code written by Mike Maul called "scoop".

> I am not sure
> if this would be easy given I don't know what compiler options are required 
> across platforms.

Generally no special options are required. The exceptions are:

        -fno-aggressive-loop-optionization // gcc 4.8 and above
        -fno-strict-aliasing // all compilers


I fear there will always be some pain setting up and environment.
I recommend you have a look at SDL (Simple Direct Media Layer).
This allows C code doing graphics and media stuff to compile unchanged
on many platforms including iOS and Android. Since Felix is just C
(well C++) it will run in the SDL environment. There's just a small PITA
because SDL expects a main() function and uses a macro to remove
replace it with its own initialisation code.

--
john skaller
skal...@users.sourceforge.net
http://felix-lang.org




------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to