#
# FILE:
# Makefile
#
# FUNCTION:
# DWI development code
#
# HISTORY:
# Created by Linas Vepstas March 2002
#

EXES= dwi-run

INCLUDES=	\
	-I ../db_drivers                \
	`gnome-config --cflags libglade gnome xml`	\
	`gtk-config --cflags`		\
	`pkg-config --cflags glib-2.0`

LIBS= \
	`gnome-config --libs libglade gnome xml`	\
	`gtk-config --libs` 		\
	`pkg-config --libs glib-2.0`		\
	-lodbc

OBJS= \
	dwi-run.o   \
	action.o    \
	builder.o   \
	database.o  \
	escape.o    \
	filter.o    \
	readfile.o  \
	report.o    \
	signal.o    \
	util.o      \
	window.o  

all: ${EXES}

dwi-run.o:	dwi-run.c readfile.h

action.o:	action.h builder.h database.h filter.h perr.h readfile.h report.h signal.h util.h window.h
builder.o:	builder.h escape.h perr.h
database.o:	database.h
escape.o:	escape.h perr.h
filter.o:	filter.h perr.h
readfile.o: 	readfile.c readfile.h action.h database.h filter.h perr.h report.h window.h
util.o:		perr.h util.h 
report.o:	action.h filter.h perr.h readfile.h report.h util.h window.h 
signal.o:	signal.h
window.o:	readfile.h perr.h signal.h window.h 


dwi-run: ${OBJS}  ../db_drivers/*.o
	cc -o $@ $^ ${LIBS}


.o:
	cc -o $* $^ ${LIBS}

.c.o:
	cc -c -g -Wall -O2 $< ${CFLAGS} ${INCLUDES}


clean:
	rm -f *.o *.bak

realclean:	clean
	rm -f ${EXES}

