diff options
Diffstat (limited to 'board/cpu87')
-rw-r--r-- | board/cpu87/Makefile | 20 | ||||
-rw-r--r-- | board/cpu87/cpu87.c | 8 |
2 files changed, 16 insertions, 12 deletions
diff --git a/board/cpu87/Makefile b/board/cpu87/Makefile index 26f53ed..dcb1907 100644 --- a/board/cpu87/Makefile +++ b/board/cpu87/Makefile @@ -1,5 +1,5 @@ # -# (C) Copyright 2001-2005 +# (C) Copyright 2001-2006 # Wolfgang Denk, DENX Software Engineering, wd@denx.de. # # See file CREDITS for list of people who contributed to this @@ -23,18 +23,22 @@ include $(TOPDIR)/config.mk -LIB = lib$(BOARD).a +LIB = $(obj)lib$(BOARD).a -OBJS = $(BOARD).o flash.o +COBJS = $(BOARD).o flash.o -$(LIB): .depend $(OBJS) - $(AR) crv $@ $(OBJS) +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +$(LIB): $(obj).depend $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) ######################################################################### -.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c) - $(CC) -M $(CFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@ +# defines $(obj).depend target +include $(SRCTREE)/rules.mk -sinclude .depend +sinclude $(obj).depend ######################################################################### diff --git a/board/cpu87/cpu87.c b/board/cpu87/cpu87.c index e8c2614..9fecdd0 100644 --- a/board/cpu87/cpu87.c +++ b/board/cpu87/cpu87.c @@ -294,15 +294,15 @@ long int initdram (int board_type) */ size8 = try_init (memctl, CFG_PSDMR_8COL, CFG_OR2_8COL, (uchar *) CFG_SDRAM_BASE); - + size9 = try_init (memctl, CFG_PSDMR_9COL, CFG_OR2_9COL, (uchar *) CFG_SDRAM_BASE); - + size10 = try_init (memctl, CFG_PSDMR_10COL, CFG_OR2_10COL, (uchar *) CFG_SDRAM_BASE); - + psize = max(size8,max(size9,size10)); - + if (psize == size8) { psize = try_init (memctl, CFG_PSDMR_8COL, CFG_OR2_8COL, (uchar *) CFG_SDRAM_BASE); |