first maemo release
[mancala] / src / Makefile
index bb47fb8..79725a0 100644 (file)
@@ -1,5 +1,6 @@
 # GNU Makefile -- Makefile
 # Kevin Riggle
+# 2009 Reto Zingg
 # http://cmancala.sourceforge.net
 # $Source: /cvsroot/cmancala/mancala/src/Attic/Makefile,v $
 # $Revision: 1.10.2.7 $
 # the LD_LIBRARY_PATH environment variable to include /usr/local/lib in
 # order to compile with SDL_ttf.
 
-#Linux-dependent right now, modify for platform-independency later
+# Linux-dependent right now, modify for platform-independency later
+# is now adapted for maemo (and dh_* scripts)
+
 CC = gcc
 DBG = gdb
 STD = _GNU_SOURCE
-CFLAGS = `sdl-config --cflags` -I/usr/local/include/SDL
-LFLAGS = `sdl-config --static-libs` -lSDL_image -lSDL_ttf
+CFLAGS = `sdl-config --cflags` -I/usr/local/include/SDL `pkg-config hildon-1 --cflags` -I/usr/include/dbus-1.0/ -I/usr/lib/dbus-1.0/include/
+LFLAGS = `sdl-config --static-libs ` -lSDL_image -lSDL_ttf -lSDL_mixer `pkg-config hildon-1 --libs` `pkg-config --libs  libosso`
 
-MAIN_OBJ = main.o graphics.o mancala.o
+MAIN_OBJ = main.o graphics.o mancala.o sounds.o play.o
 TEST_OBJ = ai-test.o mancala.o
 
 NORMAL = ai.o
@@ -48,13 +51,14 @@ ai-test-ultimate:   $(TEST_OBJ) $(ULTIMATE)
        $(CC) $(TEST_OBJ) $(ULTIMATE) $(LFLAGS) -o ai-test
 
 install:       all
-       mkdir /usr/share/pixmaps/mancala
-       cp ../res/*.png /usr/share/pixmaps/mancala
-       cp ./mancala /usr/bin
+       mkdir -p $(DESTDIR)/usr/share/pixmaps/mancala
+       mkdir -p $(DESTDIR)/usr/bin/
+       cp ../res/*.png $(DESTDIR)/usr/share/pixmaps/mancala
+       cp ./mancala $(DESTDIR)/usr/bin/
 
 uninstall:
-       rm -rf /usr/share/pixmaps/mancala
-       rm /usr/bin/mancala
+       rm -rf $(DESTDIR)/usr/share/pixmaps/mancala
+       rm $(DESTDIR)/usr/bin/mancala
 
 clean:
        rm -f *.o *.core *.swp *~ *.log