summaryrefslogtreecommitdiff
path: root/cleopatre/application/libmme/Makefile
diff options
context:
space:
mode:
authorYacine Belkadi2012-07-09 10:07:14 +0200
committerYacine Belkadi2012-07-18 13:25:05 +0200
commit0de6fb1b12c8b91dff5ee3f6befb289023c4c0de (patch)
tree3f18e1bfdf9449809409e687fe5604b35ff4b29a /cleopatre/application/libmme/Makefile
parent8663dc0afb325725eb4e487519568acd27c307bd (diff)
cleo/{app,devkit/plcd}/Makefile: fix dependency on "obj" dir, refs #3255
The "obj" directory needs to be created before any "*.o" file. So "$(OBJPATH)" needs to be a prerequisite of the "$(OBJS)" target, instead of the final binary's target. By using the "|" of GNU Make, the "$(OBJPATH)" target is only made if "obj" doesn't exist, without considering the directory's timestamp. As a consequence, the "-p" option of "mkdir -p obj" is not necessary.
Diffstat (limited to 'cleopatre/application/libmme/Makefile')
-rw-r--r--cleopatre/application/libmme/Makefile8
1 files changed, 5 insertions, 3 deletions
diff --git a/cleopatre/application/libmme/Makefile b/cleopatre/application/libmme/Makefile
index 5cb7cd350e..b01cd38c07 100644
--- a/cleopatre/application/libmme/Makefile
+++ b/cleopatre/application/libmme/Makefile
@@ -27,10 +27,10 @@ STAT_DEPS=$(patsubst %o,%d,$(STAT_OBJS))
all: $(STAT_LIB) $(DYN_LIB)
-$(STAT_LIB): $(OBJPATH) $(STAT_OBJS)
+$(STAT_LIB): $(STAT_OBJS)
$(AR) cr $@ $(STAT_OBJS)
-$(DYN_LIB): $(OBJPATH) $(DYN_OBJS)
+$(DYN_LIB): $(DYN_OBJS)
$(CC_WITHOUT_CFLAGS) -shared -fPIC -o $@ $(DYN_OBJS)
$(OBJPATH)/%.stat.o: $(SRCPATH)/%.c
@@ -39,8 +39,10 @@ $(OBJPATH)/%.stat.o: $(SRCPATH)/%.c
$(OBJPATH)/%.dyn.o: $(SRCPATH)/%.c
$(CC_WITH_CFLAGS) $(EXTRA_CFLAGS) -fPIC -o $@ -c $<
+$(DYN_OBJS) $(STAT_OBJS): | $(OBJPATH)
+
$(OBJPATH):
- mkdir -p $(OBJPATH)
+ mkdir $(OBJPATH)
-include $(STAT_DEPS) $(DYN_DEPS)