From 4ad6b4d4dfed22777a8e7adb97c803bef0553fb0 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Fri, 25 Feb 2022 23:47:03 -0500 Subject: newlib: libc: move stdlib multiplex logic from build to source files Rather than define per-object rules in the Makefile, have small files that define & include the right content. This simplifies the build rules, and makes understanding the source a little easier (imo) as it makes all the subdirs behave the same: you have 1 source file and it produces 1 object. It's also about the same amount of boiler plate, without having to define custom build rules that can fall out of sync. This will also be important as we merge the libc.a build into the top dir since it relies on a single flat list of objects for overrides. Also take the opportunity to clean up the unnecessary header deps in here. Automake provides dependency generation for free now. --- newlib/libc/stdlib/reallocr.c | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 newlib/libc/stdlib/reallocr.c (limited to 'newlib/libc/stdlib/reallocr.c') diff --git a/newlib/libc/stdlib/reallocr.c b/newlib/libc/stdlib/reallocr.c new file mode 100644 index 0000000..45c21d2 --- /dev/null +++ b/newlib/libc/stdlib/reallocr.c @@ -0,0 +1,2 @@ +#define DEFINE_REALLOC +#include "_mallocr.c" -- cgit v1.1