Permalink
Browse files

create output directories before writing .o files

  • Loading branch information...
1 parent 8370599 commit 8513cbdb9092913f9b0caa6750e8f14656a36b7b @holtrop holtrop committed Oct 29, 2013
Showing with 5 additions and 1 deletion.
  1. +5 −1 Makefile
View
@@ -120,8 +120,12 @@ $(SHARED_LIBNAME): $(PICOBJECTS)
$(DC) -shared $(SONAME_FLAG) $@.$(MAJOR_VERSION) $(OUTPUT)$(DLIB_PATH)$(PATH_SEP)$@.$(PROJECT_VERSION) $^
#$(CC) -l$(PHOBOS) -l$(DRUNTIME) -shared -Wl,-soname,$@.$(MAJOR_VERSION) -o $(DLIB_PATH)$(PATH_SEP)$@.$(PROJECT_VERSION) $^
+.PHONY: output_directories
+output_directories:
+ mkdir -p $(dir $(OBJECTS))
+
# create object files
-$(BUILD_PATH)$(PATH_SEP)%.o : %.d
+$(BUILD_PATH)$(PATH_SEP)%.o : %.d output_directories
$(DC) $(DCFLAGS) $(DCFLAGS_LINK) $(DCFLAGS_IMPORT) -c $< $(OUTPUT)$@
# create shared object files

0 comments on commit 8513cbd

Please sign in to comment.