in fremantle additional software shall be in /home/opt/ where there is more space
[mancala] / src / Makefile
1 # GNU Makefile -- Makefile
2 # Kevin Riggle
3 # 2009 Reto Zingg
4 # http://cmancala.sourceforge.net
5 # $Source: /cvsroot/cmancala/mancala/src/Attic/Makefile,v $
6 # $Revision: 1.10.2.7 $
7 # $Date: 2004/01/16 20:49:30 $
8
9 # NOTE:  You MUST update /etc/ld.so.conf and rerun ldconfig *or* update
10 # the LD_LIBRARY_PATH environment variable to include /usr/local/lib in
11 # order to compile with SDL_ttf.
12
13 # Linux-dependent right now, modify for platform-independency later
14 # is now adapted for maemo (and dh_* scripts)
15
16 CC = gcc
17 DBG = gdb
18 STD = _GNU_SOURCE
19 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/
20 LFLAGS = `sdl-config --static-libs ` -lSDL_image -lSDL_ttf -lSDL_mixer `pkg-config hildon-1 --libs` `pkg-config --libs  libosso`
21
22 MAIN_OBJ = main.o graphics.o mancala.o sounds.o play.o
23 TEST_OBJ = ai-test.o mancala.o
24
25 NORMAL = ai.o
26 RECURSE = ai-init.o ai-recurse.o
27 ULTIMATE = ai-init.o ai-ultimate.o
28
29 #'$<' is filename of input, '$@' is filename of output
30 .c.o:
31         $(CC) -c -g$(DBG) -Wall $(CFLAGS) -D$(STD) $<
32 .h.o:
33         $(CC) -c -g$(DBG) -Wall $(CFLAGS) -D$(STD) $<
34
35 all:            $(MAIN_OBJ) $(NORMAL)
36         $(CC) $(MAIN_OBJ) $(NORMAL) $(LFLAGS) -o mancala
37
38 recurse:        $(MAIN_OBJ) $(RECURSE)
39         $(CC) $(MAIN_OBJ) $(RECURSE) $(LFLAGS) -o mancala
40
41 ultimate:       $(MAIN_OBJ) $(ULTIMATE)
42         $(CC) $(MAIN_OBJ) $(ULTIMATE) $(LFLAGS) -o mancala
43
44 ai-test-normal:         $(TEST_OBJ) $(NORMAL)
45         $(CC) $(TEST_OBJ) $(NORMAL) $(LFLAGS) -o ai-test
46
47 ai-test-recurse:        $(TEST_OBJ) $(RECURSE)
48         $(CC) $(TEST_OBJ) $(RECURSE) $(LFLAGS) -o ai-test
49
50 ai-test-ultimate:       $(TEST_OBJ) $(ULTIMATE)
51         $(CC) $(TEST_OBJ) $(ULTIMATE) $(LFLAGS) -o ai-test
52
53 install:        all
54         mkdir -p $(DESTDIR)/home/opt/mancala/bin/
55         cp ./mancala $(DESTDIR)/home/opt/mancala/bin/
56         mkdir -p $(DESTDIR)/home/opt/mancala/data/
57         cp ../res/*.png $(DESTDIR)/home/opt/mancala/data/
58         cp ../res/pick.wav $(DESTDIR)/home/opt/mancala/data/
59
60
61 uninstall:
62         rm -rf $(DESTDIR)/home/opt/mancala/
63
64
65 clean:
66         rm -f *.o *.core *.swp *~ *.log
67
68 clobber:        clean
69         rm -f mancala ai-test
70
71 distclean:      clobber
72         @echo "No configuration files to distclean yet."
73         @echo "I will do my best to make some! ;-)"
74
75 # End Makefile