diff options
-rw-r--r-- | board/linkstation/Makefile | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/board/linkstation/Makefile b/board/linkstation/Makefile index 57c84de60e..8d92d8a6c7 100644 --- a/board/linkstation/Makefile +++ b/board/linkstation/Makefile | |||
@@ -23,18 +23,21 @@ | |||
23 | 23 | ||
24 | include $(TOPDIR)/config.mk | 24 | include $(TOPDIR)/config.mk |
25 | 25 | ||
26 | LIB = lib$(BOARD).a | 26 | LIB = $(obj)lib$(BOARD).a |
27 | 27 | ||
28 | OBJS = $(BOARD).o ide.o hwctl.o avr.o | 28 | OBJS = $(BOARD).o ide.o hwctl.o avr.o |
29 | 29 | ||
30 | $(LIB): .depend $(OBJS) $(SOBJS) | 30 | SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) |
31 | $(AR) crv $@ $(OBJS) $(SOBJS) | 31 | OBJS := $(addprefix $(obj),$(OBJS)) |
32 | |||
33 | $(LIB): $(obj).depend $(OBJS) | ||
34 | $(AR) crv $@ $(OBJS) | ||
32 | 35 | ||
33 | ######################################################################### | 36 | ######################################################################### |
34 | 37 | ||
35 | .depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c) | 38 | # defines $(obj).depend target |
36 | $(CC) -M $(CFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@ | 39 | include $(SRCTREE)/rules.mk |
37 | 40 | ||
38 | sinclude .depend | 41 | sinclude $(obj).depend |
39 | 42 | ||
40 | ######################################################################### | 43 | ######################################################################### |