# Copyright (C) 2005, 2010 International Business Machines and others.
# All Rights Reserved.
# This file is distributed under the Eclipse Public License.

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

# CHANGEME: This should be the name of your executable
EXE = hs071_cpp

# 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 = hs071_main.o \
	hs071_nlp.o

# CHANGEME: Additional libraries
ADDLIBS =

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

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

# C++ Compiler command
CXX = aarch64-linux-gnu-g++

# C++ Compiler options
CXXFLAGS = -g -O2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -ffile-prefix-map=BUILDPATH=. -flto=auto -ffat-lto-objects -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -fdebug-prefix-map=BUILDPATH=/usr/src/coinor-ipopt-3.14.19-1build1 -I/usr/lib/aarch64-linux-gnu/openmpi/lib/../../fortran/gfortran-mod-16/openmpi -I/usr/lib/aarch64-linux-gnu/openmpi/include -I/usr/lib/aarch64-linux-gnu/openmpi/include/openmpi 

# additional C++ Compiler options for linking
CXXLINKFLAGS =  -Wl,--rpath -Wl,/usr/lib/aarch64-linux-gnu

prefix=/usr
exec_prefix=${prefix}

# Include directories
INCL = `PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig: aarch64-linux-gnu-pkgconf --cflags ipopt` $(ADDINCFLAGS)
#INCL = -I${prefix}/include/coin-or  -I/usr/include/mumps  -DIPOPTLIB_BUILD $(ADDINCFLAGS)

# Linker flags
LIBS = `PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig: aarch64-linux-gnu-pkgconf --libs ipopt`
#LIBS = -L/usr/lib/aarch64-linux-gnu -lipopt  -ldmumps -llapack -lblas -lm  -ldl

all: $(EXE)

.SUFFIXES: .cpp .o

$(EXE): $(OBJS)
	$(CXX) $(CXXLINKFLAGS) $(CXXFLAGS) -o $@ $(OBJS) $(ADDLIBS) $(LIBS)

clean:
	rm -rf $(EXE) $(OBJS) ipopt.out

.cpp.o:
	$(CXX) $(CXXFLAGS) $(INCL) -c -o $@ $<
