forked from mechmotum/cyipopt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
68 lines (50 loc) · 2.39 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
# cyipot: Python wrapper for the Ipopt optimization package, written in Cython.
#
# Copyright (C) 2012 Amit Aides
# Author: Amit Aides <[email protected]>
# URL: <http://http://code.google.com/p/cyipopt/>
# License: EPL 1.0
PYTHON = python
exec_prefix = ${prefix}
prefix = /home/amitibo/code/Ipopt-3.10.1
libdir = ${exec_prefix}/lib
CXX = g++
CXXFLAGS = -O3 -pipe -DNDEBUG -pedantic-errors -Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings -Wconversion -Wno-unknown-pragmas -Wno-long-long -DIPOPT_BUILD -DMATLAB_MEXFILE # -DMWINDEXISINT
LDFLAGS = $(CXXFLAGS) -Wl,--rpath -Wl,/home/amitibo/code/Ipopt-3.10.1/lib
# Include directories (we use the CYGPATH_W variables to allow compilation with Windows compilers)
INCL = `PKG_CONFIG_PATH=/home/amitibo/code/Ipopt-3.10.1/lib/pkgconfig:/home/amitibo/code/Ipopt-3.10.1/share/pkgconfig: /usr/bin/pkg-config --cflags ipopt`
#INCL = -I`$(CYGPATH_W) /home/amitibo/code/Ipopt-3.10.1/include/coin`
# Linker flags
LIBS = `PKG_CONFIG_PATH=/home/amitibo/code/Ipopt-3.10.1/lib/pkgconfig:/home/amitibo/code/Ipopt-3.10.1/share/pkgconfig: /usr/bin/pkg-config --libs ipopt`
##LIBS = -link -libpath:`$(CYGPATH_W) /home/amitibo/code/Ipopt-3.10.1/lib` libipopt.lib -lm -ldl
#LIBS = -L/home/amitibo/code/Ipopt-3.10.1/lib -lipopt -lm -ldl
# The following is necessary under cygwin, if native compilers are used
CYGPATH_W = echo
.PHONY: usage all clean clean_code
usage:
@echo "make dist -- Build distributions (output to dist/)"
@echo "make clean -- Remove all built files and temporary files"
all: dist
########################################################################
# DISTRIBUTIONS
########################################################################
dist: zipdist gztardist windist
gztardist: clean_code
$(PYTHON) setup.py -q sdist --format=gztar
zipdist: clean_code
$(PYTHON) setup.py -q sdist --format=zip
rpmdist: clean_code
$(PYTHON) setup.py -q bdist --format=rpm
windist: clean_code
$(PYTHON) setup.py -q bdist --format=wininst --plat-name=win32
########################################################################
# CLEAN
########################################################################
.PHONY: clean clean_code
clean:
rm -rf build dist MANIFEST
clean_code:
rm -f `find . -name '*.pyc'`
rm -f `find . -name '*.pyo'`
rm -f `find . -name '*~'`
rm -f MANIFEST # regenerate manifest from MANIFEST.in