From 7fbc0fe970bf3cc76a0eb8762ba082543eb67e0f Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Tue, 2 Aug 2016 19:33:03 +0200
Subject: Haiku patch


diff --git a/src/makefile b/src/makefile
index 886237f..1a62240 100644
--- a/src/makefile
+++ b/src/makefile
@@ -27,6 +27,7 @@ PROGRAMS	=	../bin/analyseplugin				\
 			../bin/listplugins
 CC		=	cc
 CPP		=	c++
+MKDIR_P	=	mkdir -p
 
 ###############################################################################
 #
@@ -34,10 +35,12 @@ CPP		=	c++
 #
 
 ../plugins/%.so:	plugins/%.c ladspa.h
+	-$(MKDIR_P) ../plugins
 	$(CC) $(CFLAGS) -o plugins/$*.o -c plugins/$*.c
 	$(LD) -o ../plugins/$*.so plugins/$*.o -shared
 
 ../plugins/%.so:	plugins/%.cpp ladspa.h
+	-$(MKDIR_P) ../plugins
 	$(CPP) $(CXXFLAGS) -o plugins/$*.o -c plugins/$*.cpp
 	$(CPP) -o ../plugins/$*.so plugins/$*.o -shared
 
@@ -59,9 +62,9 @@ test:	/tmp/test.wav ../snd/noise.wav always
 	@echo Test complete.
 
 install:	targets
-	-mkdirhier $(INSTALL_PLUGINS_DIR)
-	-mkdirhier $(INSTALL_INCLUDE_DIR)
-	-mkdirhier $(INSTALL_BINARY_DIR)
+	-$(MKDIR_P) $(INSTALL_PLUGINS_DIR)
+	-$(MKDIR_P) $(INSTALL_INCLUDE_DIR)
+	-$(MKDIR_P) $(INSTALL_BINARY_DIR)
 	cp ../plugins/* $(INSTALL_PLUGINS_DIR)
 	cp ladspa.h $(INSTALL_INCLUDE_DIR)
 	cp ../bin/* $(INSTALL_BINARY_DIR)
@@ -90,16 +93,19 @@ targets:	$(PLUGINS) $(PROGRAMS)
 #
 
 ../bin/applyplugin:	applyplugin.o load.o default.o
+	-$(MKDIR_P) ../bin
 	$(CC) $(CFLAGS) $(LIBRARIES)					\
 		-o ../bin/applyplugin					\
 		applyplugin.o load.o default.o
 
 ../bin/analyseplugin:	analyseplugin.o load.o default.o
+	-$(MKDIR_P) ../bin
 	$(CC) $(CFLAGS) $(LIBRARIES)					\
 		-o ../bin/analyseplugin 				\
 		analyseplugin.o load.o default.o
 
 ../bin/listplugins:	listplugins.o search.o
+	-$(MKDIR_P) ../bin
 	$(CC) $(CFLAGS) $(LIBRARIES)					\
 		-o ../bin/listplugins	 				\
 		listplugins.o search.o
-- 
2.2.2

