From: Ricardo Salveti de Araujo Date: Wed, 26 Jan 2011 13:59:55 +0000 (+0530) Subject: IGEPV2: Fixing Makefile to properly save objects in a different path X-Git-Tag: v1.5.0~36 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b84eb0e2a9749d11c50b4de54cc935015a0fb7f;p=pandora-x-loader.git 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 --- 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 #########################################################################