# Copyright (C) 1995
#            Olav Woelfelschneider (wosch@rbg.informatik.th-darmstadt.de)

CFLAGS		=	-I. -I.. -I../McTools -I../bitmaps -I. $(COPTS)
TARGET		=	xg3
LDFLAGS		=	$(LDOPTS)
LIBS		=	-L../McTools -lMcTools -lX11 $(LIBOPTS)
SRCS		=	xg3.c filegui.c files.c confirm.c print.c g3decode.c \
			bitmap.c icons.c
OBJS		=	xg3.o filegui.o files.o confirm.o print.o g3decode.o \
			bitmap.o icons.o

all: $(TARGET)

ifeq (.depend,$(wildcard .depend))
include .depend
else
DEPEND=needdepend
endif

$(TARGET): $(DEPEND) $(OBJS)
	$(CC) $(LDFLAGS) -o $(TARGET) $(OBJS) $(LIBS) $(XLIBS)

clean:
	rm -f *.o $(TARGET)

proper:
	rm -f *.o $(TARGET) .depend

needdepend: depend
	@echo
	@echo "Dependency information created, please re-run make and ignore"
	@echo "the error that follows."
	@echo
	@exit 1

depend:
	$(CPP) -MM $(CFLAGS) $(SRCS) >.depend
