#
# gscanbus Makefile
#
# 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 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.
#

INCLUDE=-I. -I/usr/local/include/libraw1394
CFLAGS=$(INCLUDE) -g -Wall
#LIBPATH=-L/usr/local/src/libraw1394-0.6
LIBPATH=-L/usr/local/lib

all: gscanbus

clean:
	rm -f *.o *.a *.so gscanbus

realclean: clean
	rm -f *~

fatal.o: fatal.c
	cc $(CFLAGS) -o $@ -c $<

simpleavc.o: simpleavc.c
	cc $(CFLAGS) -o $@ -c $<

decodeselfid.o: decodeselfid.c
	cc $(CFLAGS) -o $@ -c $<

topologyTree.o: topologyTree.c
	cc $(CFLAGS) -o $@ -c $<

rominfo.o: rominfo.c
	cc $(CFLAGS) -o $@ -c $<

topologyMap.o: topologyMap.c
	cc $(CFLAGS) -o $@ -c $<

menues.o: menues.c
	cc $(CFLAGS) `gtk-config --cflags` -o $@ -c $<

gscanbus.o: gscanbus.c
	cc $(CFLAGS) `gtk-config --cflags` -o $@ -c $<

gscanbus: fatal.o simpleavc.o rominfo.o topologyMap.o topologyTree.o decodeselfid.o menues.o gscanbus.o
	$(CC) $(LIBPATH) `gtk-config --libs` -lraw1394 gscanbus.o menues.o fatal.o simpleavc.o topologyMap.o topologyTree.o decodeselfid.o rominfo.o -o gscanbus

