Use system/libcppbor if available

The unified manifest has libcppbor under system/ instead
of external/. Use the first option if available.

Bug: 285203365
Test: Build Trusty
Change-Id: Idc459524cf80c6711eb181e47ff338f6a929fca0
diff --git a/rules.mk b/rules.mk
index 9cf8c51..9032889 100644
--- a/rules.mk
+++ b/rules.mk
@@ -15,6 +15,7 @@
 
 LOCAL_DIR := $(GET_LOCAL_DIR)
 NANOPB_DIR := external/nanopb-c
+LIBCPPBOR_DIR := $(if $(wildcard system/libcppbor),system/libcppbor,external/libcppbor)
 
 MODULE := $(LOCAL_DIR)
 
@@ -148,7 +149,7 @@
 	trusty/user/base/lib/system_state \
 	trusty/user/base/lib/tipc \
 	external/boringssl \
-	external/libcppbor \
+	$(LIBCPPBOR_DIR) \
 
 # If KEYMASTER_WITH_HWWSK_SUPPORT is set Keymaster will be
 #  compiled with Hardware Wrapped Storage key support