# Copyright (C) 2006 International Business Machines and others.
# All Rights Reserved.
# This file is distributed under the Common Public License.

# $Id: Makefile.in 726 2006-04-17 04:16:00Z andreasw $

##########################################################################
#    You can modify this example makefile to fit for your own program.   #
#    Usually, you only need to change the five CHANGEME entries below.   #
##########################################################################

# To compile other examples, either changed the following line, or
# add the argument DRIVER=problem_name to make
DRIVER = driver

# CHANGEME: This should be the name of your executable
EXE = $(DRIVER)@EXEEXT@

# CHANGEME: Here is the name of all object files corresponding to the source
#           code that you wrote in order to define the problem statement
OBJS =  $(DRIVER).@OBJEXT@ 

# CHANGEME: Additional libraries
ADDLIBS =

# CHANGEME: Additional flags for compilation (e.g., include flags)
ADDINCFLAGS =

# CHANGEME: Directory to the sources for the (example) problem definition
# files
SRCDIR = @srcdir@
VPATH = @srcdir@

##########################################################################
#  Usually, you don't have to change anything below.  Note that if you   #
#  change certain compiler options, you might have to recompile the      #
#  COIN package.                                                         #
##########################################################################

# C++ Compiler command
CXX = @CXX@

# C++ Compiler options
CXXFLAGS = @CXXFLAGS@

# additional C++ Compiler options for linking
CXXLINKFLAGS = @RPATH_FLAGS@

# C Compiler command
CC = @CC@

# C Compiler options
CFLAGS = @CFLAGS@

# Directory with COIN header files
COININCDIR = @abs_include_dir@/coin

# Directory with COIN libraries
COINLIBDIR = @abs_lib_dir@

# Libraries necessary to link with Clp
LIBS = -L$(COINLIBDIR) -lClp -lCoinUtils \
	@ADDLIBS@ `cat @COINUTILSDOCDIR@/coinutils_addlibs.txt`

# Necessary Include dirs (we use the CYGPATH_W variables to allow
# compilation with Windows compilers)
INCL =  -I`$(CYGPATH_W) $(COININCDIR)` $(ADDINCFLAGS)

# The following is necessary under cygwin, if native compilers are used
CYGPATH_W = @CYGPATH_W@

# Here we list all possible generated objects or executables to delete them
CLEANFILES = \
	addBits.@OBJEXT@ addBits@EXEEXT@ \
	addColumns.@OBJEXT@ addColumns@EXEEXT@ \
	addRows.@OBJEXT@ addRows@EXEEXT@ \
	decompose.@OBJEXT@ decompose@EXEEXT@ \
	defaults.@OBJEXT@ defaults@EXEEXT@ \
	driver2.@OBJEXT@ driver2@EXEEXT@ \
	driver.@OBJEXT@ driver@EXEEXT@ \
	driverC.@OBJEXT@ driverC@EXEEXT@ \
	dualCuts.@OBJEXT@ dualCuts@EXEEXT@ \
	ekk.@OBJEXT@ ekk@EXEEXT@ \
	ekk_interface.@OBJEXT@ ekk_interface@EXEEXT@ \
	hello.@OBJEXT@ hello@EXEEXT@ \
	makeDual.@OBJEXT@ makeDual@EXEEXT@ \
	minimum.@OBJEXT@ minimum@EXEEXT@ \
	network.@OBJEXT@ network@EXEEXT@ \
	piece.@OBJEXT@ piece@EXEEXT@ \
	rowColumn.@OBJEXT@ rowColumn@EXEEXT@ \
	sprint2.@OBJEXT@ sprint2@EXEEXT@ \
	sprint.@OBJEXT@ sprint@EXEEXT@ \
	testBarrier.@OBJEXT@ testBarrier@EXEEXT@ \
	testBasis.@OBJEXT@ testBasis@EXEEXT@ \
	testGub2.@OBJEXT@ testGub2@EXEEXT@ \
	testGub.@OBJEXT@ testGub@EXEEXT@ \
	testQP.@OBJEXT@ testQP@EXEEXT@ \
	useVolume.@OBJEXT@ useVolume@EXEEXT@

all: $(EXE)

.SUFFIXES: .cpp .c .o .obj

$(EXE): $(OBJS)
	bla=;\
	for file in $(OBJS); do bla="$$bla `$(CYGPATH_W) $$file`"; done; \
	$(CXX) $(CXXLINKFLAGS) $(CXXFLAGS) -o $@ $$bla $(ADDLIBS) $(LIBS)

clean:
	rm -rf $(CLEANFILES)

.cpp.o:
	$(CXX) $(CXXFLAGS) $(INCL) -c -o $@ `test -f '$<' || echo '$(SRCDIR)/'`$<


.cpp.obj:
	$(CXX) $(CXXFLAGS) $(INCL) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(SRCDIR)/$<'; fi`

.c.o:
	$(CC) $(CFLAGS) $(INCL) -c -o $@ `test -f '$<' || echo '$(SRCDIR)/'`$<


.c.obj:
	$(CC) $(CFLAGS) $(INCL) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(SRCDIR)/$<'; fi`
