diff --git a/pdftk/Makefile.Base b/pdftk/Makefile.Base
index 0bedd04..36a439e 100644
--- a/pdftk/Makefile.Base
+++ b/pdftk/Makefile.Base
@@ -35,22 +35,24 @@ javalib :
 	$(MAKE) -f Makefile -iC $(JAVALIBPATH) all
 
 attachments.o : attachments.cc attachments.h pdftk.h $(JAVALIB)
-	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -I$(JAVALIBPATH) attachments.cc -c
+	$(CXX) $(CPPFLAGS) $(LDFLAGS) $(CXXFLAGS) -I$(JAVALIBPATH) attachments.cc -c
 
 report.o : report.cc report.h pdftk.h $(JAVALIB)
-	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -I$(JAVALIBPATH) report.cc -c
+	$(CXX) $(CPPFLAGS) $(LDFLAGS) $(CXXFLAGS) -I$(JAVALIBPATH) report.cc -c
 
 pdftk.o : pdftk.cc pdftk.h attachments.h report.h $(JAVALIB) $(GCJ_LOCAL_LIB_FULL)
-	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -I$(JAVALIBPATH) pdftk.cc -c
+	$(CXX) $(CPPFLAGS) $(LDFLAGS) $(CXXFLAGS) -I$(JAVALIBPATH) pdftk.cc -c
 
 pdftk : pdftk.o attachments.o report.o $(JAVALIB) $(GCJ_LOCAL_LIB_FULL)
-	$(CXX) $(CXXFLAGS) attachments.o report.o pdftk.o $(JAVALIB) $(GCJ_LOCAL_LIB_FULL) $(LDLIBS) -o pdftk
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) attachments.o report.o pdftk.o $(JAVALIB) $(GCJ_LOCAL_LIB_FULL) $(LDLIBS) -o pdftk
 
 install:
-	/usr/bin/install pdftk /usr/local/bin 
+	mkdir -p ${DEST}/bin
+	install pdftk ${DEST}/bin
 
 uninstall:
-	$(RM) $(RMFLAGS) /usr/local/bin/pdftk
+	$(RM) $(RMFLAGS) ${DEST}/pdftk
+	rmdir ${DEST}
 
 clean:
 	$(RM) $(RMFLAGS) *.o
