all:
	gcc -g -Wall `sdl-config --cflags` `sdl-config --libs` -L /usr/include/SDL -lSDL_image sense.c -o sense

install:
	mkdir -p $(DESTDIR)/usr/bin
	cp sense $(DESTDIR)/usr/bin
	mkdir -p $(DESTDIR)/opt/sense
	cp game.png $(DESTDIR)/opt/sense
	cp menu.png $(DESTDIR)/opt/sense
	cp ball.png $(DESTDIR)/opt/sense
	cp levels.bin $(DESTDIR)/opt/sense
	cp custom_levels.bin $(DESTDIR)/opt/sense
	chmod a+rw $(DESTDIR)/opt/sense/custom_levels.bin
	cp game.bin $(DESTDIR)/opt/sense
	chmod a+rw $(DESTDIR)/opt/sense/game.bin
	mkdir -p $(DESTDIR)/usr/share/applications/hildon
	cp sense.desktop $(DESTDIR)/usr/share/applications/hildon
	mkdir -p $(DESTDIR)/usr/share/icons/hicolor/48x48/apps
	cp sense.png $(DESTDIR)/usr/share/icons/hicolor/48x48/apps
	

clean:
	-rm sense

