mirror of
git://projects.qi-hardware.com/f32xbase.git
synced 2024-11-27 18:10:38 +02:00
Add build rules to simplify platform-specific Makefiles.
- fw/common/Makefile.common: integrated object file specific build rules that used to live in fw/boot/ - fw/common/Makefile.common: added section titles - fw/common/Makefile.common (upload): removed obsolete target
This commit is contained in:
parent
3f5ec8aa9e
commit
efdacaf589
@ -38,6 +38,10 @@ endif
|
||||
|
||||
all: $(MAIN).bin
|
||||
|
||||
|
||||
# ----- automatic build version information -----------------------------------
|
||||
|
||||
|
||||
version version.h:
|
||||
@if [ -f .version ]; then \
|
||||
v=`cat .version`; \
|
||||
@ -54,6 +58,10 @@ version version.h:
|
||||
|
||||
version.rel: version
|
||||
|
||||
|
||||
# ----- build rules -----------------------------------------------------------
|
||||
|
||||
|
||||
$(MAIN).ihx: $(OBJS:%=%.rel)
|
||||
$(GEN) $(CC_normal) $(CFLAGS) $(LDFLAGS) $(OBJS:%=%.rel)
|
||||
|
||||
@ -67,6 +75,10 @@ $(MAIN).ihx: $(OBJS:%=%.rel)
|
||||
.c.rel:
|
||||
$(CC) $(CFLAGS) -c $<
|
||||
|
||||
|
||||
# ----- dependencies ----------------------------------------------------------
|
||||
|
||||
|
||||
# below, set dummy UART speed to make dependencies build without error
|
||||
|
||||
depend .depend:
|
||||
@ -82,14 +94,32 @@ ifeq (.depend,$(wildcard .depend))
|
||||
include .depend
|
||||
endif
|
||||
|
||||
|
||||
# ----- specific object files -------------------------------------------------
|
||||
|
||||
|
||||
boot.rel: $(F32XBASE)/fw/boot/boot.c
|
||||
$(CC) $(CFLAGS) -o $@ -c $<
|
||||
|
||||
usb.rel: $(F32XBASE)/fw/common/usb.c
|
||||
$(CC) $(CFLAGS) -o $@ -c $<
|
||||
|
||||
dfu.rel: $(F32XBASE)/fw/boot/dfu.c
|
||||
$(CC) $(CFLAGS) -o $@ -c $<
|
||||
|
||||
|
||||
# ----- clean -----------------------------------------------------------------
|
||||
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS:%=%.rel)
|
||||
rm -f $(OBJS:%=%.asm) $(OBJS:%=%.lst)
|
||||
rm -f $(OBJS:%=%.rst) $(OBJS:%=%.sym)
|
||||
rm -f $(MAIN).ihx $(MAIN).lnk $(MAIN).map $(MAIN).mem
|
||||
|
||||
|
||||
# ----- spotless --------------------------------------------------------------
|
||||
|
||||
|
||||
spotless: clean
|
||||
rm -f $(MAIN).bin .depend
|
||||
|
||||
upload:
|
||||
ssh lab neo 'cat \>$(MAIN).bin' <$(MAIN).bin
|
||||
|
Loading…
Reference in New Issue
Block a user