-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
72 lines (50 loc) · 2.8 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Copyright (C) 2005, 2010 International Business Machines and others.
# All Rights Reserved.
# This file is distributed under the Eclipse Public License.
# $Id$
##########################################################################
# You can modify this example makefile to fit for your own program. #
# Usually, you only need to change the five CHANGEME entries below. #
##########################################################################
# CHANGEME: This should be the name of your executable
EXE = stone_slide_main
# 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 = stone_slide_main.o \
stone_slide_nlp.o \
Differentiation_Matrix.o \
# CHANGEME: Additional libraries
ADDLIBS =
# CHANGEME: Additional flags for compilation (e.g., include flags)
ADDINCFLAGS = -I/home/iota/Desktop/sliding_stone
##########################################################################
# 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 = g++
# C++ Compiler options
CXXFLAGS = -O3 -pipe -DNDEBUG -Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings -Wconversion -Wno-unknown-pragmas -Wno-long-long -DIPOPT_BUILD
# additional C++ Compiler options for linking
CXXLINKFLAGS = -Wl,--rpath -Wl,/home/dell/Ipopt/build/lib
# Include directories (we use the CYGPATH_W variables to allow compilation with Windows compilers)
INCL = `PKG_CONFIG_PATH=/home/iota/Downloads/IPOPT_setup/CoinIpopt/build/lib64/pkgconfig:/home/iota/Downloads/IPOPT_setup/CoinIpopt/build/lib/pkgconfig:/home/iota/Downloads/IPOPT_setup/CoinIpopt/build/share/pkgconfig: pkg-config --cflags ipopt` $(ADDINCFLAGS)
#INCL = -I`$(CYGPATH_W) /home/dell/Ipopt/build/include/coin` $(ADDINCFLAGS)
# Linker flags
LIBS = `PKG_CONFIG_PATH=/home/iota/Downloads/IPOPT_setup/CoinIpopt/build/lib64/pkgconfig:/home/iota/Downloads/IPOPT_setup/CoinIpopt/build/lib/pkgconfig:/home/iota/Downloads/IPOPT_setup/CoinIpopt/build/share/pkgconfig: pkg-config --libs ipopt`
##LIBS = -link -libpath:`$(CYGPATH_W) /home/dell/Ipopt/build/lib` libipopt.lib -lm -ldl
#LIBS = -L/home/dell/Ipopt/build/lib -lipopt -lm -ldl
# The following is necessary under cygwin, if native compilers are used
CYGPATH_W = echo
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 $(EXE) $(OBJS) ipopt.out
.cpp.o:
$(CXX) $(CXXFLAGS) $(INCL) -c -o $@ $<
.cpp.obj:
$(CXX) $(CXXFLAGS) $(INCL) -c -o $@ `$(CYGPATH_W) '$<'`