diff options
Diffstat (limited to 'lib_ppc')
-rw-r--r-- | lib_ppc/Makefile | 19 | ||||
-rw-r--r-- | lib_ppc/board.c | 12 |
2 files changed, 16 insertions, 15 deletions
diff --git a/lib_ppc/Makefile b/lib_ppc/Makefile index 652a419..2ba034f 100644 --- a/lib_ppc/Makefile +++ b/lib_ppc/Makefile @@ -1,5 +1,5 @@ # -# (C) Copyright 2000 +# (C) Copyright 2000-2006 # Wolfgang Denk, DENX Software Engineering, wd@denx.de. # # See file CREDITS for list of people who contributed to this @@ -23,23 +23,24 @@ include $(TOPDIR)/config.mk -LIB = lib$(ARCH).a +LIB = $(obj)lib$(ARCH).a -AOBJS = ppcstring.o ticks.o +SOBJS = ppcstring.o ticks.o COBJS = board.o \ bat_rw.o cache.o extable.o kgdb.o time.o interrupts.o -OBJS = $(AOBJS) $(COBJS) +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) -$(LIB): .depend $(OBJS) - $(AR) crv $@ $(OBJS) +$(LIB): $(obj).depend $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) ######################################################################### -.depend: Makefile $(AOBJS:.o=.S) $(COBJS:.o=.c) - $(CC) -M $(CFLAGS) $(AOBJS:.o=.S) $(COBJS:.o=.c) > $@ +# defines $(obj).depend target +include $(SRCTREE)/rules.mk -sinclude .depend +sinclude $(obj).depend ######################################################################### diff --git a/lib_ppc/board.c b/lib_ppc/board.c index db80f77..cf0e3fd 100644 --- a/lib_ppc/board.c +++ b/lib_ppc/board.c @@ -763,6 +763,12 @@ void board_init_r (gd_t *id, ulong dest_addr) spi_init_r (); #endif +#if (CONFIG_COMMANDS & CFG_CMD_NAND) + WATCHDOG_RESET (); + puts ("NAND: "); + nand_init(); /* go init the NAND */ +#endif + /* relocate environment function pointers etc. */ env_relocate (); @@ -959,12 +965,6 @@ void board_init_r (gd_t *id, ulong dest_addr) doc_init (); #endif -#if (CONFIG_COMMANDS & CFG_CMD_NAND) - WATCHDOG_RESET (); - puts ("NAND: "); - nand_init(); /* go init the NAND */ -#endif - #if (CONFIG_COMMANDS & CFG_CMD_NET) #if defined(CONFIG_NET_MULTI) WATCHDOG_RESET (); |