MUNICes: fix board Makefile for remote build directory
Signed-off-by: Wolfgang Denk <wd@denx.de>
This commit is contained in:
parent
2ad4d3999f
commit
f2b6f46106
@ -1,6 +1,5 @@
|
|||||||
|
|
||||||
#
|
#
|
||||||
# (C) Copyright 2003
|
# (C) Copyright 2003-2008
|
||||||
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||||
#
|
#
|
||||||
# See file CREDITS for list of people who contributed to this
|
# See file CREDITS for list of people who contributed to this
|
||||||
@ -24,20 +23,16 @@
|
|||||||
|
|
||||||
include $(TOPDIR)/config.mk
|
include $(TOPDIR)/config.mk
|
||||||
|
|
||||||
LIB = lib$(BOARD).a
|
LIB = $(obj)lib$(BOARD).a
|
||||||
|
|
||||||
OBJS := $(BOARD).o
|
COBJS := $(BOARD).o
|
||||||
|
|
||||||
$(LIB): $(OBJS) $(SOBJS)
|
SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
|
||||||
$(AR) crv $@ $(OBJS)
|
OBJS := $(addprefix $(obj),$(COBJS))
|
||||||
|
SOBJS := $(addprefix $(obj),$(SOBJS))
|
||||||
|
|
||||||
%.dtb: %.dts
|
$(LIB): $(obj).depend $(OBJS)
|
||||||
dtc -f -V 0x10 -I dts -O dtb $< >$@
|
$(AR) $(ARFLAGS) $@ $(OBJS)
|
||||||
|
|
||||||
%.c: %.dtb
|
|
||||||
xxd -i $< \
|
|
||||||
| sed -e "s/^unsigned char/const unsigned char/g" \
|
|
||||||
| sed -e "s/^unsigned int/const unsigned int/g" > $@
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(SOBJS) $(OBJS)
|
rm -f $(SOBJS) $(OBJS)
|
||||||
@ -47,9 +42,9 @@ distclean: clean
|
|||||||
|
|
||||||
#########################################################################
|
#########################################################################
|
||||||
|
|
||||||
.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c)
|
# defines $(obj).depend target
|
||||||
$(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@
|
include $(SRCTREE)/rules.mk
|
||||||
|
|
||||||
-include .depend
|
sinclude $(obj).depend
|
||||||
|
|
||||||
#########################################################################
|
#########################################################################
|
||||||
|
Loading…
Reference in New Issue
Block a user