summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2017-08-25 22:16:51 (GMT)
committerChristian Pointner <equinox@spreadspace.org>2017-08-25 22:16:51 (GMT)
commit5fc6f54209d1c4a93e7dfb024a2359e6a664778c (patch)
tree2418fddbe8bcc5c83bce95d6b000614060525a92
parentfd1895848012bc5b7f39969aea3759326dbd3ce5 (diff)
only build std-perihp components who are needed
-rw-r--r--blink/Makefile1
-rw-r--r--stdperiph.mk2
2 files changed, 2 insertions, 1 deletions
diff --git a/blink/Makefile b/blink/Makefile
index 8255b73..b7e723c 100644
--- a/blink/Makefile
+++ b/blink/Makefile
@@ -28,5 +28,6 @@ EXTERNAL_LIBS := stdperiph
SPREADSTM8_PATH := ..
STDPERIPH_PATH := $(SPREADSTM8_PATH)/contrib/STM8S_StdPeriph_Lib
+STDPERIPH_COMPONENTS := gpio
include $(SPREADSTM8_PATH)/include.mk
diff --git a/stdperiph.mk b/stdperiph.mk
index b6deb76..2ba1928 100644
--- a/stdperiph.mk
+++ b/stdperiph.mk
@@ -25,7 +25,7 @@ CFLAGS += -D$(STDPERIPH_MCU)
CFLAGS += -I$(STDPERIPH_PATH)/Libraries/STM8S_StdPeriph_Driver/inc
CFLAGS += -I./
-SRC:=$(wildcard $(STDPERIPH_PATH)/Libraries/STM8S_StdPeriph_Driver/src/*.c)
+SRC:=$(STDPERIPH_COMPONENTS:%=$(STDPERIPH_PATH)/Libraries/STM8S_StdPeriph_Driver/src/stm8s_%.c)
OBJ = $(SRC:%.c=%.rel)
libstdperiph.a: $(OBJ)