# $Id: Makefile,v 1.1 1996/05/13 18:00:30 lim Exp lim $

INCLUDE	=	-I/usr/include/gl -I.
LINCLUDE =	-L/usr/lib -L.

# set the compiler variable
CC = gcc

# specify if ranlib should be used
RANLIB = echo

# remember to add the includes
CFLAGS = -O -Wall $(INCLUDE)

# specify how depends are remade
MAKEDEPEND = gcc -MM

#########################################################
# You shouldn't have to modify anything below this line #
#########################################################

FILTERSRC = sgi.c

FILTEROBJ = $(FILTERSRC:.c=.o)
FILTERS = $(FILTERSRC:.c=)
LIBGIMP = libgimp.a

all: $(LIBGIMP) $(FILTERS)


# If you are using gmake use the following 2 rules...
%: %.c $(LIBGIMP)
	$(CC) $(CFLAGS) -o $@ $< $(LIBGIMP) -lc

%.o: %.c
	$(CC) $(CFLAGS) -c $< -o $@


sgi: sgi.c $(LIBGIMP)
	-$(CC) $(CFLAGS) -o sgi sgi.c $(LIBGIMP) $(LINCLUDE) -limage -lm

depend:
	$(MAKEDEPEND) $(INCLUDE) $(CFLAGS) $(FILTERSRC) > .depend

include .depend
