forked from NGenetzky/espa-surface-reflectance
-
Notifications
You must be signed in to change notification settings - Fork 0
/
make.config
85 lines (70 loc) · 2.76 KB
/
make.config
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
# Defines for building this project
# To be included in all Makefiles
# This will be used as the base path for installtion
prefix = $(PREFIX)
# Must allways be $(PREFIX)/bin because installation depends on it
# Only placed here because it is a common location for all makefiles
link_path = $(PREFIX)/bin
# If BUILD_STATIC is not defined then shared compilation and linking
# will be performed
# If set to yes then static compilation and linking is performed
static_option =
ifeq ($(BUILD_STATIC), yes)
static_option = -static
endif
# If ENABLE_THREADING is not defined, then no threading will be compiled into
# the application
# If set to yes then threading support will be compiled into the application
threading_options =
ifeq ($(ENABLE_THREADING), yes)
threading_options = -fopenmp
endif
# If ENABLE_PROFILING is not defined, then no profiling will be compiled into
# the application
# If set to yes then profiling support will be compiled into the application
profiling_options =
ifeq ($(ENABLE_PROFILING), yes)
profiling_options = -pg
endif
# If ENABLE_DEBUG is not defined, then no debugging will be compiled into
# the application
# If set to yes then debugging support will be compiled into the application
debug_option =
ifeq ($(ENABLE_DEBUG), yes)
debug_option = -g
endif
# If ENABLE_OPTIMIZATION is not defined, then no optimization will be compiled
# into the application
# If set to yes then optimization support will be compiled into the application
optimization_options = -O2
ifeq ($(ENABLE_OPTIMIZATION), yes)
optimization_options = -O2
endif
ifeq ($(DISABLE_OPTIMIZATION), yes)
optimization_options =
endif
# Place the extra options identified above into one variable to be used
EXTRA_OPTIONS = $(debug_option) $(optimization_options) $(static_option) $(threading_options) $(profiling_options)
# Add help target
.PHONY: help
all:
help:
@echo "ENABLE_DEBUG=yes (default=no)"
@echo "BUILD_STATIC=yes (default=no)"
@echo "ENABLE_THREADING=yes (default=no)"
@echo "ENABLE_PROFILING=yes (default=no)"
@echo "ENABLE_OPTIMIZATION=yes (default=yes)"
@echo "DISABLE_OPTIMIZATION=yes (default=no)"
# ----------------------------------------------------------------------------
# Project specific variables, which are common to each project
project_name = espa-surface-reflectance
espa_project_dir = $(prefix)/$(project_name)
# Algorithm specific variables
ledaps_algorithm = ledaps
ledaps_algorithm_dir = $(espa_project_dir)/$(ledaps_algorithm)
ledaps_bin_install_path = $(ledaps_algorithm_dir)/bin
ledaps_link_source_path = ../$(project_name)/$(ledaps_algorithm)/bin
lasrc_algorithm = lasrc
lasrc_algorithm_dir = $(espa_project_dir)/$(lasrc_algorithm)
lasrc_bin_install_path = $(lasrc_algorithm_dir)/bin
lasrc_link_source_path = ../$(project_name)/$(lasrc_algorithm)/bin