OSDN Git Service

Create symbolic links on $(TARGET_OUT)/lib/firmware android-x86-4.4-r3
authorChih-Wei Huang <cwhuang@linux.org.tw>
Thu, 16 Jul 2015 18:47:54 +0000 (02:47 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Sun, 26 Jul 2015 05:39:44 +0000 (13:39 +0800)
Android.mk [new file with mode: 0644]

diff --git a/Android.mk b/Android.mk
new file mode 100644 (file)
index 0000000..d35389d
--- /dev/null
@@ -0,0 +1,23 @@
+#
+# Copyright (C) 2014-2015 The Android-x86 Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+
+LOCAL_PATH := $(my-dir)
+
+SYMLINKS := $(addprefix $(TARGET_OUT)/lib,$(subst $(LOCAL_PATH),,$(shell find $(LOCAL_PATH)/firmware -type l)))
+
+$(SYMLINKS): FW_PATH := $(LOCAL_PATH)
+$(SYMLINKS):
+       @link_to=`readlink $(subst $(TARGET_OUT)/lib,$(FW_PATH),$@)`; \
+       echo "Symlink: $@ -> $$link_to"; \
+       mkdir -p $(@D); ln -sf $$link_to $@
+
+ALL_DEFAULT_INSTALLED_MODULES += $(SYMLINKS)
+
+include $(call all-makefiles-under,$(LOCAL_PATH))