git.openpandora.org
/
pandora-x-loader.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Adding support for saving build objects in a separated directory.
[pandora-x-loader.git]
/
common
/
Makefile
diff --git
a/common/Makefile
b/common/Makefile
index
de856cf
..
8f4ee2c
100644
(file)
--- a/
common/Makefile
+++ b/
common/Makefile
@@
-23,26
+23,27
@@
include $(TOPDIR)/config.mk
include $(TOPDIR)/config.mk
-LIB = libcommon.a
+LIB =
$(obj)
libcommon.a
AOBJS =
COBJS = cmd_load.o
AOBJS =
COBJS = cmd_load.o
-OBJS = $(AOBJS) $(COBJS)
+SRCS := $(AOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS := $(addprefix $(obj),$(AOBJS) $(COBJS))
CPPFLAGS += -I..
all: $(LIB) $(AOBJS)
CPPFLAGS += -I..
all: $(LIB) $(AOBJS)
-$(LIB): .depend $(OBJS)
+$(LIB):
$(obj)
.depend $(OBJS)
$(AR) crv $@ $(OBJS)
#########################################################################
$(AR) crv $@ $(OBJS)
#########################################################################
-.depend: Makefile $(AOBJS:.o=.S) $(COBJS:.o=.c)
- $(CC) -M $(CFLAGS) $(AOBJS:.o=.S) $(COBJS:.o=.c) > $@
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
-sinclude .depend
+sinclude
$(obj)
.depend
#########################################################################
#########################################################################