$OpenBSD: patch-Makefile,v 1.2 2011/05/09 09:02:12 jasper Exp $

Fix the install-crt target to create the target directory and don't
execute the ${INSTALL} with a trailing '/' for last crt file which
would make it a (non-existing) directory.

--- Makefile.orig	Mon Apr 25 22:57:41 2011
+++ Makefile	Mon Apr 25 22:57:43 2011
@@ -24,7 +24,7 @@ override CC = msp430-gcc
 override AS = msp430-gcc -x assembler-with-cpp
 override AR = msp430-ar
 RM = rm
-INSTALL = install -c -m644 $^/
+INSTALL = install -c -m644 $^
 
 #HDR_VENDOR := legacy
 HDR_VENDOR := ti
@@ -90,8 +90,9 @@ build-crt: makedir-crt $(CRT_OBJS)
 clean-crt:
 	${RM} -f $(CRT_OBJS)
 
-install-crt: $(CRT_OBJS) $(libdir)
-	${INSTALL}
+install-crt: $(CRT_OBJS)
+	mkdir -p ${libdir}
+	${INSTALL} ${libdir}
 
 makedir-crt:
 	mkdir -p $(BUILDDIR)
