--
You received this message because you are subscribed to the Google Groups "NAR Maven plugin" group.
To unsubscribe from this group and stop receiving emails from it, send an email to maven-nar+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Hi Norman and all...
I have been trying to get cross-compile to work as well.
I can assure you that the problem is NOT that cross-compile is necessarily tricky. At least not from where Im standing. A pattern i've seen that should be easi enough to support is prefix-g++(.exe.). For instance I use arm-atollic-eabi-g++.exe and so on, the prefix is consisten for eferything else...
Now I would think that it should be possible to support this in nar-plugin but no. The code in cpptasks is far to over-designed do this easily.
I am also a little disappointed about the lack of integrations friendliness. Take a look at the aol.properties. I see a promising simple way of supporting anything with this as a base. Why must the code try to be overly and unmaintainably smart? (read ms-smart) THATS why the code is complex!
I am struggling with a decission right now. Do I attempt to support nar-plugin or do I look for alternatives? Even writing my own plugin seams like an idea.
But I am waiting for actual sign of a living nar-maven-plugin project still....
Specifically, you may be interested in https://github.com/maven-nar/nar-maven-plugin/pull/53 (the ability to specify the path of the tool you want to use), and https://github.com/maven-nar/nar-maven-plugin/pull/45 (ability to specify a different OS rather than using os.name). Another one that hasn't been merged yet is https://github.com/maven-nar/nar-maven-plugin/pull/54 (skipping of nar-test when doing a cross-compile).
Any suggestions/pointers that you may have are welcome!
In my C work, we are cross-compiling for 32-bit arm processors (which run an embedded variant of Linux), using a arm-linux-gcc toolchain which runs on x86. So most of my work is cross-compilation, but it is also useful sometimes to build 'natively' ie for x86 (or x64 depending on my dev box) for some unit tests, etc.
Currently I do this mostly in make, using a directory structure stolen my my Maven experiences:
Makefile
src/main/include
src/main/c
src/test/c
target/arm/Makefile
target/native/Makefile
I then cd to say target/arm/ and run make. VPATH finds the source files (.c, .h) and the binary goes in pwd, i.e. target/arm. I can then cd ../native and build for native. Most targets are in the 'basedir' Makfile, with the ones in e.g. target/arm just driving which CC to use.
I would love to think that NAR would bring to me most/all the benefits of modularity of Java/Maven to my C build environment. Is this the case??
On a related note: I have never quite known the best mapping between Maven and Git. Should a single Maven artifact be stored in its own Git repo? Can Git sub-modules then accommodate Maven sub-modules?
Thanks
Stuart
How did you get nar to work with mingw/mingw-w64. I need to compile under mingw-w64 but I haven't seen any examples anywhere. I looked at the aol.properties but not sure what/how to modify it.