--- Makefile.orig	2009-10-11 02:10:45.000000000 +0200
+++ Makefile	2013-10-01 11:00:03.000000000 +0200
@@ -188,7 +188,6 @@
 .depend :
 	@rm -f .depend
 	@touch .depend
-ifeq ($(CC),gcc)
 	@echo -e "$(lib_src_path)/\c" > dir.depend
 	@for srcfile in $(lib_sources); do \
 		cat dir.depend >> .depend; \
@@ -221,27 +220,6 @@
 	done
 	@rm part.depend
 	@rm dir.depend
-else
-	@for srcfile in $(lib_sources); do \
-		makedepend -a -f'.depend' -I$(lib_incl_path) -I$(glpk_incl_path) $$srcfile; \
-	done
-	@echo -e "$(glpk_src_path)/\c" > dir.depend;
-	@for srcfile in $(glpk_sources); do \
-		makedepend -a -f'.depend' -I$(lib_incl_path) -I$(glpk_incl_path) $$srcfile; \
-	done
-	@echo -e "$(glpk_wrap_path)/\c" > dir.depend
-	@for srcfile in $(wrap_sources); do \
-		makedepend -a -f'.depend' -I$(lib_incl_path) -I$(glpk_incl_path) $$srcfile; \
-	done
-	@echo -e "$(shell_src_path)/\c" > dir.depend
-	@for srcfile in $(shell_sources); do \
-		makedepend -a -f'.depend' -I$(lib_incl_path) -I$(glpk_incl_path) $$srcfile; \
-	done
-	@echo -e "$(main_src_path)/\c" > dir.depend
-	@for srcfile in $(solve_sources); do \
-		makedepend -a -f'.depend' -I$(lib_incl_path) -I$(glpk_incl_path) $$srcfile; \
-	done
-endif
 	@echo "...Dependencies generated"
 
 
@@ -335,19 +313,11 @@
 shared : intro $(shared_objects)
 
 libgoblin.$(so_suffix) : $(lib_objects) $(shell_objects)
-ifeq ($(CC),gcc)
 	$(LD) -shared -Wl,-soname,$@ -o $@ $^ $(LDFLAGS) $(LIBS)
-else
-	$(LD) -G                     -o $@ $^ $(LDFLAGS) $(LIBS)
-endif
 	@echo "...Shared object ($@) has been successfully linked"
 
 libglpk.$(so_suffix) : $(glpk_objects) $(wrap_objects)
-ifeq ($(CC),gcc)
 	$(LD) -shared -Wl,-soname,$@ -o $@ $(shell_objects) $^ -L. $(LDFLAGS) $(LIBS) -lgoblin
-else
-	$(LD) -G                     -o $@ $(shell_objects) $^ -L. $(LDFLAGS) $(LIBS) -lgoblin
-endif
 	@echo "...Shared object ($@) has been successfully linked"
 
 
@@ -367,11 +337,7 @@
 else
 
 gosh : $(gosh_objects) $(shared_objects)
-ifeq ($(CC),gcc)
 	$(LD)    -o $@ $(gosh_objects) -L. $(LDFLAGS) -lgoblin $(glpk) $(LIBS)
-else
-	$(LD) -G -o $@ $(gosh_objects) -L. $(LDFLAGS) -lgoblin $(glpk) $(LIBS)
-endif
 	@echo "...Shell tool ($@) has been linked with shared object"
 
 endif
@@ -648,7 +618,7 @@
 	mkdir -p bin
 ifneq ($(link_mode),dynamic)
 	mv gosh$(exe_suffix) bin
-	echo "#!$(PWD)/bin/gosh" > bin/goblet
+	echo "#!$(prefix)/bin/gosh" > bin/goblet
 else
 	echo "#!$(wish_name)" > bin/goblet
 	echo "" >> bin/goblet
@@ -659,7 +629,7 @@
 endif
 	echo "" >> bin/goblet
 	echo "set GoblinVersion $(version)" >> bin/goblet
-	echo "set GoblinTclPath [file join $(PWD) tcl]" \
+	echo "set GoblinTclPath $(prefix)/lib/goblin" \
 	       >> bin/goblet
 	echo "" >> bin/goblet
 	cat goblet >> bin/goblet
