Hi

On Wednesday, March 9, 2011 9:08:20 AM UTC+1, Matt wrote:
>
> Hi guys:
>  As a fresh man to the JAVA and Android.
>  I wonder is there a official way to pass the BoardConfig.mk value to the 
> JAVA source code?
> I could do this for the C/C++ source code which only need add some checking 
> code in the Android.mk,  like this: 
>
> *ifeq ($(strip $(BOARD_MY_MODIFY)),true)*
> * LOCAL_CFLAGS += -DMY_MODIFY
> *
> *endif*
>
You can selectively choose to compile a set of Java files like this 
*ifeq ($(strip $(BOARD_MY_MODIFY)),true)*
* LOCAL_SRC_FILES += bla/Bla.java*
*endif*

but java files are not pre-processed like c files so you can not do things 
like ifdefs in Java code. You usually end up detecting features at runtime 
and 
either initializing a different implementation of your class or performing 
runtime checks.


>  But how to do the same work for the JAVA source code?
>
>  Any comments will be highly appreciated! thanks a lot!
>

-- 
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting

Reply via email to