include ../Configuration

depend: 
	g++ -MM $(CFLAGS) *.c *.cc> dependencies

include dependencies


objects: $(VIDEO_OBJECTS)
BINDIR=../bin/$(HOSTTYPE)


TEST= image-stream-test

test: $(TEST)

.SUFFIXES:
.SUFFIXES: .o .cc .c .C
.cc.o:
	g++ $(CFLAGS) -c $<

.C.o:
	g++ $(CFLAGS) -c $<

.c.o: 
	gcc $(CFLAGS) -c $<

.o: 
	g++ $(LDFLAGS) -o $@ $@.o -L$(BINDIR) -L. -lvid -L../vec-mat -L../im-disp -lim-disp -lvec-mat $(VIDEO_LIB)  -lXaw -lXmu -lXt -lXext -lX11 -lm 


tst: tst.o sunvideo.o
	gcc -o tst tst.o sunvideo.o -L/opt/SUNWits/Graphics-sw/xil/lib -lxil
	

libvid.$(SO): $(VIDEO_OBJECTS) 
	$(LINK_LIB) $@  $(VIDEO_OBJECTS) 

$(TEST): libvid.$(SO)




# VISION = libvid.$(SO)

$(VISION) $(MEDICAL) $(TEST): libvid.$(SO)

test:$(TEST)

vision:libvid.$(SO)

medical:libvid.$(SO)

all: vision 

BINDIR=../bin/$(HOSTTYPE)

install: 
	cp libvid.$(SO) $(BINDIR)




neat:
	- rm -f *.o core *~ a.out *.bak $(VISION) $(MEDICAL) $(TEST) tst simplegrab contcapt

clean: neat
	- rm -f *.a
	- rm -f *.$(SO)







simplegrab.o: simplegrab.c
	gcc -c simplegrab.c

simplegrab: simplegrab.o
	gcc -o simplegrab simplegrab.o -lvl


contcapt.o: contcapt.c
	gcc -c contcapt.c

contcapt: contcapt.o
	gcc -o contcapt contcapt.o -lvl -lgl



