--- Makefile.orig	2006-09-03 20:17:13.000000000 +0200
+++ Makefile	2008-04-30 19:57:29.216855616 +0200
@@ -1,12 +1,10 @@
 PACKAGES = clanCore-0.8 clanDisplay-0.8 clanApp-0.8 clanGL-0.8 clanSDL-0.8
-LIBS = `pkg-config --libs $(PACKAGES)`
-OPTIONS =  -Iincludes -Wall -g
+LIBS = `pkg-config --libs $(PACKAGES)` $(PTHREAD_LIBS)
+OPTIONS = -Iincludes -I/usr/local/include -Wall -g
 LINKER_OPTIONS =  #-u malloc -lefence
 STATIC_LIBS = `pkg-config --libs $(PACKAGES) --static`
 CFLAGS = `pkg-config --cflags $(PACKAGES)`
 
-INSTALL_DIR = /usr/local/games/openalchemist
-
 all: openalchemist skins/aqua.zip skins/brushed.zip
 	@echo "OK"
 
@@ -83,18 +81,11 @@
 	-rm skins/brushed.zip
 
 install: openalchemist
-	mkdir $(INSTALL_DIR)
-	mkdir $(INSTALL_DIR)/skins
-	cp openalchemist $(INSTALL_DIR)/
-	cp skins/aqua.zip $(INSTALL_DIR)/skins/aqua.zip
-	cp skins/brushed.zip $(INSTALL_DIR)/skins/brushed.zip
-	ln -s $(INSTALL_DIR)/openalchemist /usr/local/bin/openalchemist
-
-uninstall: $(INSTALL_DIR)
-	rm $(INSTALL_DIR)/* -R
-	rmdir $(INSTALL_DIR)
-	rm /usr/local/bin/openalchemist
-
+	install -d -o root -g wheel -m 755 $(PREFIX)/bin
+	install -d -o root -g wheel -m 755 $(DATADIR)/skins
+	install -s -o root -g wheel -m 555 openalchemist $(PREFIX)/bin/
+	install -o root -g wheel -m 444 skins/aqua.zip $(DATADIR)/skins/aqua.zip
+	install -o root -g wheel -m 444 skins/brushed.zip $(DATADIR)/skins/brushed.zip
 
 static: includes/*.h bin/misc.o bin/main.o bin/game.o bin/key_events.o bin/detect_to_destroy.o bin/detect_to_fall.o bin/drawing.o bin/hightscores.o bin/pause.o bin/preferences.o bin/skins-selector.o skins/aqua.zip skins/brushed.zip
 	@echo "On assemble le fichier final"
