diff options
Diffstat (limited to 'x-loader/cpu/omap3/Makefile')
-rw-r--r-- | x-loader/cpu/omap3/Makefile | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/x-loader/cpu/omap3/Makefile b/x-loader/cpu/omap3/Makefile index 5ce8941..678619c 100644 --- a/x-loader/cpu/omap3/Makefile +++ b/x-loader/cpu/omap3/Makefile @@ -23,21 +23,25 @@ include $(TOPDIR)/config.mk -LIB = lib$(CPU).a +LIB = $(obj)lib$(CPU).a START = start.o -OBJS = cpu.o mmc.o gpio.o +COBJS = cpu.o mmc.o gpio.o -all: .depend $(START) $(LIB) +SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) +START := $(addprefix $(obj),$(START)) + +all: $(obj).depend $(START) $(LIB) $(LIB): $(OBJS) $(AR) crv $@ $(OBJS) ######################################################################### -.depend: Makefile $(START:.o=.S) $(OBJS:.o=.c) - $(CC) -M $(CFLAGS) $(START:.o=.S) $(OBJS:.o=.c) > $@ +# defines $(obj).depend target +include $(SRCTREE)/rules.mk -sinclude .depend +sinclude $(obj).depend ######################################################################### |