CC     = @CC@
CFLAGS = @CFLAGS@
LIBS   = @LIBS@ -lm
LFLAGS = @LDFLAGS@
AR     = @AR@
RANLIB = @RANLIB@

SRCS = formulas.c \
       fractal.c  \
       btrace.c \
       palettef.c \
       emboss.c \
       star.c \
       anti.c \
       dither.c \
       edge.c \
       edge2.c \
       rotate.c \
       zoom.c \
       blur.c \
       interlace.c \
       itersmall.c \
       stereogram.c \
       3d.c \
       subwindow.c \
       plane.c \
       julia.c \
       i386.c


OBJS = $(SRCS:.c=.o)

TLIB = ../lib/libengine.a


all:	$(TLIB)

$(TLIB):$(OBJS)
	rm -f $@
	$(AR) rc $@ $(OBJS)
	$(RANLIB) $@ 

formulas.o: docalc.c
3d.o: 3dd.c
btrace.o: btraced.c
edge2.o: edge2d.c
palette.o: paletted.c
rotate.o: rotated.c
stereogram.o: stereod.c
star.o: stard.c
zoom.o: zoomd.c

clean:
	rm -f $(TLIB)
	rm -f *.[oas]
	rm -f *~
	rm -f core 

distclean:clean
	rm  Makefile

#dep:
#	rm -f .depend
#	make .depend
#
#.depend:
#	echo '# Program dependencies' >.depend
#	gcc -I svgalib $(DEFINES) -MM $(patsubst %.o,%.c,$(OBJS)) >>.depend
#
#include .depend
