Makefile.include: Generate dependency files before build (#225)

* Makefile.include: Generate .d files before build

* Makefile.include: Generate .small.d files before build
pull/25/head
Saleem Rashid 7 years ago committed by Pavol Rusnak
parent 5831e53854
commit d006ef6bf7

@ -134,10 +134,16 @@ $(NAME).elf: $(OBJS) $(LDSCRIPT) $(TOOLCHAIN_DIR)/lib/libopencm3_stm32f2.a $(TOP
$(AS) $(CPUFLAGS) -o $@ $<
%.o: %.c Makefile
$(CC) $(CFLAGS) -MMD -o $@ -c $<
$(CC) $(CFLAGS) -MMD -MP -o $@ -c $<
%.small.o: %.c Makefile
$(CC) $(CFLAGS) -MMD -o $@ -c $<
$(CC) $(CFLAGS) -MMD -MP -o $@ -c $<
%.d: %.c Makefile
@$(CC) $(CFLAGS) -MM -MP -MG -o $@ $<
%.small.d: %.c Makefile
@$(CC) $(CFLAGS) -MM -MP -MG -o $@ $<
clean::
rm -f $(OBJS)

@ -101,14 +101,6 @@ bootloader.o: ../fastflash/bootloader.bin
--rename-section .data=.rodata \
$< $@
# ensure header files are generated prior to compiling sources
coins.c crypto.c fsm.c transaction.c: coins_count.h
coins.c: coins_array.h
nem2.c layout2.c fsm.c: nem_mosaics.h
#################
# Code Generation
coins_count.h: coins-gen.py coins.json
./$< count > $@

Loading…
Cancel
Save