From e564a97c812327d863018a4a237efdfb0896b3bf Mon Sep 17 00:00:00 2001 From: Tom Fogal Date: Tue, 25 Jan 2011 14:27:57 -0700 Subject: [PATCH] Make sure output directories exist. The targets themselves cannot have these dependencies, because they use $^ and thus putting the dependent target in there screws up the build. --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 2879015..0420867 100644 --- a/Makefile +++ b/Makefile @@ -80,11 +80,14 @@ VISUALINFO.BIN.SRCS = src/visualinfo.c VISUALINFO.BIN.OBJS = $(VISUALINFO.BIN.SRCS:.c=.o) BIN.LIBS = -Llib $(LDFLAGS.DYNAMIC) -l$(NAME) $(LDFLAGS.EXTRA) $(LDFLAGS.GL) -all debug: lib/$(LIB.SHARED) lib/$(LIB.STATIC) bin/$(GLEWINFO.BIN) bin/$(VISUALINFO.BIN) glew.pc +all debug: lib bin lib/$(LIB.SHARED) lib/$(LIB.STATIC) bin/$(GLEWINFO.BIN) bin/$(VISUALINFO.BIN) glew.pc lib: mkdir lib +bin: + mkdir bin + lib/$(LIB.STATIC): $(LIB.OBJS) $(AR) cr $@ $^