Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ COPY --link --chown=1000:1000 . .
# Build, install, check FORCE
RUN echo "building FORCE" && \
./debug.sh $debug && \
make -j$(nproc) $build
make LTO=yes -j$(nproc) $build

FROM davidfrantz/base:latest AS force

Expand Down
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,15 @@
# Installation directory
INSTALLDIR=/usr/local/bin

# Link time optimization flags.
ifeq ($(LTO),yes)
FLAGS_LTO = -flto
endif

# Libraries
GDAL_INCLUDES = $(shell gdal-config --cflags)
GDAL_LIBS = $(shell gdal-config --libs)
GDAL_FLAGS = -Wl,-rpath=/usr/lib
GDAL_FLAGS = $(FLAGS_LTO) -Wl,-rpath=/usr/lib

GSL_INCLUDES = $(shell gsl-config --cflags)
GSL_LIBS = $(shell gsl-config --libs)
Expand All @@ -57,7 +62,7 @@ RSTATS_LIBS = $(shell R CMD config --ldflags | sed 's/ /\n/g' | grep '\-L') -lR
### Compiler

# Compilation Flags
CFLAGS=-O3 -Wall -fopenmp
CFLAGS=-O3 -Wall $(FLAGS_LTO) -fopenmp
#CFLAGS=-g -Wall -fopenmp

GCC=gcc $(CFLAGS)
Expand Down