aboutsummaryrefslogtreecommitdiff
path: root/stmhal/Makefile
diff options
context:
space:
mode:
authorDamien George2014-08-29 22:42:26 +0100
committerDamien George2014-08-29 22:42:26 +0100
commit8707ea34218a0aae071d4fb8d25e23273c828ea1 (patch)
treeac3740094df4d6620ef1e6f73afaa46c1841ca50 /stmhal/Makefile
parent17ae2395c24544a8263ecf1e88572a571325a1ec (diff)
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.
Diffstat (limited to 'stmhal/Makefile')
-rw-r--r--stmhal/Makefile10
1 files changed, 8 insertions, 2 deletions
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))