From 8707ea34218a0aae071d4fb8d25e23273c828ea1 Mon Sep 17 00:00:00 2001 From: Damien George Date: Fri, 29 Aug 2014 22:42:26 +0100 Subject: lib: Add lib and libm, moving current files from stmhal. Top-level lib directory is for standard C libraries that we want to provide our own versions of (for efficiency and stand-alone reasons). It currently has libm in it for math functions. Also add atanf and atan2f, which addresses issue #837. --- stmhal/Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'stmhal/Makefile') diff --git a/stmhal/Makefile b/stmhal/Makefile index ba965481a..707b898a5 100644 --- a/stmhal/Makefile +++ b/stmhal/Makefile @@ -60,6 +60,13 @@ endif # uncomment this if you want libgcc #LIBS += $(shell $(CC) -print-libgcc-file-name) +SRC_LIB = $(addprefix lib/,\ + libm/math.c \ + libm/mathsincos.c \ + libm/atanf.c \ + libm/atan2f.c \ + ) + SRC_C = \ main.c \ string0.c \ @@ -84,8 +91,6 @@ SRC_C = \ uart.c \ usb.c \ printf.c \ - math.c \ - mathsincos.c \ gccollect.c \ pybstdio.c \ readline.c \ @@ -193,6 +198,7 @@ SRC_CC3K = $(addprefix $(CC3K_DIR)/,\ OBJ = OBJ += $(PY_O) +OBJ += $(addprefix $(BUILD)/, $(SRC_LIB:.c=.o)) OBJ += $(addprefix $(BUILD)/, $(SRC_C:.c=.o)) OBJ += $(addprefix $(BUILD)/, $(SRC_S:.s=.o)) OBJ += $(addprefix $(BUILD)/, $(SRC_HAL:.c=.o)) -- cgit v1.2.3