From 8b84eb0e2a9749d11c50b4de54cc935015a0fb7f Mon Sep 17 00:00:00 2001 From: Ricardo Salveti de Araujo Date: Wed, 26 Jan 2011 19:29:55 +0530 Subject: [PATCH] IGEPV2: Fixing Makefile to properly save objects in a different path Now it follows the same as we have with other boards. Signed-off-by: Ricardo Salveti de Araujo Signed-off-by: Anand Gadiyar --- board/igep0020/Makefile | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/board/igep0020/Makefile b/board/igep0020/Makefile index 8c45438..c9a4dad 100644 --- a/board/igep0020/Makefile +++ b/board/igep0020/Makefile @@ -23,25 +23,29 @@ include $(TOPDIR)/config.mk -LIB = lib$(BOARD).a +LIB = $(obj)lib$(BOARD).a -OBJS := igep0020.o +COBJS := igep0020.o SOBJS := platform.o -$(LIB): $(OBJS) $(SOBJS) - $(AR) crv $@ $^ +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +$(LIB): $(obj).depend $(OBJS) $(SOBJS) + $(AR) crv $@ $(OBJS) $(SOBJS) clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).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 ######################################################################### -- 2.39.5