########################################################################
########################### MIDACO MAKEFILE ############################
########################################################################
# Linux, g++ (C++ example)   -   run with:  make -f makefile_gpp_linux
########################################################################
        
# Specify Program Name
PROGRAM = run

# Specify Source Codes
# The C++ example example_MINLPc.cpp
SOURCES = example_MINLPc.o

# The MIDACO library, pre-compiled for Linux (x86-64). It links with
# any C or C++ compiler (gcc, g++, icx, clang, nvc, ...); C++ programs
# include midaco.h, which declares the interface as extern "C".
LIBRARY = midacoc.a

# Specify Compiler
C___COMPILER = gcc
CPP_COMPILER = g++

# Set Compiler Flags
FLAGS = -O3 -Wall

########################################################################
########################### COMPILE AND LINK ###########################
########################################################################
# Only C++ rules (the C example with the same name may be in this folder)
.SUFFIXES:
.SUFFIXES: .cpp .CPP .o
########################################################################
.cpp.o:
	     $(CPP_COMPILER) -c $(FLAGS) $?
.CPP.o:
	     $(CPP_COMPILER) -c $(FLAGS) $?
########################################################################
all:$(SOURCES)
	  $(CPP_COMPILER) -o $(PROGRAM) $(SOURCES) $(LIBRARY) -lm
########################################################################
############################## CLEANING ################################
########################################################################
clean:
	  rm -f *.o *~ $(PROGRAM)
# Make Extra Clean
xclean:
	  rm -f *.o *~ $(PROGRAM) *.TXT *.txt *.out
########################################################################
########################### END OF MAKEFILE ############################
########################################################################





