Change test makefile.
Change-Id: I27eef2cdb86b220dd03e9be79d5bef7f9303258b
diff --git a/mbtk/test/libmbtk_lib/Makefile b/mbtk/test/libmbtk_lib/Makefile
new file mode 100755
index 0000000..844f199
--- /dev/null
+++ b/mbtk/test/libmbtk_lib/Makefile
@@ -0,0 +1,34 @@
+ROOT = $(shell pwd)/../../..
+include $(ROOT)/mbtk/Make.defines
+
+INC_DIR +=
+
+LIB_DIR +=
+
+LIBS += -lmbtk_lib
+
+CFLAGS +=
+
+DEFINE +=
+
+LOCAL_SRC_FILES = $(wildcard *.c) $(wildcard *.cpp)
+
+$(info LOCAL_SRC_FILES = $(LOCAL_SRC_FILES))
+
+OBJS = $(patsubst %.c,%.o,$(patsubst %.cpp,%.o,$(LOCAL_SRC_FILES)))
+BINS = $(patsubst %.o,%,$(OBJS))
+
+all: $(BINS)
+
+$(BINS):$(OBJS)
+ @echo " BIN $@"
+ $(CC) $(CFLAGS) $(LIB_DIR) $(LIBS) $@.o -o $(OUT_DIR)/bin/$@
+
+%.o:%.c
+ $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
+
+%.o:%.cpp
+ $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
+
+clean:
+ rm -f $(OBJS)
diff --git a/mbtk/test/libmbtk_lib/mbtk_at_test.c b/mbtk/test/libmbtk_lib/mbtk_at_test.c
new file mode 100755
index 0000000..a6cb361
--- /dev/null
+++ b/mbtk/test/libmbtk_lib/mbtk_at_test.c
@@ -0,0 +1,33 @@
+#include <stdio.h>
+
+#include "mbtk_at.h"
+
+#define LOGE printf
+#define LOGI printf
+
+int main(int argc, char *argv[])
+{
+ if(argc != 2) {
+ LOGE("./at_test at_cmd\n");
+ return -1;
+ }
+
+ if(mbtk_at_init()) {
+ LOGE("mbtk_at_init() fail.\n");
+ return -1;
+ }
+
+ char at_rsp[2048];
+ if(!mbtk_at_send(argv[1], at_rsp, 2048)) {
+ LOGI("%s", at_rsp);
+ } else {
+ LOGE("mbtk_at_send() fail.\n");
+ }
+
+ if(mbtk_at_deinit()) {
+ LOGE("mbtk_at_deinit() fail.\n");
+ return -1;
+ }
+
+ return 0;
+}