#####################################################################
# Copyright (c) 2003  Claron Technology Inc. All Rights Reserved.
#
# This software is the confidential and proprietary information of Claron`
# Technology , Inc. ("Confidential Information").  You shall not
# disclose such Confidential Information and shall use it only in
# accordance with the terms of the license agreement you entered into
# with Claron Technology Inc..
#
#####################################################################
#
#
#####################################################################

# package top
TOP	= ..

# assume developer has peer level digiclops trees
MTCTOP  = $(TOP)/Dist
MTVIDEOTOP  = $(TOP)/Dist
DIGITOP  = $(TOP)/Dist
TRITOP  = $(TOP)/Dist
CPPFLAGS += -I$(TOP)/Dist -I$(MTCTOP)
CPPFLAGS += -I. 
#CPPFLAGS += -g -w
CPPFLAGS += -w -O6 -march=pentium4 -mfpmath=sse  -funroll-loops -march=pentium4 -mfpmath=sse


LDFLAGS += -L$(TOP)/Dist
LDFLAGS	+= -L. -L/usr/X11R6/lib
LIBS    += -lm -lXext -lX11 -lsupc++ 
LIBS    += -lMTC 
#LIBS    += -ldigiclops -ltriclops -lraw1394 -pthread
# if libdc version is used
LIBS    += -lraw1394 -pthread $(TOP)/Dist/libdc1394_control.a

# executable name and contents
EXEC1		= SimpleDemoCPP  
EXECS		= $(EXEC1)

EXEC1SRC	+= SimpleDemoC.cpp 

all:	bin

bin: $(EXECS)

install: $(EXECS)
	install -d $(TOP)/bin
	for exe in $(EXECS) ; do ( install -m 0775 $$exe $(TOP)/bin ) ; done

#	$(CXX) $(LDFLAGS)  -o $@ $^ $(LIBS) $@
$(EXEC1): $(EXEC1SRC:%.cpp=%.o) 
	$(CXX)  $(LDFLAGS) -o $@ $^  $(LIBS)

%.o:%.cpp
	g++ -c $(CXXFLAGS) $(CPPFLAGS) $*.cpp

clean:
	rm -f *~ *.o *.d bin *.ppm $(EXECS)

