diff -Naur gsm-1.0-pl13.orig/Makefile gsm-1.0-pl13/Makefile
--- gsm-1.0-pl13.orig/Makefile	2010-02-10 12:50:14.000000000 -0500
+++ gsm-1.0-pl13/Makefile	2010-02-10 12:50:26.000000000 -0500
@@ -44,7 +44,7 @@
 # CCFLAGS 	= -c -O
 
 CC		= gcc -ansi -pedantic
-CCFLAGS 	= -c -O2 -DNeedFunctionPrototypes=1
+CCFLAGS 	+= -c -O2 -DNeedFunctionPrototypes=1
 
 LD 		= $(CC)
 
@@ -71,7 +71,7 @@
 # Leave INSTALL_ROOT empty (or just don't execute "make install") to
 # not install gsm and toast outside of this directory.
 
-INSTALL_ROOT	=
+INSTALL_ROOT	= $(DESTDIR)
 
 # Where do you want to install the gsm library, header file, and manpages?
 #
@@ -79,9 +79,9 @@
 # this directory.
 
 GSM_INSTALL_ROOT = $(INSTALL_ROOT)
-GSM_INSTALL_LIB = $(GSM_INSTALL_ROOT)/lib
-GSM_INSTALL_INC = $(GSM_INSTALL_ROOT)/inc
-GSM_INSTALL_MAN = $(GSM_INSTALL_ROOT)/man/man3
+GSM_INSTALL_LIB = $(GSM_INSTALL_ROOT)/usr/lib
+GSM_INSTALL_INC = $(GSM_INSTALL_ROOT)/usr/include
+GSM_INSTALL_MAN = $(GSM_INSTALL_ROOT)/usr/man/man3
 
 
 # Where do you want to install the toast binaries and their manpage?
@@ -90,8 +90,8 @@
 # of this directory.
 
 TOAST_INSTALL_ROOT	  = $(INSTALL_ROOT)
-TOAST_INSTALL_BIN = $(TOAST_INSTALL_ROOT)/bin
-TOAST_INSTALL_MAN = $(TOAST_INSTALL_ROOT)/man/man1
+TOAST_INSTALL_BIN = $(TOAST_INSTALL_ROOT)/usr/bin
+TOAST_INSTALL_MAN = $(TOAST_INSTALL_ROOT)/usr/man/man1
 
 #  Other tools
 
@@ -351,49 +351,59 @@
 		fi
 
 $(TOAST_INSTALL_BIN)/toast:	$(TOAST)
+		mkdir -p $(@D)
 		-rm $@
 		cp $(TOAST) $@
 		chmod 755 $@
 
 $(TOAST_INSTALL_BIN)/untoast:	$(TOAST_INSTALL_BIN)/toast
+		mkdir -p $(@D)
 		-rm $@
 		ln $? $@
 
 $(TOAST_INSTALL_BIN)/tcat:	$(TOAST_INSTALL_BIN)/toast
+		mkdir -p $(@D)
 		-rm $@
 		ln $? $@
 
 $(TOAST_INSTALL_MAN)/toast.1:	$(MAN)/toast.1
+		mkdir -p $(@D)
 		-rm $@
 		cp $? $@
 		chmod 444 $@
 
 $(GSM_INSTALL_MAN)/gsm.3:	$(MAN)/gsm.3
+		mkdir -p $(@D)
 		-rm $@
 		cp $? $@
 		chmod 444 $@
 
 $(GSM_INSTALL_MAN)/gsm_option.3:	$(MAN)/gsm_option.3
+		mkdir -p $(@D)
 		-rm $@
 		cp $? $@
 		chmod 444 $@
 
 $(GSM_INSTALL_MAN)/gsm_explode.3:	$(MAN)/gsm_explode.3
+		mkdir -p $(@D)
 		-rm $@
 		cp $? $@
 		chmod 444 $@
 
 $(GSM_INSTALL_MAN)/gsm_print.3:	$(MAN)/gsm_print.3
+		mkdir -p $(@D)
 		-rm $@
 		cp $? $@
 		chmod 444 $@
 
 $(GSM_INSTALL_INC)/gsm.h:	$(INC)/gsm.h
+		mkdir -p $(@D)
 		-rm $@
 		cp $? $@
 		chmod 444 $@
 
 $(GSM_INSTALL_LIB)/libgsm.a:	$(LIBGSM)
+		mkdir -p $(@D)
 		-rm $@
 		cp $? $@
 		chmod 444 $@
