Merge branch 'master' of git://git.devl.org/git/malvira/libmc1322x
This commit is contained in:
commit
7ff7528c85
|
@ -1,5 +1,12 @@
|
||||||
# -*- makefile -*-
|
# -*- makefile -*-
|
||||||
|
|
||||||
|
ifndef BOARD
|
||||||
|
default: allboards
|
||||||
|
else
|
||||||
|
default: all
|
||||||
|
endif
|
||||||
|
.PHONY: default
|
||||||
|
|
||||||
CROSS_COMPILE := arm-linux-
|
CROSS_COMPILE := arm-linux-
|
||||||
|
|
||||||
LINKERSCRIPT := $(MC1322X)/mc1322x.lds
|
LINKERSCRIPT := $(MC1322X)/mc1322x.lds
|
||||||
|
@ -33,7 +40,6 @@ export ARCH CPU VENDOR
|
||||||
|
|
||||||
.SECONDARY:
|
.SECONDARY:
|
||||||
|
|
||||||
|
|
||||||
### See http://make.paulandlesley.org/autodep.html#advanced
|
### See http://make.paulandlesley.org/autodep.html#advanced
|
||||||
ifdef BOARD
|
ifdef BOARD
|
||||||
-include ${addprefix $(OBJDIR)/,$(addsuffix .d,$(TARGETS))}
|
-include ${addprefix $(OBJDIR)/,$(addsuffix .d,$(TARGETS))}
|
||||||
|
@ -63,6 +69,8 @@ BOARDARCS := $(OBJDIR)/board.a(${filter $(OBJDIR)/%.o,$(OBJDIR)/$(COBJS)})
|
||||||
endif
|
endif
|
||||||
empty-board-a:
|
empty-board-a:
|
||||||
$(AR) $(ARFLAGS) $(OBJDIR)/board.a
|
$(AR) $(ARFLAGS) $(OBJDIR)/board.a
|
||||||
|
.PHONY: empty-board-a
|
||||||
|
|
||||||
$(OBJDIR)/board.a: empty-board-a $(BOARDARCS)
|
$(OBJDIR)/board.a: empty-board-a $(BOARDARCS)
|
||||||
$(MC1322X)/src/src.a: $(MC1322X)/src/src.a($(SRCOBJS))
|
$(MC1322X)/src/src.a: $(MC1322X)/src/src.a($(SRCOBJS))
|
||||||
|
|
||||||
|
@ -118,13 +126,7 @@ clobber \
|
||||||
mrproper \
|
mrproper \
|
||||||
distclean: clean
|
distclean: clean
|
||||||
|
|
||||||
#.DEFAULT_GOAL := all
|
.PHONY: clean clobber mrproper distclean
|
||||||
|
|
||||||
ifndef BOARD
|
|
||||||
.DEFAULT_GOAL := allboards
|
|
||||||
else
|
|
||||||
.DEFAULT_GOAL := all
|
|
||||||
endif
|
|
||||||
|
|
||||||
all: $(OBJDIR)/board.h
|
all: $(OBJDIR)/board.h
|
||||||
for target in $(TARGETS); do make $$target\_$(BOARD).bin; done
|
for target in $(TARGETS); do make $$target\_$(BOARD).bin; done
|
||||||
|
@ -133,5 +135,6 @@ all: $(OBJDIR)/board.h
|
||||||
allboards:
|
allboards:
|
||||||
for board in $(BOARDS); do make BOARD=$$board all; done
|
for board in $(BOARDS); do make BOARD=$$board all; done
|
||||||
|
|
||||||
|
.PHONY: all allboards
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -18,12 +18,25 @@ TARGETS_WITH_ROM_VARS := nvm-read nvm-write romimg flasher \
|
||||||
rftest-rx rftest-tx \
|
rftest-rx rftest-tx \
|
||||||
per
|
per
|
||||||
|
|
||||||
submodule:
|
##################################################
|
||||||
git submodule update --init
|
# you shouldn't need to edit anything below here #
|
||||||
$(MAKE)
|
##################################################
|
||||||
|
|
||||||
|
# This Makefile includes the default rule at the top
|
||||||
|
# it needs to be included first
|
||||||
-include $(MC1322X)/Makefile.include
|
-include $(MC1322X)/Makefile.include
|
||||||
|
|
||||||
|
# this rule will become the default_goal if
|
||||||
|
# $(MC1322X)/Makefile.include doesn't exist it will try to update the
|
||||||
|
# submodule, check if $(MC1322X) exists, and if it does
|
||||||
|
# try make again
|
||||||
|
submodule:
|
||||||
|
git submodule update --init
|
||||||
|
if [ ! -d $(MC1322X) ] ; then echo "*** cannot find MC1322X directory $(MC1322X)" ; exit 2; fi
|
||||||
|
$(MAKE)
|
||||||
|
|
||||||
|
.PHONY: submodule
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue