mirror of
https://github.com/rfivet/stm32bringup.git
synced 2024-09-30 03:45:59 -04:00
Reviewed automatic dependencies generation.
This commit is contained in:
parent
e9007946af
commit
38cdb2ecc8
19
Makefile
19
Makefile
@ -109,8 +109,8 @@ CRC32SIGN := 1
|
|||||||
#SRCS = startup.txeie.c adc.c adccalib.c ds18b20.c
|
#SRCS = startup.txeie.c adc.c adccalib.c ds18b20.c
|
||||||
#SRCS = startup.ram.c txeie.c uptime.1.c
|
#SRCS = startup.ram.c txeie.c uptime.1.c
|
||||||
SRCS = startup.crc.c txeie.c uptime.1.c
|
SRCS = startup.crc.c txeie.c uptime.1.c
|
||||||
OBJS = $(SRCS:.c=.o)
|
LIBSRCS = printf.c putchar.c puts.c # memset.c memcpy.c
|
||||||
LIBOBJS = printf.o putchar.o puts.o # memset.o memcpy.o
|
ALLSRCS = $(SRCS) $(LIBSRCS)
|
||||||
|
|
||||||
CPU = -mthumb -mcpu=cortex-m0 --specs=nano.specs
|
CPU = -mthumb -mcpu=cortex-m0 --specs=nano.specs
|
||||||
ifdef RAMISRV
|
ifdef RAMISRV
|
||||||
@ -145,9 +145,9 @@ version:
|
|||||||
|
|
||||||
clean:
|
clean:
|
||||||
@echo CLEAN
|
@echo CLEAN
|
||||||
@rm -f *.o *.elf *.map *.lst *.bin *.hex *.a
|
@rm -f *.dep *.o *.elf *.map *.lst *.bin *.hex *.a
|
||||||
|
|
||||||
$(PROJECT).elf: $(OBJS) libstm32.a
|
$(PROJECT).elf: $(SRCS:.c=.o) libstm32.a
|
||||||
boot.elf: boot.o
|
boot.elf: boot.o
|
||||||
ledon.elf: ledon.o
|
ledon.elf: ledon.o
|
||||||
blink.elf: blink.o
|
blink.elf: blink.o
|
||||||
@ -180,10 +180,13 @@ endif
|
|||||||
@echo $@
|
@echo $@
|
||||||
$(OBJCOPY) -O ihex $< $@
|
$(OBJCOPY) -O ihex $< $@
|
||||||
|
|
||||||
libstm32.a: $(LIBOBJS)
|
libstm32.a: $(LIBSRCS:.c=.o)
|
||||||
$(AR) rc $@ $?
|
$(AR) rc $@ $?
|
||||||
|
|
||||||
depend.mak: $(SRCS) $(LIBOBJS:.o=.c)
|
%.dep: %.c
|
||||||
$(CC) ${CDEFINES} -MM $+ > depend.mak
|
@echo $@
|
||||||
|
$(CC) $(CDEFINES) -MM $< > $@
|
||||||
|
|
||||||
include depend.mak
|
ifneq ($(MAKECMDGOALS),clean)
|
||||||
|
include $(ALLSRCS:.c=.dep)
|
||||||
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user