symlink support in makefile

by AG » Wed, 14 Apr 2010 03:03:38 GMT


Sponsored Links
 I am using android NDK on windows. I am trying to compile my c file
using Cygwin. Everything works if I put source code under the JNI
directory. However, I want to separate out the C code from the rest of
Android code. So, I created a symlink to point to where the c source
is on cygwin. For ex:
ln -s /cygdrive/c/android-c-source/ src

Now when I type "ls src" on command prompt, I see the content under
the symlink. In the make file, I use
LOCAL_SRC_FILES := src/myc.c
and it does not get compiled.

How do I make the makefile to follow the symlink?

--



Other Threads

1. What is the best way to backup app database to a file?

I need to somehow backup my applitcations database to a file so that
it can later be retored using that file.  Any suggestions to doing
this?

The only way I would do it would be by reading every table to an xml
ffile but it seems soo ineficient...  The data does not have to be
humand readable...

Thanks!
-Moto!
--~--~---------~--~----~------------~-------~--~----~

2. Touch Screen Issue Please suggest some approach

Hi,       Try applying this patch.

diff --git a/services/java/com/android/server/InputDevice.java
b/services/java/com/android/server/InputDevice.java
index 7b8a2a4..d9304c1 100644
--- a/services/java/com/android/server/InputDevice.java
+++ b/services/java/com/android/server/InputDevice.java
@@ -21,10 +21,15 @@ import android.view.Display;
 import android.view.MotionEvent;
 import android.view.Surface;
 import android.view.WindowManagerPolicy;
+import java.io.FileInputStream;
+import java.util.StringTokenizer;

 public class InputDevice {
     /** Amount that trackball needs to move in order to generate a key
event. */
     static final int TRACKBALL_MOVEMENT_THRESHOLD = 6;
+
+    /** Touchscreen calibration file. */
+    static final String CALIBRATION_FILE = "/etc/pointercal";

     final int id;
     final int classes;
@@ -33,6 +38,7 @@ public class InputDevice {
     final AbsoluteInfo absY;
     final AbsoluteInfo absPressure;
     final AbsoluteInfo absSize;
+    final TransformInfo tInfo;

     long mDownTime = 0;
     int mMetaKeysState = 0;
@@ -86,12 +92,24 @@ public class InputDevice {
                     h = tmp;
                 }
                 if (device.absX != null) {
-                    scaledX = ((scaledX-device.absX.minValue)
-                                / device.absX.range) * w;
+     if (device.tInfo != null)
+                     scaledX = (device.tInfo.x1 * x +
+                                  device.tInfo.y1 * y +
+                                   device.tInfo.z1)
+   / device.tInfo.s;
+    else
+                     scaledX = ((scaledX-device.absX.minValue)
+                                    / device.absX.range) * w;
                 }
                 if (device.absY != null) {
-                    scaledY = ((scaledY-device.absY.minValue)
-                                / device.absY.range) * h;
+    if (device.tInfo != null)
+                     scaledY = (device.tInfo.x2 * x +
+                                  device.tInfo.y2 * y +
+                                   device.tInfo.z2)
+   / device.tInfo.s;
+    else
+                     scaledY = ((scaledY-device.absY.minValue)
+                                    / device.absY.range) * h;
                 }
                 if (device.absPressure != null) {
                     scaledPressure =
@@ -199,6 +217,16 @@ public class InputDevice {
         int fuzz;
     };

+    static class TransformInfo {
+        float x1;
+        float y1;
+        float z1;
+        float x2;
+        float y2;
+ float z2;
+ float s;
+    };
+
     InputDevice(int _id, int _classes, String _name,
             AbsoluteInfo _absX, AbsoluteInfo _absY,
             AbsoluteInfo _absPressure, AbsoluteInfo _absSize) {
@@ -209,5 +237,38 @@ public class InputDevice {
         absY = _absY;
         absPressure = _absPressure;
         absSize = _absSize;
+ TransformInfo t = null;
+
+ try {
+ FileInputStream is = new FileInputStream(CALIBRATION_FILE);
+ byte[] mBuffer = new byte[64];
+ int len = is.read(mBuffer);
+ is.close();
+
+ if (len > 0) {
+    int i;
+    for (i = 0 ; i < len ; i++) {
+ if (mBuffer[i] == '\n' || mBuffer[i] == 0) {
+ break;
+ }
+    }
+    len = i;
+ }
+
+ StringTokenizer st = new StringTokenizer( new String(mBuffer, 0, 0, len)
);
+
+ t = new TransformInfo ();
+ t.x1 = Integer.parseInt( st.nextToken() );
+ t.y1 = Integer.parseInt( st.nextToken() );
+ t.z1 = Integer.parseInt( st.nextToken() );
+ t.x2 = Integer.parseInt( st.nextToken() );
+ t.y2 = Integer.parseInt( st.nextToken() );
+ t.z2 = Integer.parseInt( st.nextToken() );
+ t.s = Integer.parseInt( st.nextToken() );
+ } catch (java.io.FileNotFoundException e) {
+ } catch (java.io.IOException e) {
+ }
+ tInfo = t;
+
     }
 };


Elvis

--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

3. Help for the questions on adding avi parser node to opencore framework in Android OS

4. pv: adjusting playback speed for video

5. Error : No embedded stylesheet instruction for file

6. Compare Android with kernel linux 2.6.24

7. Samsung Blackjack or i600