top_srcdir = @top_srcdir@
prefix = @prefix@
bindir = $(prefix)/bin

CC = @CC@
CPPFLAGS = @CPPFLAGS@
CFLAGS = $(CPPFLAGS) @CFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
INSTALL = @INSTALL@


all:	main.o viewer.o ee_thumb.o ee_file.o prefs.o
	$(CC) -o picview `gnome-config --libs gnome gnomeui` `imlib-config --libs-gdk` main.o viewer.o ee_thumb.o ee_file.o prefs.o

ee_thumb.o:	ee_thumb.c
	$(CC) -c `gnome-config --cflags gnome` `imlib-config --cflags-gdk` ee_thumb.c 

ee_file.o:	ee_file.c
	$(CC) -c `gnome-config --cflags gnome` `imlib-config --cflags-gdk` ee_file.c 

main.o:	main.c
	$(CC) -c `gnome-config --cflags gnome` main.c

viewer.o:	viewer.c
	$(CC) -c `gnome-config --cflags gnome` viewer.c

prefs.o:	prefs.c
	$(CC) -c `gnome-config --cflags gnome` prefs.c

install:
	$(top_srcdir)/mkinstalldirs $(bindir)
	install -m 755 picview $(bindir)
	install -m 644 picview.png $(prefix)/share/pixmaps

clean:
	rm -f *.o core picview

distclean:
	rm -f Makefile config.h config.status config.cache config.log
