forked from acados/acados
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.rule
125 lines (98 loc) · 2.4 KB
/
Makefile.rule
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# Author: Gianluca Frison
CC = gcc
#CC = clang
#CC = x86_64-w64-mingw32-gcc
# Operating system
UNAME_S = $(shell uname -s)
ifeq ($(UNAME_S),Linux)
OS = LINUX
endif
ifeq ($(UNAME_S),Darwin)
OS = MAC
endif
#OS = LINUX
#OS = MAC
#OS = WINDOWS
# Installation directory
TOP = $(shell pwd)
#PREFIX = /opt
# External projects directory
EXT_PATH = $(TOP)/external
## BLASFEO path
BLASFEO_PATH = $(EXT_PATH)/blasfeo
#BLASFEO_PATH = /home/gianluca/blasfeo
## BLASFEO version
BLASFEO_VERSION = HIGH_PERFORMANCE
# BLASFEO_VERSION = REFERENCE
# BLASFEO_VERSION = BLAS_WRAPPER
## BLASFEO target
BLASFEO_TARGET = X64_INTEL_HASWELL
# BLASFEO_TARGET = X64_INTEL_SANDY_BRIDGE
# BLASFEO_TARGET = X64_INTEL_CORE
# BLASFEO_TARGET = GENERIC
## HPIPM path
HPIPM_PATH = $(EXT_PATH)/hpipm
#HPIPM_PATH = /home/gianluca/hpipm
## HPIPM target
HPIPM_TARGET = AVX
# HPIPM_TARGET = GENERIC
## HPMPC path
HPMPC_PATH = $(EXT_PATH)/hpmpc
## HPMPC target
HPMPC_TARGET = X64_AVX
## qpOASES path
QPOASES_PATH = $(EXT_PATH)/qpoases
# QORE path
QORE_PATH = $(EXT_PATH)/qore
# QPDUNES path
QPDUNES_PATH = $(EXT_PATH)/qpdunes
# parallelize using openmp
ACADOS_WITH_OPENMP = 0
# include QPOASES
ACADOS_WITH_QPOASES = 1
# include HPMPC
ACADOS_WITH_HPMPC = 0
# include QPDUNES
ACADOS_WITH_QPDUNES = 0
# include QORE
ACADOS_WITH_QORE = 0
# C interface
ACADOS_WITH_C_INTERFACE = 1
# measure timings
MEASURE_TIMINGS = 1
# compiler flags
CFLAGS =
# optimization flags
CFLAGS += -O2 -fPIC
# turn off assert
#CFLAGS += -DNDEBUG
# debugging flags
CFLAGS += #-g -Wall -pedantic -Wfloat-equal #-pg
ifeq ($(ACADOS_WITH_OPENMP), 1)
CFLAGS += -DACADOS_WITH_OPENMP -fopenmp
endif
ifeq ($(ACADOS_WITH_QPOASES), 1)
CFLAGS += -DACADOS_WITH_QPOASES
endif
ifeq ($(ACADOS_WITH_HPMPC), 1)
CFLAGS += -DACADOS_WITH_HPMPC
endif
ifeq ($(ACADOS_WITH_QPDUNES), 1)
CFLAGS += -DACADOS_WITH_QPDUNES
endif
ifeq ($(ACADOS_WITH_QORE), 1)
CFLAGS += -DACADOS_WITH_QORE
endif
ifeq ($(ACADOS_WITH_C_INTERFACE), 1)
CFLAGS += -DACADOS_WITH_C_INTERFACE
endif
# TEMP
#CFLAGS += -g -O0 -DRUNTIME_CHECKS -DEXT_DEPS -DALIGNMENT=64 -D__DEBUG__
# timing
ifeq ($(MEASURE_TIMINGS), 1)
CFLAGS += -DMEASURE_TIMINGS
endif
# search directories
CFLAGS += -I$(TOP) -I$(TOP)/interfaces -I$(TOP)/include -I$(BLASFEO_PATH)/include -I$(HPIPM_PATH)/include -I$(HPMPC_PATH)/include -I$(QPOASES_PATH)/include -I$(TOP)/include/qore/include -I$(QPDUNES_PATH)/include
LDFLAGS += -L$(TOP)/lib
CXXFLAGS = $(CFLAGS) -std=c++11