CXX=g++
AR=ar
RANLIB=ranlib
CXXFLAGS=-ftracer \
	-O2 \
	-g \
	-Wall \
	-fomit-frame-pointer \
	-I../AiboEdgeDetector \
	-I../AISColorSeg \
	-I../CircleFittingClass  

LIBS=-ljpeg
OBJS=$(patsubst %.cc,%.o,$(wildcard *.cc))
OBJS+=$(patsubst %.c,%.o,$(wildcard *.c))
OBJS+=../AiboEdgeDetector/AiboEdgeDetector.o 
OBJS+=../AISColorSeg/AISAiboYCrCbColorSeg.o 
OBJS+=../CircleFittingClass/CircleFittingClass.o 

TARGET=vis6

.PHONY: all clean run

all: $(TARGET)

%.o: %.cc
	$(CXX) $(CXXFLAGS) -o $@ -c $^
%.o: %.c
	gcc $(CXXFLAGS) -o $@ -c $^

$(TARGET): $(OBJS)
	$(CXX) $(CXXFLAGS) -o $@ $^ $(LIBSe)
clean:
	rm -f $(TARGET) *.o $(OBJS)
	
run: ./$(TARGET) 

