projects
/
platform
/
kernel
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge with git://www.denx.de/git/u-boot.git
[platform/kernel/u-boot.git]
/
board
/
trab
/
Makefile
diff --git
a/board/trab/Makefile
b/board/trab/Makefile
index
159404b
..
fbe1c36
100644
(file)
--- a/
board/trab/Makefile
+++ b/
board/trab/Makefile
@@
-1,5
+1,5
@@
#
#
-# (C) Copyright 2000-200
2
+# (C) Copyright 2000-200
6
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
#
# See file CREDITS for list of people who contributed to this
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
#
# See file CREDITS for list of people who contributed to this
@@
-23,43
+23,50
@@
include $(TOPDIR)/config.mk
include $(TOPDIR)/config.mk
-LIB = lib$(BOARD).a
+LIB =
$(obj)
lib$(BOARD).a
-
OBJS
:= trab.o flash.o vfd.o cmd_trab.o memory.o tsc2000.o auto_update.o
+
COBJS
:= trab.o flash.o vfd.o cmd_trab.o memory.o tsc2000.o auto_update.o
SOBJS := lowlevel_init.o
SOBJS := lowlevel_init.o
+COBJS_FKT := trab_fkt.o rs485.o tsc2000.o
+
+SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) $(COBJS_FKT:.o=.c)
+OBJS := $(addprefix $(obj),$(COBJS))
+SOBJS := $(addprefix $(obj),$(SOBJS))
+
+OBJS_FKT := $(addprefix $(obj),$(COBJS_FKT))
+
gcclibdir := $(shell dirname `$(CC) -print-libgcc-file-name`)
LOAD_ADDR = 0xc100000
#########################################################################
gcclibdir := $(shell dirname `$(CC) -print-libgcc-file-name`)
LOAD_ADDR = 0xc100000
#########################################################################
-all: $(LIB)
trab_fkt.srec
trab_fkt.bin
+all: $(LIB)
$(obj)trab_fkt.srec $(obj)
trab_fkt.bin
-$(LIB): $(OBJS) $(SOBJS)
- $(AR)
crv
$@ $(OBJS) $(SOBJS)
+$(LIB): $(
obj).depend $(
OBJS) $(SOBJS)
+ $(AR)
$(ARFLAGS)
$@ $(OBJS) $(SOBJS)
-trab_fkt.srec: trab_fkt.o rs485.o tsc2000.o $(LIB)
- $(LD) -g -Ttext $(LOAD_ADDR) -o $(<:.o=) -e $(<:.o=) $^ $(LIB) \
- -L../../examples -lstubs \
- -L../../lib_generic -lgeneric \
+$(obj)trab_fkt.srec: $(OBJS_FKT) $(LIB)
+ $(LD) -g -Ttext $(LOAD_ADDR) -o $(<:.o=) -e trab_fkt $^ $(LIB) \
+ -L$(obj)../../examples -lstubs \
-L$(gcclibdir) -lgcc
$(OBJCOPY) -O srec $(<:.o=) $@
-L$(gcclibdir) -lgcc
$(OBJCOPY) -O srec $(<:.o=) $@
-
trab_fkt.bin:
trab_fkt.srec
+
$(obj)trab_fkt.bin: $(obj)
trab_fkt.srec
$(OBJCOPY) -I srec -O binary $< $@
clean:
$(OBJCOPY) -I srec -O binary $< $@
clean:
- rm -f $(SOBJS) $(OBJS)
+ rm -f $(SOBJS) $(OBJS)
$(OBJS_FKT)
distclean: clean
rm -f $(LIB) core *.bak .depend
#########################################################################
distclean: clean
rm -f $(LIB) core *.bak .depend
#########################################################################
-.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c)
- $(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
-
-include
.depend
+
sinclude $(obj)
.depend
#########################################################################
#########################################################################