summaryrefslogtreecommitdiff
path: root/cleopatre/devkit/plcd/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/devkit/plcd/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/devkit/plcd/Makefile')
-rw-r--r--cleopatre/devkit/plcd/Makefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/cleopatre/devkit/plcd/Makefile b/cleopatre/devkit/plcd/Makefile
index c383df3b98..9e73ae1002 100644
--- a/cleopatre/devkit/plcd/Makefile
+++ b/cleopatre/devkit/plcd/Makefile
@@ -25,14 +25,16 @@ DEPS=$(patsubst %o,%d,$(OBJS))
all: $(BIN)
-$(BIN): $(OBJPATH) libmme libspid $(OBJS)
+$(BIN): libmme libspid $(OBJS)
$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBFLAGS)
$(OBJPATH)/%.o: $(SRCPATH)/%.c
$(CC) $(CFLAGS) -o $@ -c $<
+$(OBJS): | $(OBJPATH)
+
$(OBJPATH):
- mkdir -p $(OBJPATH)
+ mkdir $(OBJPATH)
libmme:
$(MAKE) -C $(LIBMME_DIR)