summaryrefslogtreecommitdiff
path: root/test/fuzz
diff options
context:
space:
mode:
authorHiFiPhile <[email protected]>2024-04-26 13:12:56 +0200
committerHiFiPhile <[email protected]>2024-04-26 13:12:56 +0200
commit9ef3755f0316d25864d3ac3a49a2523eabfddf8a (patch)
tree4fb337482662308674101d5269192b7a4fe58f91 /test/fuzz
parentf88a5bb03b2504df272d2cd285b17e66f11dfc64 (diff)
parent69313ef45564cc8967575f47fb8c57371cbea470 (diff)
Merge branch 'master' of https://github.com/hathach/tinyusb into pr/2283
Diffstat (limited to 'test/fuzz')
-rw-r--r--test/fuzz/dcd_fuzz.cc6
-rw-r--r--test/fuzz/device/cdc/CMakeLists.txt18
-rw-r--r--test/fuzz/device/cdc/Makefile1
-rw-r--r--test/fuzz/device/cdc/src/fuzz.cc4
-rw-r--r--test/fuzz/device/msc/CMakeLists.txt6
-rw-r--r--test/fuzz/device/msc/Makefile1
-rw-r--r--test/fuzz/device/msc/src/fuzz.cc1
-rw-r--r--test/fuzz/device/msc/src/usb_descriptors.cc4
-rw-r--r--test/fuzz/device/net/CMakeLists.txt6
-rw-r--r--test/fuzz/device/net/Makefile1
-rw-r--r--test/fuzz/device/net/src/arch/cc.h32
-rw-r--r--test/fuzz/device/net/src/fuzz.cc2
-rw-r--r--test/fuzz/device/net/src/lwipopts.h28
-rw-r--r--test/fuzz/device/net/src/usb_descriptors.cc4
-rw-r--r--test/fuzz/dicts/cdc.dict1
-rw-r--r--test/fuzz/make.mk36
-rw-r--r--test/fuzz/msc_fuzz.cc2
-rw-r--r--test/fuzz/net_fuzz.cc4
-rw-r--r--test/fuzz/rules.mk10
19 files changed, 93 insertions, 74 deletions
diff --git a/test/fuzz/dcd_fuzz.cc b/test/fuzz/dcd_fuzz.cc
index 7153e20f0..06ddddc4a 100644
--- a/test/fuzz/dcd_fuzz.cc
+++ b/test/fuzz/dcd_fuzz.cc
@@ -39,7 +39,7 @@ struct State {
uint8_t address;
};
-static State state = {false, 0, 0};
+tu_static State state = {false, 0, 0};
//--------------------------------------------------------------------+
// Controller API
@@ -185,7 +185,7 @@ bool dcd_edpt_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t *buffer,
/* TODO: implement a fuzzed version of this.
bool dcd_edpt_xfer_fifo(uint8_t rhport, uint8_t ep_addr, tu_fifo_t *ff,
- uint16_t total_bytes) {}
+ uint16_t total_bytes) {}
*/
// Stall endpoint, any queuing transfer should be removed from endpoint
@@ -205,4 +205,4 @@ void dcd_edpt_clear_stall(uint8_t rhport, uint8_t ep_addr) {
UNUSED(ep_addr);
return;
}
-} \ No newline at end of file
+}
diff --git a/test/fuzz/device/cdc/CMakeLists.txt b/test/fuzz/device/cdc/CMakeLists.txt
index fa6e83b7e..c60f292b9 100644
--- a/test/fuzz/device/cdc/CMakeLists.txt
+++ b/test/fuzz/device/cdc/CMakeLists.txt
@@ -14,16 +14,16 @@ add_executable(${PROJECT})
# Example source
target_sources(${PROJECT} PUBLIC
- ${CMAKE_CURRENT_SOURCE_DIR}/src/main.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/msc_disk.c
- ${CMAKE_CURRENT_SOURCE_DIR}/src/usb_descriptors.c
- )
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/main.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/msc_disk.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/usb_descriptors.c
+ )
# Example include
target_include_directories(${PROJECT} PUBLIC
- ${CMAKE_CURRENT_SOURCE_DIR}/src
- )
+ ${CMAKE_CURRENT_SOURCE_DIR}/src
+ )
-# Configure compilation flags and libraries for the example... see the corresponding function
-# in hw/bsp/FAMILY/family.cmake for details.
-family_configure_device_example(${PROJECT}) \ No newline at end of file
+# Configure compilation flags and libraries for the example without RTOS.
+# See the corresponding function in hw/bsp/FAMILY/family.cmake for details.
+family_configure_device_example(${PROJECT} noos)
diff --git a/test/fuzz/device/cdc/Makefile b/test/fuzz/device/cdc/Makefile
index ee51936b5..7071df057 100644
--- a/test/fuzz/device/cdc/Makefile
+++ b/test/fuzz/device/cdc/Makefile
@@ -1,4 +1,3 @@
-include ../../../../tools/top.mk
include ../../make.mk
INC += \
diff --git a/test/fuzz/device/cdc/src/fuzz.cc b/test/fuzz/device/cdc/src/fuzz.cc
index d40483ca6..0560e8621 100644
--- a/test/fuzz/device/cdc/src/fuzz.cc
+++ b/test/fuzz/device/cdc/src/fuzz.cc
@@ -143,7 +143,7 @@ void cdc_task(FuzzedDataProvider *provider) {
// TODO: Fuzz interface number
(void)tud_cdc_n_write(0, buffer.data(), buffer.size());
} break;
-
+
case kCdcNWriteChar:
// TODO: Fuzz interface number
(void)tud_cdc_n_write_char(0, provider->ConsumeIntegral<char>());
@@ -171,4 +171,4 @@ case kMaxValue:
break;
}
}
-} \ No newline at end of file
+}
diff --git a/test/fuzz/device/msc/CMakeLists.txt b/test/fuzz/device/msc/CMakeLists.txt
index fa6e83b7e..8bff217cb 100644
--- a/test/fuzz/device/msc/CMakeLists.txt
+++ b/test/fuzz/device/msc/CMakeLists.txt
@@ -24,6 +24,6 @@ target_include_directories(${PROJECT} PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/src
)
-# Configure compilation flags and libraries for the example... see the corresponding function
-# in hw/bsp/FAMILY/family.cmake for details.
-family_configure_device_example(${PROJECT}) \ No newline at end of file
+# Configure compilation flags and libraries for the example without RTOS.
+# See the corresponding function in hw/bsp/FAMILY/family.cmake for details.
+family_configure_device_example(${PROJECT} noos)
diff --git a/test/fuzz/device/msc/Makefile b/test/fuzz/device/msc/Makefile
index ee51936b5..7071df057 100644
--- a/test/fuzz/device/msc/Makefile
+++ b/test/fuzz/device/msc/Makefile
@@ -1,4 +1,3 @@
-include ../../../../tools/top.mk
include ../../make.mk
INC += \
diff --git a/test/fuzz/device/msc/src/fuzz.cc b/test/fuzz/device/msc/src/fuzz.cc
index 568900452..371d49882 100644
--- a/test/fuzz/device/msc/src/fuzz.cc
+++ b/test/fuzz/device/msc/src/fuzz.cc
@@ -59,4 +59,3 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
return 0;
}
-
diff --git a/test/fuzz/device/msc/src/usb_descriptors.cc b/test/fuzz/device/msc/src/usb_descriptors.cc
index ded401fc9..efe4d0a3c 100644
--- a/test/fuzz/device/msc/src/usb_descriptors.cc
+++ b/test/fuzz/device/msc/src/usb_descriptors.cc
@@ -44,7 +44,7 @@
// Invoked when received GET DEVICE DESCRIPTOR
// Application return pointer to descriptor
uint8_t const *tud_descriptor_device_cb(void) {
- static tusb_desc_device_t const desc_device = {
+ tu_static tusb_desc_device_t const desc_device = {
.bLength = sizeof(tusb_desc_device_t),
.bDescriptorType = TUSB_DESC_DEVICE,
.bcdUSB = USB_BCD,
@@ -184,7 +184,7 @@ char const *string_desc_arr[] = {
};
-static uint16_t _desc_str[32];
+tu_static uint16_t _desc_str[32];
// Invoked when received GET STRING DESCRIPTOR request
// Application return pointer to descriptor, whose contents must exist long
diff --git a/test/fuzz/device/net/CMakeLists.txt b/test/fuzz/device/net/CMakeLists.txt
index fa6e83b7e..8bff217cb 100644
--- a/test/fuzz/device/net/CMakeLists.txt
+++ b/test/fuzz/device/net/CMakeLists.txt
@@ -24,6 +24,6 @@ target_include_directories(${PROJECT} PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/src
)
-# Configure compilation flags and libraries for the example... see the corresponding function
-# in hw/bsp/FAMILY/family.cmake for details.
-family_configure_device_example(${PROJECT}) \ No newline at end of file
+# Configure compilation flags and libraries for the example without RTOS.
+# See the corresponding function in hw/bsp/FAMILY/family.cmake for details.
+family_configure_device_example(${PROJECT} noos)
diff --git a/test/fuzz/device/net/Makefile b/test/fuzz/device/net/Makefile
index 22241fcdc..4e99604ad 100644
--- a/test/fuzz/device/net/Makefile
+++ b/test/fuzz/device/net/Makefile
@@ -1,6 +1,5 @@
DEPS_SUBMODULES += lib/lwip
-include ../../../../tools/top.mk
include ../../make.mk
# suppress warning caused by lwip
diff --git a/test/fuzz/device/net/src/arch/cc.h b/test/fuzz/device/net/src/arch/cc.h
index 56a0cacf7..9f30b91cb 100644
--- a/test/fuzz/device/net/src/arch/cc.h
+++ b/test/fuzz/device/net/src/arch/cc.h
@@ -1,8 +1,8 @@
/*
* Copyright (c) 2001-2003 Swedish Institute of Computer Science.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification,
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
@@ -11,21 +11,21 @@
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
- * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
- * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+ * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+ * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
* OF SUCH DAMAGE.
*
* This file is part of the lwIP TCP/IP stack.
- *
+ *
* Author: Adam Dunkels <[email protected]>
*
*/
@@ -42,7 +42,7 @@ typedef int sys_prot_t;
#if defined (__ICCARM__)
#define PACK_STRUCT_BEGIN
-#define PACK_STRUCT_STRUCT
+#define PACK_STRUCT_STRUCT
#define PACK_STRUCT_END
#define PACK_STRUCT_FIELD(x) x
#define PACK_STRUCT_USE_INCLUDES
@@ -50,7 +50,7 @@ typedef int sys_prot_t;
#elif defined (__CC_ARM)
#define PACK_STRUCT_BEGIN __packed
-#define PACK_STRUCT_STRUCT
+#define PACK_STRUCT_STRUCT
#define PACK_STRUCT_END
#define PACK_STRUCT_FIELD(x) x
diff --git a/test/fuzz/device/net/src/fuzz.cc b/test/fuzz/device/net/src/fuzz.cc
index ea4943665..a6935928a 100644
--- a/test/fuzz/device/net/src/fuzz.cc
+++ b/test/fuzz/device/net/src/fuzz.cc
@@ -81,7 +81,7 @@ void net_task(FuzzedDataProvider *provider) {
assert(provider != NULL);
switch (provider->ConsumeEnum<NetApiFuncs>()) {
-
+
case kNetworkRecvRenew:
tud_network_recv_renew();
break;
diff --git a/test/fuzz/device/net/src/lwipopts.h b/test/fuzz/device/net/src/lwipopts.h
index a215017c7..336c9243d 100644
--- a/test/fuzz/device/net/src/lwipopts.h
+++ b/test/fuzz/device/net/src/lwipopts.h
@@ -1,8 +1,8 @@
/*
* Copyright (c) 2001-2003 Swedish Institute of Computer Science.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification,
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
@@ -11,21 +11,21 @@
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
- * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
- * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+ * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+ * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
* OF SUCH DAMAGE.
*
* This file is part of the lwIP TCP/IP stack.
- *
+ *
* Author: Simon Goldschmidt
*
*/
diff --git a/test/fuzz/device/net/src/usb_descriptors.cc b/test/fuzz/device/net/src/usb_descriptors.cc
index c600bd801..5597d49d5 100644
--- a/test/fuzz/device/net/src/usb_descriptors.cc
+++ b/test/fuzz/device/net/src/usb_descriptors.cc
@@ -45,7 +45,7 @@
// Invoked when received GET DEVICE DESCRIPTOR
// Application return pointer to descriptor
uint8_t const *tud_descriptor_device_cb(void) {
- static tusb_desc_device_t const desc_device = {
+ tu_static tusb_desc_device_t const desc_device = {
.bLength = sizeof(tusb_desc_device_t),
.bDescriptorType = TUSB_DESC_DEVICE,
.bcdUSB = USB_BCD,
@@ -189,7 +189,7 @@ char const *string_desc_arr[] = {
"TinyUSB CDC", // 4: CDC Interface
};
-static uint16_t _desc_str[32];
+tu_static uint16_t _desc_str[32];
// Invoked when received GET STRING DESCRIPTOR request
// Application return pointer to descriptor, whose contents must exist long
diff --git a/test/fuzz/dicts/cdc.dict b/test/fuzz/dicts/cdc.dict
index 138775cdc..421eb8ed9 100644
--- a/test/fuzz/dicts/cdc.dict
+++ b/test/fuzz/dicts/cdc.dict
@@ -71,4 +71,3 @@ RNDIS_PACKET_TYPE_FUNCTIONAL="\x00\x00\x40\x00"
# NIC driver frames that a Token Ring NIC receives.
RNDIS_PACKET_TYPE_MAC_FRAME="\x00\x00\x80\x00"
RNDIS_PACKET_TYPE_NO_LOCAL="\x00\x01\x00\x00"
-
diff --git a/test/fuzz/make.mk b/test/fuzz/make.mk
index 6717ebc80..b7b6d6a75 100644
--- a/test/fuzz/make.mk
+++ b/test/fuzz/make.mk
@@ -2,6 +2,34 @@
# Common make definition for all examples
# ---------------------------------------
+#-------------- TOP and CURRENT_PATH ------------
+
+# Set TOP to be the path to get from the current directory (where make was
+# invoked) to the top of the tree. $(lastword $(MAKEFILE_LIST)) returns
+# the name of this makefile relative to where make was invoked.
+THIS_MAKEFILE := $(lastword $(MAKEFILE_LIST))
+
+# strip off /tools/top.mk to get for example ../../..
+# and Set TOP to an absolute path
+TOP = $(abspath $(subst make.mk,../..,$(THIS_MAKEFILE)))
+
+# Set CURRENT_PATH to the relative path from TOP to the current directory, ie examples/device/cdc_msc_freertos
+CURRENT_PATH = $(subst $(TOP)/,,$(abspath .))
+
+# Detect whether shell style is windows or not
+# https://stackoverflow.com/questions/714100/os-detecting-makefile/52062069#52062069
+ifeq '$(findstring ;,$(PATH))' ';'
+# PATH contains semicolon - so we're definitely on Windows.
+CMDEXE := 1
+
+# makefile shell commands should use syntax for DOS CMD, not unix sh
+# Unfortunately, SHELL may point to sh or bash, which can't accept DOS syntax.
+# We can't just use sh, because while sh and/or bash shell may be available,
+# many Windows environments won't have utilities like realpath used below, so...
+# Force DOS command shell on Windows.
+SHELL := cmd.exe
+endif
+
# Build directory
BUILD := _build
PROJECT := $(notdir $(CURDIR))
@@ -42,8 +70,6 @@ SANITIZER_FLAGS ?= -fsanitize=fuzzer \
CFLAGS += $(COVERAGE_FLAGS) $(SANITIZER_FLAGS)
#-------------- Source files and compiler flags --------------
-
-
INC += $(TOP)/test
# Compiler Flags
@@ -78,7 +104,8 @@ CFLAGS += \
CFLAGS += \
-Wno-error=unreachable-code \
-DOPT_MCU_FUZZ=1 \
- -DCFG_TUSB_MCU=OPT_MCU_FUZZ
+ -DCFG_TUSB_MCU=OPT_MCU_FUZZ \
+ -D_FUZZ
CXXFLAGS += \
-xc++ \
@@ -87,7 +114,7 @@ CXXFLAGS += \
# conversion is too strict for most mcu driver, may be disable sign/int/arith-conversion
# -Wconversion
-
+
# Debugging/Optimization
ifeq ($(DEBUG), 1)
CFLAGS += -Og
@@ -105,4 +132,3 @@ endif
ifneq ($(LOGGER),)
CMAKE_DEFSYM += -DLOGGER=$(LOGGER)
endif
-
diff --git a/test/fuzz/msc_fuzz.cc b/test/fuzz/msc_fuzz.cc
index e906ca971..6e838a682 100644
--- a/test/fuzz/msc_fuzz.cc
+++ b/test/fuzz/msc_fuzz.cc
@@ -159,4 +159,4 @@ int32_t tud_msc_scsi_cb(uint8_t lun, uint8_t const scsi_cmd[16], void *buffer,
}
}
-#endif \ No newline at end of file
+#endif
diff --git a/test/fuzz/net_fuzz.cc b/test/fuzz/net_fuzz.cc
index 8467d6d8e..63cd1ac98 100644
--- a/test/fuzz/net_fuzz.cc
+++ b/test/fuzz/net_fuzz.cc
@@ -67,7 +67,7 @@ void tud_network_init_cb(void) {
// client must provide this: 48-bit MAC address
// TODO removed later since it is not part of tinyusb stack
-const uint8_t tud_network_mac_address[6] = {0};
+uint8_t tud_network_mac_address[6] = {0};
//------------- NCM -------------//
@@ -79,4 +79,4 @@ void tud_network_link_state_cb(bool state) {
}
}
-#endif \ No newline at end of file
+#endif
diff --git a/test/fuzz/rules.mk b/test/fuzz/rules.mk
index d9c2a1a77..ee91c706d 100644
--- a/test/fuzz/rules.mk
+++ b/test/fuzz/rules.mk
@@ -89,7 +89,7 @@ endif
# Rules
# ---------------------------------------
-all: $(BUILD)/$(PROJECT)
+all: $(BUILD)/$(PROJECT)
OBJ_DIRS = $(sort $(dir $(OBJ)))
$(OBJ): | $(OBJ_DIRS)
@@ -111,7 +111,7 @@ vpath %.c . $(TOP)
$(BUILD)/obj/%.o: %.c
@echo CC $(notdir $@)
@$(CC) $(CFLAGS) -c -MD -o $@ $<
-
+
# All cpp srcs
vpath %.cc . $(TOP)
$(BUILD)/obj/%_cxx.o: %.cc
@@ -142,9 +142,7 @@ endif
# get depenecies
.PHONY: get-deps
get-deps:
- ifdef DEPS_SUBMODULES
- git -C $(TOP) submodule update --init $(DEPS_SUBMODULES)
- endif
+ $(PYTHON) $(TOP)/tools/get_deps.py $(DEPS_SUBMODULES)
size: $(BUILD)/$(PROJECT)
-@echo ''
@@ -158,4 +156,4 @@ linkermap: $(BUILD)/$(PROJECT)
# Print out the value of a make variable.
# https://stackoverflow.com/questions/16467718/how-to-print-out-a-variable-in-makefile
print-%:
- @echo $* = $($*) \ No newline at end of file
+ @echo $* = $($*)