[Feature] add GA346 baseline version

Change-Id: Ic62933698569507dcf98240cdf5d9931ae34348f
diff --git a/src/lynq/lib/liblynq-dev/LICENSE b/src/lynq/lib/liblynq-dev/LICENSE
new file mode 100644
index 0000000..77f59ed
--- /dev/null
+++ b/src/lynq/lib/liblynq-dev/LICENSE
@@ -0,0 +1,31 @@
+Copyright Statement:
+
+This software/firmware and related documentation ("MediaTek Software") are
+protected under relevant copyright laws. The information contained herein is
+confidential and proprietary to MediaTek Inc. and/or its licensors. Without
+the prior written permission of MediaTek inc. and/or its licensors, any
+reproduction, modification, use or disclosure of MediaTek Software, and
+information contained herein, in whole or in part, shall be strictly
+prohibited.
+
+MediaTek Inc. (C) 2015. All rights reserved.
+
+BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
+THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
+RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER
+ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL
+WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
+WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
+NONINFRINGEMENT. NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH
+RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY,
+INCORPORATED IN, OR SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES
+TO LOOK ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO.
+RECEIVER EXPRESSLY ACKNOWLEDGES THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO
+OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES CONTAINED IN MEDIATEK
+SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE
+RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
+STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S
+ENTIRE AND CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE
+RELEASED HEREUNDER WILL BE, AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE
+MEDIATEK SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE
+CHARGE PAID BY RECEIVER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
diff --git a/src/lynq/lib/liblynq-dev/MODULE_LICENSE_APACHE2 b/src/lynq/lib/liblynq-dev/MODULE_LICENSE_APACHE2
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/lynq/lib/liblynq-dev/MODULE_LICENSE_APACHE2
diff --git a/src/lynq/lib/liblynq-dev/Makefile b/src/lynq/lib/liblynq-dev/Makefile
new file mode 100644
index 0000000..0ee8adcd
--- /dev/null
+++ b/src/lynq/lib/liblynq-dev/Makefile
@@ -0,0 +1,63 @@
+PREFIX   = ../install
+CROSS    = arm-none-linux-
+ROOT     = $(PREFIX)/$(CROSS:%-=%)
+
+#For Yocto use
+
+RFX_TEST_CLIENT = false
+RFX_TEST_AOSP = false
+
+$(warning ########## libvendor_ril BB_TELEFWK_OPTION $(BB_TELEFWK_OPTION) ##########)
+
+		   
+
+SUBDIRS +=  liblynq-dev
+
+
+
+
+
+$(warning ########## lynq-rilcmd SUBDIRS  $(SUBDIRS) ##########)
+export SIM_COUNT?=1
+
+.PHONY: all build clean pack_rootfs
+
+all: build
+
+build: clean
+
+clean:
+	$(warning ########## clean ril ##########)
+	for i in $(SUBDIRS); do			\
+		(cd $$i && make clean);			\
+		if [ $$? != 0 ]; then		\
+			exit 1;					\
+		fi							\
+	done
+
+build:
+	$(warning ########## build ril ##########)
+	for i in $(SUBDIRS); do			\
+		(cd $$i && make);			\
+		if [ $$? != 0 ]; then		\
+			exit 1;					\
+		fi							\
+	done
+
+install:
+	$(warning ########## install ril ##########)
+	for i in $(SUBDIRS); do			\
+		(cd $$i && make install);			\
+		if [ $$? != 0 ]; then		\
+			exit 1;					\
+		fi							\
+	done
+
+pack_rootfs:
+	$(warning ########## pack_rootfs ril ##########)
+	for i in $(SUBDIRS); do			\
+		(cd $$i && make pack_rootfs);			\
+		if [ $$? != 0 ]; then		\
+			exit 1;					\
+		fi							\
+	done
diff --git a/src/lynq/lib/liblynq-dev/NOTICE b/src/lynq/lib/liblynq-dev/NOTICE
new file mode 100644
index 0000000..c5b1efa
--- /dev/null
+++ b/src/lynq/lib/liblynq-dev/NOTICE
@@ -0,0 +1,190 @@
+
+   Copyright (c) 2005-2008, The Android 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.
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
diff --git a/src/lynq/lib/liblynq-dev/README b/src/lynq/lib/liblynq-dev/README
new file mode 100644
index 0000000..9a7e82f
--- /dev/null
+++ b/src/lynq/lib/liblynq-dev/README
@@ -0,0 +1,13 @@
+WHAT IT DOES?
+=============
+MTK ril proxy core library
+
+HOW IT WAS BUILT?
+==================
+This module is source code released.
+
+HOW TO USE IT?
+==============
+MTK ril proxy daemon will use this library to communicate with GSM and C2K RILD.
+
+All the source code of this folder were written by MediaTek co..
diff --git a/src/lynq/lib/liblynq-dev/include/liblynq-dev/lynq_dev_control.h b/src/lynq/lib/liblynq-dev/include/liblynq-dev/lynq_dev_control.h
new file mode 100644
index 0000000..d230b74
--- /dev/null
+++ b/src/lynq/lib/liblynq-dev/include/liblynq-dev/lynq_dev_control.h
@@ -0,0 +1,23 @@
+#ifndef __LYNQ_DEV_CONTROL_H__
+#define __LYNQ_DEV_CONTROL_H__
+#include <sys/time.h>
+#include <time.h>
+void gsdk_device_get_devicename(char *devicename);
+void gsdk_device_get_swversion(char *swversion);
+void gsdk_device_get_oemversion(char *oemversion);
+void gsdk_device_get_manufacturer(char *manufacturer);
+void gsdk_device_get_hwversion(char *swversion);
+void gsdk_device_get_oemapp_path();
+void gsdk_device_get_oemdata_path();
+int gsdk_device_get_adc();
+void gsdk_device_shutdown_system();
+void gsdk_device_reboot_system();
+void gsdk_device_set_autosleep();
+int gsdk_device_set_rtc_timer();
+int gsdk_device_get_rtc_timer(int rtc_fd, struct tm *tm);
+int gsdk_device_cancel_rtc_timer(int rtc_fd);
+void gsdk_device_wake_lock();
+void gsdk_device_wake_unlock();
+int gsdk_device_get_usb_state();
+void gsdk_device_set_usb_state();
+#endif  //__LYNQ_DEV_CONTROL_H__
diff --git a/src/lynq/lib/liblynq-dev/liblynq-dev/dev_control.c b/src/lynq/lib/liblynq-dev/liblynq-dev/dev_control.c
new file mode 100644
index 0000000..6386542
--- /dev/null
+++ b/src/lynq/lib/liblynq-dev/liblynq-dev/dev_control.c
@@ -0,0 +1,205 @@
+#include <stdio.h>
+#include <string.h>
+#include <fcntl.h>
+#include "lynq_dev_control.h"
+#include <cutils/properties.h>
+#include <sys/time.h>
+#include <time.h>
+#include <sys/ioctl.h>
+#include <log/log.h>
+#define DEVICE_NAME    "ro.product.device"
+#define SW_VERSION    "ro.lynq.sw.version"
+#define OEM_VERSION    "ro.product.oem"
+#define MANUFACTURE    "ro.product.manufacture"
+#define HW_VERSION    "ro.lynq.sw.version"
+#define LOG_TAG "DEV_API"
+struct linux_rtc_time {
+  	int tm_sec;
+  	int tm_min;
+  	int tm_hour;
+  	int tm_mday;
+  	int tm_mon;
+  	int tm_year;
+  	int tm_wday;
+  	int tm_yday;
+  	int tm_isdst;
+  };
+  
+  /* RTC_RD_TIME etc have this definition since 1.99.9 (pre2.0-9) */
+  #ifndef RTC_RD_TIME
+  # define RTC_RD_TIME	_IOR('p', 0x09, struct linux_rtc_time)
+  #define RTC_AIE_OFF	_IO('p', 0x02)	/* ... off	
+  # define RTC_SET_TIME	_IOW('p', 0x0a, struct linux_rtc_time)
+  # define RTC_UIE_ON	_IO('p', 0x03)	/* Update int. enable on */
+  # define RTC_UIE_OFF	_IO('p', 0x04)	/* Update int. enable off */
+  #endif
+  #ifndef RTC_EPOCH_READ
+  # define RTC_EPOCH_READ	_IOR('p', 0x0d, unsigned long)	/* Read epoch */
+  # define RTC_EPOCH_SET	_IOW('p', 0x0e, unsigned long)	/* Set epoch */
+  #endif
+void gsdk_device_get_devicename(char *devicename)
+{
+    int i = property_get(DEVICE_NAME, devicename, "11111");
+    RLOGD("property_Get DEVICE_NAME,i:%d,devicename:%s",i,devicename);
+    return ;
+}
+void gsdk_device_get_swversion(char *swversion)
+{
+	
+    int i=property_get(SW_VERSION, swversion, "2222");
+    RLOGD("property_Get DEVICE_NAME,i:%d,swversion:%s",i,swversion);
+    return ;
+}
+void gsdk_device_get_oemversion(char *oemversion)
+{
+	property_get(OEM_VERSION, oemversion, "");
+	
+	return ;
+}
+void gsdk_device_get_manufacturer(char *manufacturer)
+{
+	property_get(MANUFACTURE, manufacturer, "");
+	return ;
+}
+void gsdk_device_get_hwversion(char *swversion)
+{
+	property_get(SW_VERSION, swversion, "");
+	return ;
+	
+}
+void gsdk_device_get_oemapp_path()
+{
+	
+	
+}
+void gsdk_device_get_oemdata_path()
+{
+	
+}
+void gsdk_device_shutdown_system()
+{
+	system("/sbin/poweroff");
+	return ;
+	
+}
+void gsdk_device_reboot_system()
+{
+	 system("/sbin/reboot");
+	return ;
+}
+void gsdk_device_set_autosleep()
+{
+	system("echo mem > /sys/power/autosleep");
+	
+}
+int gsdk_device_set_rtc_timer()
+{
+	static const char *fls = {"/dev/rtc0"};
+	int fp = open(fls, O_RDONLY);
+	return fp;
+}
+int gsdk_device_get_rtc_timer(int rtc_fd, struct tm *tm)
+{
+	int rc = -1;
+	//struct tm timer_time;
+	rc = ioctl(rtc_fd, RTC_RD_TIME, &tm);
+	
+	
+	if (rc == -1) {
+		RLOGD("read the time failed");
+		return -1;
+	}
+
+	return 0;
+}
+
+int gsdk_device_cancel_rtc_timer(int rtc_fd)
+{
+	int rc = -1;
+	rc = ioctl(rtc_fd, RTC_AIE_OFF, 0);
+	if (rc == -1) {
+	    RLOGD("cancel the time failed");
+	    return -1;
+	}
+	return 0;
+}
+int gsdk_device_get_adc()
+{
+	static const char *adc_path = {"/sys/bus/iio/devices/iio\:device0/in_voltage0_BATADC_input"};
+	char str[100]= {0};
+	int adc;
+	int fp = open(adc_path, O_RDONLY);
+	int err_r = read(fp,str,sizeof(str));
+	adc = atoi(str);
+	return adc;
+	
+}
+
+void gsdk_device_wake_lock()
+{
+	system("echo lock_name > /sys/power/wake_lock");
+	return ;
+}
+void gsdk_device_wake_unlock()
+{
+	system("echo lock_name > /sys/power/wake_unlock");
+	return ;
+	
+}
+
+void gsdk_device_set_usb_state()
+{
+	return ;
+}
+int gsdk_device_get_usb_state()
+{
+	static const char *usb_state_path = {"/sys/devices/platform/11201000.usb/udc/11201000.usb/state"};
+    const char *usb_no_connect = {"not attached"};
+	const char *usb_connect = {"configured"};
+	char str[100]= {0};
+	int fp = open(usb_state_path, O_RDONLY);
+	printf("open usb state:%d\n",fp);
+	read(fp,str,sizeof(str));
+	printf("str:%s\n",str);
+	if(strcmp(str,usb_no_connect))
+	{ 
+	    return 0;
+	}
+	else if (strcmp(str,usb_connect))
+	{
+	    return 1;
+	}
+	else
+	{
+	    return -1;
+	}
+
+	
+}
+/*
+int write_gpio_file(){
+	int err = -1;
+	gchar argv[50];
+	char *s;
+	param_process(mode,gpio_numb,param,argv);
+	s = argv;
+	RLOGD("s:%s",s);
+	int fp = open("/proc/n5600", O_RDWR);
+	if (fp < 0) {	
+	  RLOGD("open /proc/n5600 error\n");
+	  return -1;
+	}
+	else { 
+	  RLOGD("open /proc/n5600 success!\n");
+	}	
+	err = write(fp, s, sizeof(argv));
+	close(fp);
+	if(err == -1)	{
+	  RLOGE("read faild!!!\n");
+	  return -1;
+	}else{
+      return 1;
+	}
+	
+}*/
+
diff --git a/src/lynq/lib/liblynq-dev/liblynq-dev/makefile b/src/lynq/lib/liblynq-dev/liblynq-dev/makefile
new file mode 100644
index 0000000..383ea35
--- /dev/null
+++ b/src/lynq/lib/liblynq-dev/liblynq-dev/makefile
@@ -0,0 +1,71 @@
+SHELL = /bin/sh
+RM = rm -f
+
+LOCAL_CFLAGS := -Wall \
+                -g -Os \
+                -flto \
+                -fPIC \
+                -DRIL_SHLIB \
+                -DATCI_PARSE \
+                -DKEEP_ALIVE \
+                -DECALL_SUPPORT \
+
+$(warning ################# RITA ROOT: $(ROOT),includedir:$(includedir))
+LOCAL_PATH   = .
+
+LOCAL_C_INCLUDES = \
+  -I. \
+  -I$(LOCAL_PATH)/../include/liblynq-dev \
+  -I$(ROOT)$(includedir)/logger \
+
+
+
+
+LOCAL_LIBS := \
+    -L. \
+    -luciwrapper \
+    -ldl \
+    -lstdc++ \
+    -llog \
+    -lcutils \
+    -lutils \
+    -lpower \
+    -lpal \
+    -lrt \
+
+
+
+SOURCES = $(wildcard *.c wildcard *.h)
+
+EXECUTABLE = liblynq-dev.so
+
+OBJECTS=$(SOURCES:.c=.o)
+
+
+.PHONY: build clean install pack_rootfs 
+
+all: build
+$(EXECUTABLE): $(OBJECTS)
+	$(CXX) -shared -Wl,--no-undefined $(OBJECTS) $(LOCAL_LIBS) $(LOCAL_CFLAGS) $(LOCAL_C_INCLUDES) -o $@
+
+%.o : %.c
+	$(CC) $(LOCAL_C_INCLUDES) $(LOCAL_CFLAGS) $(LOCAL_LIBS) -o $@ -c $< 
+
+build:  $(EXECUTABLE)
+	$(warning ########## build $(EXECUTABLE)  ##########)
+
+install:
+	mkdir -p $(ROOT)$(base_libdir)/
+	install $(EXECUTABLE) $(ROOT)$(base_libdir)/
+	mkdir -p $(ROOT)$(includedir)/$(NAME)/sdk
+
+pack_rootfs:
+	mkdir -p $(PACK_INITRAMFS_TO)$(base_libdir)/
+	cp -af $(EXECUTABLE) $(PACK_INITRAMFS_TO)$(base_libdir)/
+	$(CROSS)strip $(PACK_INITRAMFS_TO)$(base_libdir)/$(EXECUTABLE)
+	mkdir -p $(PACK_TO)$(base_libdir)/
+	cp -af $(EXECUTABLE) $(PACK_TO)$(base_libdir)/
+	$(CROSS)strip $(PACK_TO)$(base_libdir)/$(EXECUTABLE)
+.PHONY: clean
+clean:
+	$(RM) $(OBJECTS) $(EXECUTABLE)