Commit 72abe3c1 authored by Jaehyun Cho's avatar Jaehyun Cho Committed by Uze Choi

Make st regarding logic to library.

To st_things modules use commonly, it need to
make that library. Make st_framework module in service
layer, and move st_app modules to there.

To make prebuilt library for st-app-fw, use make_prebuilt.py
script in tools folder. thil will copy dependency header in
prebuilt folder and copy library about st-app-fw(libst-app-framwork.a)
Detailed usage can check in make_prebuilt.py script file.

Please Add build option ST_APP_FW to build st-app-fw library.

-------------------------------
Test Case
  st_app (out of box)
     Create Soft-AP  : OK
     Provisioning : OK
     Controlled by ST android app :OK
  st_app (setup is done)  -  OK
  st_app (with reset)  - OK

Change-Id: Ie44b7053a69afe9ad230ecde1655f252bdd45ae7
Signed-off-by: default avatarJaehyun Cho <jaehyun3.cho@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/25629Tested-by: default avatarIoTivity Jenkins <jenkins-daemon@iotivity.org>
Reviewed-by: default avatarUze Choi <uzchoi@samsung.com>
parent ea2508e6
......@@ -16,6 +16,8 @@ port/linux/server_multithread_linux
port/linux/client_multithread_linux
port/linux/easysetup_linux
port/linux/easysetup_linux_creds/
port/linux/sc_easysetup_linux
port/linux/sc_easysetup_linux_creds/
port/linux/mfgserver
port/linux/mfgserver_creds/
port/linux/st_things
......@@ -26,6 +28,7 @@ port/linux/libiotivity-constrained-client-server.*
port/linux/libiotivity-constrained-cloudaccess.*
port/linux/libiotivity-constrained-rd-client.*
port/linux/libiotivity-constrained-easysetup.*
port/linux/libst-app-framework.*
port/linux/iotivity-constrained-server.pc
port/linux/iotivity-constrained-client.pc
port/linux/iotivity-constrained-client-server.pc
......@@ -49,6 +52,7 @@ port/openthread/output
.clang-format
_clang-format
port/linux/platformtest
prebuilt
#creds files
port/linux/client_creds
......@@ -63,6 +67,7 @@ port/linux/multi_device_client_creds
port/linux/multi_device_server_creds
port/linux/server_multithread_linux_creds
port/linux/client_multithread_linux_creds
port/linux/cloud_linux_creds
#vscode setting files
.vscode
#!/usr/bin/make -f
# -*- makefile -*-
# ex: set tabstop=4 noexpandtab:
#{
# Copyright 2018 Samsung Electronics France SAS
#
# 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
#
# 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.
#}
port?=linux
srcs?=$(wildcard *.c ${port}/*.c)
objs?=${srcs:.c=.o}
topdir?=../..
CFLAGS+=-I${topdir}
CFLAGS+=-I${topdir}/include
CFLAGS+=-I${topdir}/port
CFLAGS+=-I${topdir}/port/${port}
CFLAGS+=-I${topdir}/service/easy-setup/enrollee/include
CFLAGS+=-I${topdir}/service/cloud-access/include
CFLAGS+=-I${topdir}/service/resource-directory/client/include
CFLAGS+=-I${topdir}/service/easy-setup/enrollee/include/samsung
all: ${objs}
ls $<
clean:
rm -f ${objs}
......@@ -26,6 +26,11 @@ CFLAGS+=-I${topdir}
CFLAGS+=-I${topdir}/include
CFLAGS+=-I${topdir}/port/
CFLAGS+=-I${topdir}/port/${port}
CFLAGS+=-I${topdir}/service/easy-setup/enrollee/include
CFLAGS+=-I${topdir}/service/cloud-access/include
CFLAGS+=-I${topdir}/service/resource-directory/client/include
CFLAGS+=-I${topdir}/service/easy-setup/enrollee/include/samsung
CFLAGS+=-I${topdir}/service/st-app-fw/include
all: ${objs}
ls $<
......
......@@ -17,9 +17,8 @@
****************************************************************************/
#include "oc_assert.h"
#include "../st_manager.h"
#include "../st_port.h"
#include "../st_resource_manager.h"
#include "st_manager.h"
#include "st_resource_manager.h"
static const char *switch_rsc_uri = "/capability/switch/main/0";
static const char *switchlevel_rsc_uri = "/capability/switchLevel/main/0";
......
CC = gcc
CFLAGS=-fPIC -fno-asynchronous-unwind-tables -fno-omit-frame-pointer -ffreestanding -Os -fno-stack-protector -ffunction-sections -fdata-sections -fno-reorder-functions -fno-defer-pop -fno-strict-overflow -I./ -I../ -I../../ -I../../include/ -std=gnu99 -Wall -Wextra #-Wl,-Map,client.map
CFLAGS += -I./include
LIBS?= -lm -pthread -lrt
all: st_things
st_things:
@mkdir -p $@_creds
${CC} -o $@ st_ref_app.c \
lib/libst-app-framework.a ${CFLAGS} ${LIBS}
\ No newline at end of file
......@@ -16,9 +16,8 @@
*
****************************************************************************/
#include "../st_manager.h"
#include "../st_port.h"
#include "../st_resource_manager.h"
#include "st_manager.h"
#include "st_resource_manager.h"
static const char *switch_rsc_uri = "/capability/switch/main/0";
static const char *switchlevel_rsc_uri = "/capability/switchLevel/main/0";
......@@ -71,8 +70,7 @@ get_resource_handler(oc_request_t *request)
strlen(color_temp_rsc_uri)) == 0) {
color_temp_resource_construct();
} else {
st_print_log("[ST_APP] invalid uri %s\n",
oc_string(request->resource->uri));
printf("[ST_APP] invalid uri %s\n", oc_string(request->resource->uri));
return false;
}
......@@ -86,7 +84,7 @@ switch_resource_change(oc_rep_t *rep)
if (oc_rep_get_string(rep, power_prop_key, &m_power, &len)) {
strncpy(power, m_power, len);
power[len] = '\0';
st_print_log("[ST_APP] %s : %s\n", oc_string(rep->name), power);
printf("[ST_APP] %s : %s\n", oc_string(rep->name), power);
// TODO: device specific behavior.
}
......@@ -96,7 +94,7 @@ static void
switchlevel_resource_change(oc_rep_t *rep)
{
if (oc_rep_get_int(rep, dimming_prop_key, &dimmingSetting)) {
st_print_log("[ST_APP] %s : %d\n", oc_string(rep->name), dimmingSetting);
printf("[ST_APP] %s : %d\n", oc_string(rep->name), dimmingSetting);
// TODO: device specific behavior.
}
......@@ -106,7 +104,7 @@ static void
color_temp_resource_change(oc_rep_t *rep)
{
if (oc_rep_get_int(rep, ct_prop_key, &ct)) {
st_print_log("[ST_APP] %s : %d\n", oc_string(rep->name), ct);
printf("[ST_APP] %s : %d\n", oc_string(rep->name), ct);
// TODO: device specific behavior.
}
......@@ -128,8 +126,7 @@ set_resource_handler(oc_request_t *request)
color_temp_resource_change(request->request_payload);
color_temp_resource_construct();
} else {
st_print_log("[ST_APP] invalid uri %s\n",
oc_string(request->resource->uri));
printf("[ST_APP] invalid uri %s\n", oc_string(request->resource->uri));
return false;
}
......@@ -139,14 +136,14 @@ set_resource_handler(oc_request_t *request)
static bool
otm_confirm_handler(void)
{
st_print_log("[ST_APP] OTM request is comming. Will you confirm?[y/n]\n");
printf("[ST_APP] OTM request is comming. Will you confirm?[y/n]\n");
char ret[10];
scanf("%s", ret);
if (ret[0] == 'y' || ret[0] == 'Y') {
st_print_log("[ST_APP] CONFIRMED.\n");
printf("[ST_APP] CONFIRMED.\n");
return true;
} else {
st_print_log("[ST_APP] DENIED.\n");
printf("[ST_APP] DENIED.\n");
return false;
}
}
......@@ -155,7 +152,7 @@ int
main(void)
{
if (st_manager_initialize() != 0) {
st_print_log("[ST_APP] st_manager_initialize failed.\n");
printf("[ST_APP] st_manager_initialize failed.\n");
return -1;
}
......@@ -163,7 +160,7 @@ main(void)
st_register_otm_confirm_handler(otm_confirm_handler);
if (st_manager_start() != 0) {
st_print_log("[ST_APP] st_manager_start failed.\n");
printf("[ST_APP] st_manager_start failed.\n");
}
st_manager_stop();
......
......@@ -16,9 +16,8 @@
*
****************************************************************************/
#include "../st_manager.h"
#include "../st_port.h"
#include "../st_resource_manager.h"
#include "st_manager.h"
#include "st_resource_manager.h"
static const char *switch_rsc_uri = "/capability/switch/main/0";
static const char *switchlevel_rsc_uri = "/capability/switchLevel/main/0";
......@@ -71,8 +70,7 @@ get_resource_handler(oc_request_t *request)
strlen(color_temp_rsc_uri)) == 0) {
color_temp_resource_construct();
} else {
st_print_log("[ST_APP] invalid uri %s\n",
oc_string(request->resource->uri));
printf("[ST_APP] invalid uri %s\n", oc_string(request->resource->uri));
return false;
}
......@@ -86,7 +84,7 @@ switch_resource_change(oc_rep_t *rep)
if (oc_rep_get_string(rep, power_prop_key, &m_power, &len)) {
strncpy(power, m_power, len);
power[len] = '\0';
st_print_log("[ST_APP] %s : %s\n", oc_string(rep->name), power);
printf("[ST_APP] %s : %s\n", oc_string(rep->name), power);
// TODO: device specific behavior.
}
......@@ -96,7 +94,7 @@ static void
switchlevel_resource_change(oc_rep_t *rep)
{
if (oc_rep_get_int(rep, dimming_prop_key, &dimmingSetting)) {
st_print_log("[ST_APP] %s : %d\n", oc_string(rep->name), dimmingSetting);
printf("[ST_APP] %s : %d\n", oc_string(rep->name), dimmingSetting);
// TODO: device specific behavior.
}
......@@ -106,7 +104,7 @@ static void
color_temp_resource_change(oc_rep_t *rep)
{
if (oc_rep_get_int(rep, ct_prop_key, &ct)) {
st_print_log("[ST_APP] %s : %d\n", oc_string(rep->name), ct);
printf("[ST_APP] %s : %d\n", oc_string(rep->name), ct);
// TODO: device specific behavior.
}
......@@ -128,8 +126,7 @@ set_resource_handler(oc_request_t *request)
color_temp_resource_change(request->request_payload);
color_temp_resource_construct();
} else {
st_print_log("[ST_APP] invalid uri %s\n",
oc_string(request->resource->uri));
printf("[ST_APP] invalid uri %s\n", oc_string(request->resource->uri));
return false;
}
......@@ -141,7 +138,7 @@ int
stapp_main(void)
{
if (st_manager_initialize() != 0) {
st_print_log("[ST_APP] st_manager_initialize failed.\n");
printf("[ST_APP] st_manager_initialize failed.\n");
return -1;
}
......@@ -150,7 +147,7 @@ stapp_main(void)
// TODO: callback registration. (ex. user confirm cb)
if (st_manager_start() != 0) {
st_print_log("[ST_APP] st_manager_start failed.\n");
printf("[ST_APP] st_manager_start failed.\n");
}
st_manager_stop();
......
/* ****************************************************************
*
* Copyright 2018 Samsung Electronics All Rights Reserved.
*
* 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
*
* 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.
*
******************************************************************/
#include "wifi_soft_ap_util.h"
#include <net/lwip/dhcp.h>
#include <net/lwip/netif.h>
static int g_wifi_state;
static struct netif *gnet_if;
static slsi_security_config_t *es_get_security_config(const char *sec_type, const char *psk)
{
slsi_security_config_t *ret = NULL;
if (strncmp(SLSI_WIFI_SECURITY_OPEN,
sec_type, sizeof(SLSI_WIFI_SECURITY_OPEN)) != 0 ) {
ret = (slsi_security_config_t *)zalloc(sizeof(slsi_security_config_t));
if (ret) {
if (strncmp(SLSI_WIFI_SECURITY_WEP_OPEN,
sec_type, sizeof(SLSI_WIFI_SECURITY_WEP_OPEN)) == 0) {
ret->secmode = SLSI_SEC_MODE_WEP;
} else if (strncmp(SLSI_WIFI_SECURITY_WEP_SHARED,
sec_type, sizeof(SLSI_WIFI_SECURITY_WEP_SHARED)) == 0) {
ret->secmode = SLSI_SEC_MODE_WEP_SHARED;
} else if (strncmp(SLSI_WIFI_SECURITY_WPA_MIXED,
sec_type,sizeof(SLSI_WIFI_SECURITY_WPA_MIXED)) == 0) {
ret->secmode = SLSI_SEC_MODE_WPA_MIXED;
} else if (strncmp(SLSI_WIFI_SECURITY_WPA_TKIP,
sec_type,sizeof(SLSI_WIFI_SECURITY_WPA_TKIP)) == 0) {
ret->secmode = SLSI_SEC_MODE_WPA_TKIP;
} else if (strncmp(SLSI_WIFI_SECURITY_WPA_AES,
sec_type,sizeof(SLSI_WIFI_SECURITY_WPA_AES)) == 0) {
ret->secmode = SLSI_SEC_MODE_WPA_CCMP;
} else if (strncmp(SLSI_WIFI_SECURITY_WPA2_MIXED,
sec_type,sizeof(SLSI_WIFI_SECURITY_WPA2_MIXED)) == 0) {
ret->secmode = SLSI_SEC_MODE_WPA2_MIXED;
} else if (strncmp(SLSI_WIFI_SECURITY_WPA2_TKIP,
sec_type, sizeof(SLSI_WIFI_SECURITY_WPA2_TKIP)) == 0) {
ret->secmode = SLSI_SEC_MODE_WPA2_TKIP;
} else if (strncmp(SLSI_WIFI_SECURITY_WPA2_AES,
sec_type, sizeof(SLSI_WIFI_SECURITY_WPA2_AES)) == 0) {
ret->secmode = SLSI_SEC_MODE_WPA2_CCMP;
} else if (strncmp(SLSI_WIFI_SECURITY_WPA_PSK,
sec_type, sizeof(SLSI_WIFI_SECURITY_WPA_PSK)) == 0) {
ret->secmode = SLSI_SEC_MODE_WPA2_MIXED;
} else if (strncmp(SLSI_WIFI_SECURITY_WPA2_PSK,
sec_type, sizeof(SLSI_WIFI_SECURITY_WPA2_PSK)) == 0) {
ret->secmode = SLSI_SEC_MODE_WPA2_MIXED;
}
}
if(psk) {
memcpy(ret->passphrase, psk, strlen(psk));
} else {
free(ret);
ret = NULL;
}
}
return ret;
}
static void linkUpHandler(slsi_reason_t* reason)
{
g_wifi_state = WIFI_CONNECTED;
printf("Connected to network\n");
}
static void linkDownHandler(slsi_reason_t* reason)
{
if (reason) {
printf("Disconnected from network reason_code: %d %s\n", reason->reason_code,
reason->locally_generated ? "(locally_generated)": "");
} else {
printf("Disconnected from network\n");
}
}
int wifi_start_station(void)
{
int result = -1;
printf("Starting STA mode...\n");
g_wifi_state = WIFI_DISCONNECTED;
if (WiFiStart(SLSI_WIFI_STATION_IF, NULL) == SLSI_STATUS_SUCCESS) {
result = 0;
if (!WiFiRegisterLinkCallback(&linkUpHandler, &linkDownHandler)) {
printf("Link call back handles registered - per default!\n");
} else {
printf("Link call back handles registered - status failed !\n");
}
} else {
printf("WiFiStart STA mode failed !\n");
}
return result;
}
int es_create_softap(void)
{
printf("es_create_softap in\n");
slsi_ap_config_t *app_settings = (slsi_ap_config_t *)zalloc(sizeof(slsi_ap_config_t));
if(app_settings == NULL)
return -1;
g_wifi_state = WIFI_DISCONNECTED;
// SSID Format: <device name>_E1<MNID><onboarding id>0<last 2 segments of mac>
// device name - is as per device name (refer st_main.c)
// MNID and onboarding id - you get from s-devworkspace
char *es_softap_ssid = CONFIG_IOTLITE_SSID_SOFTAP;
char* es_softap_passphrase = CONFIG_IOTLITE_PWD_SOFTAP;
char *es_softap_security = CONFIG_IOTLITE_SECURITY_SOFTAP;
printf("SoftAP SSID : %s\n", es_softap_ssid);
memcpy(app_settings->ssid, (uint8_t *)es_softap_ssid, strlen(es_softap_ssid));
app_settings->ssid_len = strlen(es_softap_ssid);
app_settings->beacon_period = 100;
app_settings->DTIM = 2;
app_settings->channel = 1;
app_settings->phy_mode = 1;
app_settings->security = es_get_security_config(es_softap_security, es_softap_passphrase);
printf("Starting AP mode...\n");
if(WiFiStart(SLSI_WIFI_SOFT_AP_IF, app_settings) == SLSI_STATUS_SUCCESS) {
if (!WiFiRegisterLinkCallback(&linkUpHandler, &linkDownHandler)) {
printf("Link call back handles registered - per default!\n");
} else {
printf("Link call back handles registered - status failed !\n");
}
} else {
printf("WiFiStart AP mode failed !\n");
free(app_settings->security);
return -1;
}
free(app_settings->security);
printf("es_create_softap out\n");
return 0;
}
void es_stop_softap(void)
{
printf("es_stop_softap in\n");
stop_dhcp(SLSI_WIFI_SOFT_AP_IF);
printf("es_stop_softap out\n");
}
int wifi_join(const char *ssid, const char *security, const char *passwd)
{
printf("wifi_join in\n");
int ret;
slsi_security_config_t *security_config;
uint8_t ssid_len = strlen((char *)ssid);
security_config = es_get_security_config(security, passwd);
printf("Joining selected network...\n");
ret = WiFiNetworkJoin((uint8_t*)ssid, ssid_len, NULL, security_config);
if (ret != 0) {
printf("SLSI_WiFiNetworkJoin start failed, ret = %d!\n", ret);
return -1;
} else {
printf("WiFiNetworkJoin start success!\n");
}
if (security_config) {
free(security_config);
security_config = NULL;
}
printf("wifi_join out\n");
return ret;
}
int dhcpserver_start(void)
{
printf("dhcpserver_start in\n");
ip_addr_t ipaddr, netmask, gateway;
gnet_if = netif_find(CTRL_IFNAME);
if (gnet_if == NULL) {
return -1;
}
// Setting static IP as 192.168.43.10 in AP mode
ipaddr.addr = 0x0A2BA8C0;
netmask.addr = 0x00FFFFFF;
gateway.addr = 0x012FA8C0;
netif_set_addr(gnet_if, &ipaddr, &netmask, &gateway);
netif_set_up(gnet_if);
if (dhcps_start(gnet_if) != ERR_OK) {
printf("DHCP Server - started Fail\n");
return -1;
}
printf("dhcpserver_start out: start success\n");
return 0;
}
int dhcpc_start(void)
{
printf("dhcpc_start in\n");
gnet_if = netif_find(CTRL_IFNAME);
if (gnet_if == NULL) {
return -1;
}
if (gnet_if->dhcp != NULL){
gnet_if->dhcp = NULL;
}
printf( "netic hwaddr_len %d\n"
"netic hwaddr %x%x%x%x%x%x\n"
"netic mtu %d\n"
"netic flags %x\n",
gnet_if->hwaddr_len,
gnet_if->hwaddr[0], gnet_if->hwaddr[1], gnet_if->hwaddr[2],
gnet_if->hwaddr[3], gnet_if->hwaddr[4], gnet_if->hwaddr[5],
gnet_if->mtu, gnet_if->flags);
err_t res = dhcp_start(gnet_if);
if (res) {
printf("slsi_start_dhcp dhcp_start result %d\n", res);
return -1;
}
printf("slsi_start_dhcp start success state %d result %d\n",
gnet_if->dhcp->state, res);
int32_t timeleft = 5000000;
while (gnet_if->dhcp->state != DHCP_BOUND) {
usleep(10000);
timeleft -= 10000;
if (timeleft <= 0)
break;
}
if (gnet_if->dhcp->state == DHCP_BOUND) {
printf("DHCP Client - got IP address %u.%u.%u.%u\n",
(unsigned char) ((htonl(gnet_if->ip_addr.addr) >> 24) & 0xff),
(unsigned char) ((htonl(gnet_if->ip_addr.addr) >> 16) & 0xff),
(unsigned char) ((htonl(gnet_if->ip_addr.addr) >> 8) & 0xff),
(unsigned char) ((htonl(gnet_if->ip_addr.addr) >> 0) & 0xff));
} else {
if (timeleft <= 0) {
printf("DHCP Client - Timeout fail to get ip address\n");
return -1;
}
}
printf("dhcpc_start out\n");
return 0;
}
int stop_dhcp(int interface)
{
printf("stop_dhcp in\n");
ip_addr_t ipaddr;
if (gnet_if == NULL) {
printf("stop_dhcp - nothing to stop\n");
return 0;
}
if (interface == SLSI_WIFI_STATION_IF) {
if (gnet_if->dhcp != NULL) {
dhcp_stop(gnet_if);
printf("dhcp client stop!!");
} else {
return -1;
}
} else if (interface == SLSI_WIFI_SOFT_AP_IF) {
if (gnet_if->dhcps_pcb != NULL) {
dhcps_stop(gnet_if);
printf("dhcp server stop!!");
ipaddr.addr = 0;
netif_set_ipaddr(gnet_if, &ipaddr);
} else {
return -1;
}
}
gnet_if = NULL;
printf("stop_dhcp out\n");
return 0;
}
......@@ -85,7 +85,7 @@ OBJ_SERVER=$(addprefix obj/server/,$(filter-out oc_obt.o,$(notdir $(SRC:.c=.o)))
OBJ_CLIENT_SERVER=$(addprefix obj/client_server/,$(notdir $(SRC:.c=.o)))
OBJ_CA=$(addprefix obj/ca/,$(notdir $(SRC_CA:.c=.o)))
OBJ_RD_CLIENT=$(addprefix obj/rd_client/,$(notdir $(SRC_RD_CLIENT:.c=.o)))
VPATH=../../messaging/coap/:../../util/:../../api/:../../deps/tinycbor/src/:../../deps/mbedtls/library:../../service/easy-setup/enrollee/:../../service/easy-setup/enrollee/samsung/:../../service/cloud-access/src/:../../service/resource-directory/client/src/:../../port/
VPATH=../../messaging/coap/:../../util/:../../api/:../../deps/tinycbor/src/:../../deps/mbedtls/library:../../service/easy-setup/enrollee/:../../service/easy-setup/enrollee/samsung/:../../service/cloud-access/src/:../../service/resource-directory/client/src/:../../port/:../../service/st-app-fw/src/:../../service/st-app-fw/src/port/linux:
LIBS?= -lm -pthread -lrt
SAMPLES = server simpleserver \
......@@ -97,6 +97,12 @@ endif
ifeq ($(EASYSETUP),1)
SAMPLES += easysetup_linux sc_easysetup_linux
endif
ifeq ($(ST_APP_FW),1)
ifneq ($(EASYSETUP),1)
$(error To use ST_APP_FW you should include EASYSETUP flag also.)
endif
SAMPLES += st_things
endif
......@@ -122,6 +128,13 @@ ifeq ($(EASYSETUP),1)
OBJ_ES=$(addprefix obj/es/,$(notdir $(SRC_ES:.c=.o)))
endif
ifeq ($(ST_APP_FW),1)
SRC_ST=$(wildcard ../../service/st-app-fw/src/*.c ../../service/st-app-fw/src/port/linux/*.c)
CFLAGS_ST=-I../../service/st-app-fw/include
CFLAGS_ST+= -DST_APP_FW
OBJ_ST=$(addprefix obj/st/,$(notdir $(SRC_ST:.c=.o)))
endif
ifeq ($(DEBUG),1)
CFLAGS += -DOC_DEBUG -g -O0
else
......@@ -181,7 +194,8 @@ CONSTRAINED_LIBS = libiotivity-constrained-server.a libiotivity-constrained-clie
libiotivity-constrained-client-server.a libiotivity-constrained-client-server.so \
libiotivity-constrained-easysetup.a \
libiotivity-constrained-cloudaccess.a libiotivity-constrained-cloudaccess.so \
libiotivity-constrained-rd-client.a libiotivity-constrained-rd-client.so
libiotivity-constrained-rd-client.a libiotivity-constrained-rd-client.so \
libst-app-framework.a libst-app-framework.so
PC = iotivity-constrained-client.pc iotivity-constrained-server.pc \
iotivity-constrained-client-server.pc
......@@ -241,6 +255,10 @@ obj/rd_client/%.o: %.c
@mkdir -p ${@D}
${CC} -c -o $@ $< ${CFLAGS} ${CFLAGS_RD_CLIENT}