Guillaume Varlet
|
new Variant name for a library
|
Guillaume Varlet
10/28/2010 8:18 AM
post72774
|
new Variant name for a library
Hello.
I'm trying to create a new variant of a library that is accessing some HW either IO or Memory mapped.
The aim is to create a lib IO mapped that will be called library_io.so
On the IDE, I have created a new variant called io on the x86 cpu variant.
I understood that if I want to have the new variant name appening at the end of the library name, I have th comment
EXTRA_SILENT_VARIANTS+=io
Then when I build my variant io, the name is library-io.so
That's not so bad, but the library HAVE TO be named library_io.so.
Any chance to exchange the - by an _ ?
|
|
|
Christian Damus(deleted)
|
Re: new Variant name for a library
|
Christian Damus(deleted)
11/01/2010 9:08 AM
post73119
|
Re: new Variant name for a library
Hi, Guillaume,
Trying to override the way that the makefiles compute the output binary name
$(BUILDNAME) would probably break something else in the makefiles.
The simplest approach is to add a post-build action in the Linker settings
of your QNX C/C++ Project to copy or rename the library to the name that you
prefer. The post-build actions can be targeted to specific variants only,
like your x86/io variant. Use the ³Advanced >>² button in the QNX C/C++
Project properties to set options like the post-build actions on a
per-variant basis.
HTH,
Christian
On 10-10-28 8:18 AM, "Guillaume Varlet" <community-noreply@qnx.com> wrote:
> Hello.
>
> I'm trying to create a new variant of a library that is accessing some HW
> either IO or Memory mapped.
>
> The aim is to create a lib IO mapped that will be called library_io.so
>
> On the IDE, I have created a new variant called io on the x86 cpu variant.
> I understood that if I want to have the new variant name appening at the end
> of the library name, I have th comment
> EXTRA_SILENT_VARIANTS+=io
>
> Then when I build my variant io, the name is library-io.so
> That's not so bad, but the library HAVE TO be named library_io.so.
>
> Any chance to exchange the - by an _ ?
|
|
|
Ryan Mansfield(deleted)
|
Re: new Variant name for a library
|
Ryan Mansfield(deleted)
11/01/2010 9:31 AM
post73124
|
Re: new Variant name for a library
On 10-11-01 09:08 AM, Christian Damus wrote:
> Hi, Guillaume,
>
> Trying to override the way that the makefiles compute the output binary name
> $(BUILDNAME) would probably break something else in the makefiles.
If he defines his own VARIANT_TAG after including qmacro.mk things
should work (unless that breaks the IDE mkfile generation). e.g.
VARIANT_TAG=$(subst $(space),,$(foreach var,$(filter-out
$(silent_variants)
$(EXTRA_SILENT_VARIANTS),$(all_variants)),_$(var)))$(foreach
var,$(filter g, $(VARIANT_LIST)),_$(var))$(foreach var,$(filter shared,
$(VARIANT_LIST)),S)
Regards,
Ryan Mansfield
|
|
|
Christian Damus(deleted)
|
Re: new Variant name for a library
|
Christian Damus(deleted)
11/01/2010 10:05 AM
post73132
|
Re: new Variant name for a library
Thanks, Ryan.
It wouldn¹t break the IDE as far as I know, but as the VARIANT_TAG isn¹t
documented and I don¹t have the wherewithal to test it, I was hesitant to
suggest this approach. If it works, that¹s great!
cW
On 10-11-01 9:31 AM, "Ryan Mansfield" <community-noreply@qnx.com> wrote:
> On 10-11-01 09:08 AM, Christian Damus wrote:
>> > Hi, Guillaume,
>> >
>> > Trying to override the way that the makefiles compute the output binary
>> name
>> > $(BUILDNAME) would probably break something else in the makefiles.
>
> If he defines his own VARIANT_TAG after including qmacro.mk things
> should work (unless that breaks the IDE mkfile generation). e.g.
>
> VARIANT_TAG=$(subst $(space),,$(foreach var,$(filter-out
> $(silent_variants)
> $(EXTRA_SILENT_VARIANTS),$(all_variants)),_$(var)))$(foreach
> var,$(filter g, $(VARIANT_LIST)),_$(var))$(foreach var,$(filter shared,
> $(VARIANT_LIST)),S)
>
> Regards,
>
> Ryan Mansfield
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post73124
>
>
--
Christian W. Damus
Software Developer, IDE Team
QNX Software Systems <http://www.qnx.com/>
|
|
|
Guillaume Varlet
|
RE: new Variant name for a library
|
Guillaume Varlet
11/02/2010 4:34 AM
post73216
|
RE: new Variant name for a library
Hi.
Thank you to you both.
The technic from Ryan don't work.
The technic from Christian partially work, but I can't set the extension name (.a, .so & S.a) to the renamed file...
Might you please have a hint to add this prefix to the file ?
Here are my post build actions :
#===== POST_BUILD - extra steps to do after building the image.
define POST_BUILD_ppcbe
-@$(CP_HOST) $(BUILDNAME) $(MEN_QNX_TARGET)/ppcbe/usr/lib
endef
define POST_BUILD_x86_r
-@$(CP_HOST) $(BUILDNAME) $(MEN_QNX_TARGET)/x86/usr/lib
endef
define POST_BUILD_x86_io
-@$(CP_HOST) $(BUILDNAME) libmen_chameleon_io
-$(RM_HOST) $(BUILDNAME)
-@$(CP_HOST) libmen_chameleon_io $(MEN_QNX_TARGET)/x86/usr/lib
endef
Guillaume Varlet
-----Message d'origine-----
De : Christian Damus [mailto:community-noreply@qnx.com]
Envoyé : lundi 1 novembre 2010 15:05
À : general-ide
Objet : Re: new Variant name for a library
Thanks, Ryan.
It wouldn¹t break the IDE as far as I know, but as the VARIANT_TAG isn¹t documented and I don¹t have the wherewithal to test it, I was hesitant to suggest this approach. If it works, that¹s great!
cW
On 10-11-01 9:31 AM, "Ryan Mansfield" <community-noreply@qnx.com> wrote
:
> On 10-11-01 09:08 AM, Christian Damus wrote:
>> > Hi, Guillaume,
>> >
>> > Trying to override the way that the makefiles compute the output
>> > binary
>> name
>> > $(BUILDNAME) would probably break something else in the makefiles.
>
> If he defines his own VARIANT_TAG after including qmacro.mk things
> should work (unless that breaks the IDE mkfile generation). e.g.
>
> VARIANT_TAG=$(subst $(space),,$(foreach var,$(filter-out
> $(silent_variants)
> $(EXTRA_SILENT_VARIANTS),$(all_variants)),_$(var)))$(foreach
> var,$(filter g, $(VARIANT_LIST)),_$(var))$(foreach var,$(filter
> shared,
> $(VARIANT_LIST)),S)
>
> Regards,
>
> Ryan Mansfield
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post73124
>
>
--
Christian W. Damus
Software Developer, IDE Team
QNX Software Systems <http://www.qnx.com/>
_______________________________________________
General
http://community.qnx.com/sf/go/post73132
|
|
|
Ryan Mansfield(deleted)
|
Re: new Variant name for a library
|
Ryan Mansfield(deleted)
11/02/2010 6:23 AM
post73218
|
Re: new Variant name for a library
On 10-11-02 04:34 AM, Guillaume Varlet wrote:
> Hi.
> Thank you to you both.
>
> The technic from Ryan don't work.
How so? Attached is an trivial project defining VARIANT_TAG.
Did you not want your library name followed by an underscore instead of
a dash followed by the variant type? e.g.
make[3]: Entering directory `/home/ryan/example/foo/nto/x86/so-variant'
/bin/rm -f /home/ryan/example/foo/nto/x86/so-variant/libfoo_variant.so
/opt/qnx650/host/linux/x86/usr/bin/qcc -Vgcc_ntox86 -shared
-Wl,-hlibfoo_variant.so.1
-o/home/ryan/example/foo/nto/x86/so-variant/libfoo_variant.so -L . -L
/opt/qnx650/target/qnx6/x86/lib -L /opt/qnx650/target/qnx6/x86/usr/lib
-Wl,--rpath-link . -Wl,--rpath-link /opt/qnx650/target/qnx6/x86/lib
-Wl,--rpath-link /opt/qnx650/target/qnx6/x86/usr/lib
/opt/qnx650/host/linux/x86/usr/bin/usemsg -s __USAGENTO -s __USAGE
-iVERSION -iTAGID -iDESCRIPTION -f libfoo_variant.so.pinfo
/home/ryan/example/foo/nto/x86/so-variant/libfoo_variant.so
/bin/rm -f /home/ryan/example/foo/nto/x86/so-variant/libfoo_variantS.a
/opt/qnx650/host/linux/x86/usr/bin/qcc -Vgcc_ntox86 -a
/home/ryan/example/foo/nto/x86/so-variant/libfoo_variantS.a
/opt/qnx650/host/linux/x86/usr/bin/ntox86-ar: creating
/home/ryan/example/foo/nto/x86/so-variant/libfoo_variantS.a
make[3]: Leaving directory `/home/ryan/example/foo/nto/x86/so-variant'
make[2]: Leaving directory `/home/ryan/example/foo/nto/x86'
make[1]: Leaving directory `/home/ryan/example/foo/nto'
Regards,
Ryan Mansfield
|
|
|
Guillaume Varlet
|
RE: new Variant name for a library
|
Guillaume Varlet
11/02/2010 6:36 AM
post73219
|
RE: new Variant name for a library
Thank you Ryan, It now works :)
Actually, I forgot to remove again the EXTRA_SILENT_VARIANT...
Guillaume Varlet
-----Message d'origine-----
De : Ryan Mansfield [mailto:community-noreply@qnx.com]
Envoyé : mardi 2 novembre 2010 11:23
À : general-ide
Objet : Re: new Variant name for a library
On 10-11-02 04:34 AM, Guillaume Varlet wrote:
> Hi.
> Thank you to you both.
>
> The technic from Ryan don't work.
How so? Attached is an trivial project defining VARIANT_TAG.
Did you not want your library name followed by an underscore instead of a dash followed by the variant type? e.g.
make[3]: Entering directory `/home/ryan/example/foo/nto/x86/so-variant'
/bin/rm -f /home/ryan/example/foo/nto/x86/so-variant/libfoo_variant.so
/opt/qnx650/host/linux/x86/usr/bin/qcc -Vgcc_ntox86 -shared
-Wl,-hlibfoo_variant.so.1
-o/home/ryan/example/foo/nto/x86/so-variant/libfoo_variant.so -L . -L
/opt/qnx650/target/qnx6/x86/lib -L /opt/qnx650/target/qnx6/x86/usr/lib
-Wl,--rpath-link . -Wl,--rpath-link /opt/qnx650/target/qnx6/x86/lib -Wl,--rpath-link /opt/qnx650/target/qnx6/x86/usr/lib
/opt/qnx650/host/linux/x86/usr/bin/usemsg -s __USAGENTO -s __USAGE -iVERSION -iTAGID -iDESCRIPTION -f libfoo_variant.so.
pinfo /home/ryan/example/foo/nto/x86/so-variant/libfoo_variant.so
/bin/rm -f /home/ryan/example/foo/nto/x86/so-variant/libfoo_variantS.a
/opt/qnx650/host/linux/x86/usr/bin/qcc -Vgcc_ntox86 -a /home/ryan/example/foo/nto/x86/so-variant/libfoo_variantS.a
/opt/qnx650/host/linux/x86/usr/bin/ntox86-ar: creating /home/ryan/example/foo/nto/x86/so-variant/libfoo_variantS.a
make[3]: Leaving directory `/home/ryan/example/foo/nto/x86/so-variant'
make[2]: Leaving directory `/home/ryan/example/foo/nto/x86'
make[1]: Leaving directory `/home/ryan/example/foo/nto'
Regards,
Ryan Mansfield
_______________________________________________
General
http://community.qnx.com/sf/go/post73218
|
|
|
|