
#####################################################################
# Copyright (c) 2005 Point Grey Research Inc.
#
# This Makefile is free software; Point Grey Research Inc. 
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
#
#####################################################################

TRICLOPSDIR = /usr/local/triclops
LOCALLIB = ../pgrlibdcstereo
DC1394ROOT = /usr/local/dc1394-2.0.0-rc7

# compilation flags
CPPFLAGS += -I. 
# libdc1394 installed in /usr/local/include location
CPPFLAGS += -I$(DC1394ROOT)/include
CPPFLAGS += -I$(LOCALLIB)
CPPFLAGS += -I$(TRICLOPSDIR)/include
CPPFLAGS += -Wall -g
CPPFLAGS += -DLINUX
#CPPFLAGS += -Wall -O3

LDFLAGS	+= -L. -L$(TRICLOPSDIR)/lib 
LDFLAGS += -L$(LOCALLIB)
LDFLAGS += -L$(DC1394ROOT)/lib
LIBS    += -ldc1394 -lraw1394 -pthread 
LIBS	+= -lpgrlibdcstereo -ltriclops -lpnmutils

# executable name and contents
EXEC1		= simplegrab
EXEC1SRC	= $(EXEC1).cpp	 

EXEC2		= simplegrab-profile
EXEC2SRC	= $(EXEC2).cpp	 

EXECS		= $(EXEC1) $(EXEC2) 


all:	bin

bin: $(EXECS)

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

$(EXEC2): $(EXEC2SRC:%.cpp=%.o)
	$(CXX) $(LDFLAGS) -o $@ $^ $(LIBS)

$(EXEC3): $(EXEC3SRC:%.cpp=%.o)
	$(CXX) $(LDFLAGS) -o $@ $^ $(LIBS)


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

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

#####################################################################
#
# $Id: Makefile,v 1.5 2007/07/11 20:46:50 donm Exp $
# $Author: donm $
# $Revision: 1.5 $
# $Date: 2007/07/11 20:46:50 $
#
#####################################################################

