From 2955f66f6627ae8fd3c41c8f05374cf852e330b0 Mon Sep 17 00:00:00 2001 From: rusefillc Date: Sat, 26 Feb 2022 16:19:57 -0500 Subject: [PATCH] JNI for test coverage #3965 --- unit_tests/Makefile | 1 + unit_tests/unit_test_rules.mk | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/unit_tests/Makefile b/unit_tests/Makefile index e0cff56aa0..bfbac568fe 100644 --- a/unit_tests/Makefile +++ b/unit_tests/Makefile @@ -43,6 +43,7 @@ INCDIR += \ $(PROJECT_DIR)/config/boards/hellen \ $(UNIT_TESTS_DIR)/test_data_structures \ $(UNIT_TESTS_DIR)/chibios-mock \ + $(UNIT_TESTS_DIR)/native \ $(UNIT_TESTS_DIR)/tests \ $(UNIT_TESTS_DIR)/tests/sensor \ $(UNIT_TESTS_DIR)/test_basic_math diff --git a/unit_tests/unit_test_rules.mk b/unit_tests/unit_test_rules.mk index 88207a1e60..1e4dc20e5f 100644 --- a/unit_tests/unit_test_rules.mk +++ b/unit_tests/unit_test_rules.mk @@ -132,7 +132,13 @@ OD = $(TRGT)objdump HEX = $(CP) -O ihex BIN = $(CP) -O binary -AOPT = -fPIC +AOPT = -fPIC -I$(JAVA_HOME)/include + +ifeq ($(OS),Windows_NT) + AOPT += -I$(JAVA_HOME)/include/win32 +else + AOPT += -I$(JAVA_HOME)/include/linux +endif # Define C warning options here CWARN = -Wall -Wextra -Wstrict-prototypes -pedantic -Wmissing-prototypes -Wold-style-definition