summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorjaseg <git@jaseg.net>2020-08-30 12:17:33 +0200
committerjaseg <git@jaseg.net>2020-08-30 12:17:33 +0200
commitbfd8db0098413474514eab4dfebeb0803ad94fc4 (patch)
tree34bea46c06def022c6197e1a3b760620e1517d84 /Makefile
parente51d35f6d6d15ee09dd368b5c47c547f8646bdf5 (diff)
downloadmoargb-master.tar.gz
moargb-master.tar.bz2
moargb-master.zip
Dimming worksHEADmaster
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 4 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 4cf97a7..b56e124 100644
--- a/Makefile
+++ b/Makefile
@@ -33,8 +33,7 @@ LDFLAGS = -nostdlib
#LDFLAGS += -specs=rdimon.specs -DSEMIHOSTING
LDFLAGS += -Wl,-Map=main.map
#LDFLAGS += -Wl,--gc-sections
-LIBS =
-#LIBS = -lgcc
+LIBS = -lm -lgcc
#LIBS += -lrdimon
CFLAGS += -DSTM32F103xB -DHSE_VALUE=8000000 -DLSE_VALUE=32768
@@ -42,7 +41,7 @@ CFLAGS += -DCOMPILE_TIME=$(shell date +%s) -DTARGET_DATE=$(shell date -d 'Aug 17
LDFLAGS += -Tstm32_flash.ld
CFLAGS += -I$(CMSIS_DEV_PATH)/Include -I$(CMSIS_PATH)/Include -I$(HAL_PATH)/Inc -Iconfig -Wno-unused -I../common
-#LDFLAGS += -L$(CMSIS_PATH)/Lib/GCC -larm_cortexM3l_math
+LIBS += -L$(CMSIS_PATH)/Lib/GCC -larm_cortexM3l_math
###################################################
@@ -61,7 +60,7 @@ cmsis_exports.c: $(CMSIS_DEV_PATH)/Include/stm32f103xb.h $(CMSIS_PATH)/Include/c
$(CC) -c $(CFLAGS) -o $@ $^
# $(CC) -E $(CFLAGS) -o $(@:.o=.pp) $^
-sources.tar.xz: main.c Makefile
+sources.tar.xz: main.c color.c Makefile
tar -caf $@ $^
# don't ask...
@@ -71,7 +70,7 @@ sources.tar.xz.zip: sources.tar.xz
sources.c: sources.tar.xz.zip
xxd -i $< | head -n -1 | sed 's/=/__attribute__((section(".source_tarball"))) =/' > $@
-main.elf: main.c startup_stm32f103xb.s system_stm32f1xx.c $(HAL_PATH)/Src/stm32f1xx_ll_utils.c base.c cmsis_exports.c
+main.elf: main.c color.c startup_stm32f103xb.s system_stm32f1xx.c $(HAL_PATH)/Src/stm32f1xx_ll_utils.c base.c cmsis_exports.c
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
$(OBJCOPY) -O ihex $@ $(@:.elf=.hex)
$(OBJCOPY) -O binary $@ $(@:.elf=.bin)