Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions build/openwrt/Makefile_package
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ define Package/easymesh/install
$(INSTALL_BIN) $(PKG_BUILD_DIR)/unified-wifi-mesh/install/bin/onewifi_em_agent $(1)/usr/bin/; \
$(INSTALL_BIN) $(PKG_BUILD_DIR)/unified-wifi-mesh/install/bin/onewifi_em_ctrl $(1)/usr/bin/; \
$(INSTALL_BIN) $(PKG_BUILD_DIR)/OneWifi/install/bin/OneWifi $(1)/usr/bin/; \
$(INSTALL_BIN) $(PKG_BUILD_DIR)/OneWifi/install/bin/em_topo_test $(1)/usr/bin/; \
$(CP) $(PKG_BUILD_DIR)/OneWifi/config/openwrt/banana-pi/* $(1)/banana-pi/; \
$(CP) $(PKG_BUILD_DIR)/OneWifi/config/openwrt/banana-pi/InterfaceMap_kernel_5.4.json $(1)/banana-pi/InterfaceMap.json; \
$(INSTALL_DIR) $(1)/etc/init.d; \
Expand Down
19 changes: 17 additions & 2 deletions build/openwrt/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,15 @@ LDFLAGS = $(LIBDIRS) $(LIBS)

PROGRAM = $(INSTALLDIR)/bin/OneWifi

TEST_PROGRAM = $(INSTALLDIR)/bin/em_topo_test
TEST_SOURCES = $(ONE_WIFI_HOME)/source/apps/test/test.c
TEST_OBJECTS = $(TEST_SOURCES:.c=.o)
TEST_CFLAGS = -g -Os -fPIC \
-I$(STAGING_DIR)/usr/include \
-DBANANA_PI_PORT -D_PLATFORM_BANANAPI_R4_ -DEM_APP \
-DEM_WEBSOCKET_PUSH
TEST_LDFLAGS = -L$(STAGING_DIR)/usr/lib -lssl -lcrypto -lcjson

INCLUDEDIRS = \
-I$(WIFI_CCSP_COMMON_LIB)/source/cosa/include \
-I$(WIFI_CCSP_COMMON_LIB)/source/cosa/include/linux \
Expand Down Expand Up @@ -538,7 +547,7 @@ $(BUILD_DIR):
#


all: $(BUILD_DIR) $(CMN_LIBRARY) $(HAL_LIBRARY) $(WEBCONFIG_LIBRARY) $(HE_BUS_LIBRARY) $(PROGRAM)
all: $(BUILD_DIR) $(CMN_LIBRARY) $(HAL_LIBRARY) $(WEBCONFIG_LIBRARY) $(HE_BUS_LIBRARY) $(PROGRAM) $(TEST_PROGRAM)

$(CMN_LIBRARY): $(ALL_CMN_LIB_OBJECTS)
$(AR) -rcs $@ $^
Expand Down Expand Up @@ -566,6 +575,12 @@ $(HE_BUS_LIBRARY): $(ALL_HEBUS_LIB_OBJECTS)
$(PROGRAM): $(ALLOBJECTS)
$(CXX) -o $@ $(ALLOBJECTS) $(LDFLAGS)

$(TEST_PROGRAM): $(TEST_OBJECTS)
$(CC) -o $@ $(TEST_OBJECTS) $(TEST_LDFLAGS)

$(ONE_WIFI_HOME)/source/apps/test/%.o: $(ONE_WIFI_HOME)/source/apps/test/%.c
$(CC) $(TEST_CFLAGS) -o $@ -c $<

#
# Object targets: rules that define objects, their dependencies, and
# a list of commands for compilation.
Expand All @@ -580,7 +595,7 @@ $(PROGRAM): $(ALLOBJECTS)
# Clean target: "make -f Makefile.Linux clean" to remove unwanted objects and executables.
#
clean:
$(RM) $(ALLOBJECTS) $(ALL_CMN_LIB_OBJECTS) $(ALL_HAL_LIB_OBJECTS) $(CMN_LIBRARY) $(HE_BUS_LIBRARY) $(WEBCONFIG_LIBRARY) $(MATH_UTIL_LIBRARY) $(QUALITY_MANAGER_LIBRARY)$(HAL_LIBRARY) $(HOSTAP_LIBRARY) $(PROGRAM)
$(RM) $(ALLOBJECTS) $(ALL_CMN_LIB_OBJECTS) $(ALL_HAL_LIB_OBJECTS) $(CMN_LIBRARY) $(HE_BUS_LIBRARY) $(WEBCONFIG_LIBRARY) $(MATH_UTIL_LIBRARY) $(QUALITY_MANAGER_LIBRARY)$(HAL_LIBRARY) $(HOSTAP_LIBRARY) $(PROGRAM) $(TEST_OBJECTS) $(TEST_PROGRAM)

#
# Run target: "make -f Makefile.Linux run" to execute the application
Expand Down
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ AC_CONFIG_FILES(
source/utils/Makefile
source/utils/quality_mgr/Makefile
source/utils/math_utils/Makefile
source/apps/test/Makefile
Makefile
)

Expand Down
2 changes: 2 additions & 0 deletions source/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,5 @@ endif
if WITH_GTEST_SUPPORT
SUBDIRS += test
endif

SUBDIRS += apps/test
30 changes: 30 additions & 0 deletions source/apps/test/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
##########################################################################
# If not stated otherwise in this file or this component's LICENSE
# file the following copyright and licenses apply:
#
# Copyright 2025 RDK Management
#
# 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.
##########################################################################

bin_PROGRAMS = em_topo_test

em_topo_test_SOURCES = test.c

em_topo_test_CFLAGS = \
-DEM_WEBSOCKET_PUSH \
-DBANANA_PI_PORT \
-DEM_APP \
-g -Os

em_topo_test_LDADD = -lssl -lcrypto -lcjson
Loading
Loading