head	1.1;
branch	1.1.1;
access;
symbols
	start:1.1.1.1
	vendor:1.1.1;
locks; strict;
comment	@# @;


1.1
date	2009.01.21.14.34.47;	author shriekout;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2009.01.21.14.34.47;	author shriekout;	state Exp;
branches;
next	;


desc
@@


1.1
log
@Initial revision
@
text
@#
#  @@Copyright (C) 2007 Kim Jin Chul (shriekout@@gmail.com).
#
#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU Library General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software
#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
PREFIX = /usr

TARGET1 = gdic_sh
TARGET2 = gdic_sh_applet
OBJECT = interface.o callback.o support.o

CC = gcc
PACKAGE_CFLAGS = `pkg-config --cflags gtk+-2.0 gstreamer-0.10 libpanelapplet-2.0`
PACKAGE_LIBS = `pkg-config --libs gtk+-2.0 gstreamer-0.10 libpanelapplet-2.0`
CFLAGS = -Wall

DIC_LIST = ndic_sh.py
ICON_LIST = 16x16 22x22 24x24 32x32 48x48

all : $(TARGET1) $(TARGET2)

$(TARGET1) : $(TARGET1).o $(OBJECT)
	$(CC) -o $(TARGET1) $(TARGET1).o $(OBJECT) $(PACKAGE_LIBS)
$(TARGET2) : $(TARGET2).o $(OBJECT)
	$(CC) -o $(TARGET2) $(TARGET2).o $(OBJECT) $(PACKAGE_LIBS)

$(TARGET1).o : $(TARGET1).c gdic_sh.h interface.h support.h
	$(CC) $(CFLAGS) -c $(TARGET1).c $(PACKAGE_CFLAGS)
$(TARGET2).o : $(TARGET2).c gdic_sh.h callback.h interface.h support.h
	$(CC) $(CFLAGS) -c $(TARGET2).c $(PACKAGE_CFLAGS)
interface.o : interface.c interface.h callback.h gdic_sh.h
	$(CC) $(CFLAGS) -c interface.c $(PACKAGE_CFLAGS)
callback.o : callback.c callback.h support.h gdic_sh.h interface.h
	$(CC) $(CFLAGS) -c callback.c $(PACKAGE_CFLAGS)
support.o : support.c support.h gdic_sh.h callback.h support.h
	$(CC) $(CFLAGS) -c support.c $(PACKAGE_CFLAGS)

clean :
	if [ -f $(TARGET1) ]; then\
		rm $(TARGET1);\
	fi

	if [ -f $(TARGET1).o ]; then\
		rm $(TARGET1).o;\
	fi

	if [ -f $(TARGET2) ]; then\
		rm $(TARGET2);\
	fi

	if [ -f $(TARGET2).o ]; then\
		rm $(TARGET2).o;\
	fi

	for obj in $(OBJECT); do\
		if [ -f $$obj ]; then\
			rm $$obj;\
		fi;\
	done

install :
	if [ ! -d $(PREFIX)/bin ]; then\
		mkdir -p $(PREFIX)/bin;\
	fi
	cp $(TARGET1) $(PREFIX)/bin/

	for dic in $(DIC_LIST); do\
		cp dic_scripts/$$dic $(PREFIX)/bin;\
	done

	if [ ! - d $(PREFIX)/share/applications ]; then\
		mkdir -p $(PREFIX)/share/applications;\
	fi
	cp gdic_sh.desktop $(PREFIX)/share/applications/

	if [ ! -d $(PREFIX)/share/pixmaps ]; then\
		mkdir -p $(PREFIX)/share/pixmaps;\
	fi
	cp images/gdic_sh.png $(PREFIX)/share/pixmaps/
	cp images/speaker_icon_gdic_sh.png $(PREFIX)/share/pixmaps

	for i in $(ICON_LIST); do\
		if [ ! -d $(PREFIX)/share/icons/gnome/$$i/apps ]; then\
			mkdir -p $(PREFIX)/share/icons/gnome/$$i/apps;\
		fi;\
		cp images/$$i.png $(PREFIX)/share/icons/gnome/$$i/apps/gdic_sh.png;\
	done

	if [ ! -d $(PREFIX)/lib/bonobo/servers ]; then\
		mkdir -p $(PREFIX)/lib/bonobo/servers;\
	fi
	cp gdic_sh_applet.server $(PREFIX)/lib/bonobo/servers/

	if [ ! -d $(PREFIX)/lib/gnome-panel ]; then\
		mkdir -p $(PREFIX)/lib/gnome-panel;\
	fi
	cp $(TARGET2) $(PREFIX)/lib/gnome-panel/

uninstall :
	if [ -f $(PREFIX)/bin/$(TARGET1) ]; then\
		rm $(PREFIX)/bin/$(TARGET1);\
	fi

	for dic in $(DIC_LIST); do\
		if [ -f $(PREFIX)/bin/$$dic ]; then\
			rm $(PREFIX)/bin/$$dic;\
		fi;\
	done

	if [ -f $(PREFIX)/share/applications/gdic_sh.desktop ]; then\
		rm $(PREFIX)/share/applications/gdic_sh.desktop;\
	fi

	if [ -f $(PREFIX)/share/pixmaps/gdic_sh.png ]; then\
		rm $(PREFIX)/share/pixmaps/gdic_sh.png;\
	fi

	if [ -f $(PREFIX)/share/pixmaps/speaker_icon_gdic_sh.png ]; then\
		rm $(PREFIX)/share/pixmaps/speaker_icon_gdic_sh.png;\
	fi

	for i in $(ICON_LIST); do\
		if [ ! -f $(PREFIX)/share/icons/gnome/$$i/apps/gdic_sh.png ]; then\
			rm $(PREFIX)/share/icons/gnome/$$i/apps/gdic_sh.png;\
		fi;\
	done

	if [ -f $(PREFIX)/lib/bonobo/servers/gdic_sh_applet.server ]; then\
		rm $(PREFIX)/lib/bonobo/servers/gdic_sh_applet.server;\
	fi

	if [ -f $(PREFIX)lib/gnome-panel/$(TARGET2) ]; then\
		rm $(PREFIX)/lib/gnome-panel/$(TARGET2);\
	fi
@


1.1.1.1
log
@Import
@
text
@@
