aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-11-05 20:59:40 +0100
committerMattias Andrée <maandree@operamail.com>2014-11-05 20:59:40 +0100
commitb8cce0ba5348e9f00e4b7f550b00d668efdb8fbc (patch)
treea65e91bb8e16ba82b31b10d6e27b477ac699d950
parentm (diff)
downloadlibkeccak-b8cce0ba5348e9f00e4b7f550b00d668efdb8fbc.tar.gz
libkeccak-b8cce0ba5348e9f00e4b7f550b00d668efdb8fbc.tar.bz2
libkeccak-b8cce0ba5348e9f00e4b7f550b00d668efdb8fbc.tar.xz
isolate optimisation to the library
Signed-off-by: Mattias Andrée <maandree@operamail.com>
-rw-r--r--Makefile14
1 files changed, 7 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index ba46e28..c4b2d49 100644
--- a/Makefile
+++ b/Makefile
@@ -24,10 +24,10 @@ WARN = -Wall -Wextra -pedantic -Wdouble-promotion -Wformat=2 -Winit-self -Wmissi
LDOPTIMISE =
# -flto -flto-compression-level -flto-partition={1to1,balanced,mix,none} -flto-report -flto-report-wpa -fwpa
-OPTIMISE = -march=native -O0 \
- -fdata-sections -fcrossjumping -fexpensive-optimizations \
- -ffunction-sections -fkeep-inline-functions -fomit-frame-pointer \
- -freorder-blocks-and-partition -ftree-ter -falign-functions=0
+COPTIMISE = -march=native -O0 \
+ -fdata-sections -fcrossjumping -fexpensive-optimizations \
+ -ffunction-sections -fkeep-inline-functions -fomit-frame-pointer \
+ -freorder-blocks-and-partition -ftree-ter -falign-functions=0
# -fira-algorithm=priority -fira-algorithm=CB
# -fira-region=all -fira-region=mixed -fira-region=one
@@ -79,7 +79,7 @@ OPTIMISE = -march=native -O0 \
# -falign-jumps=0 -falign-labels=0 -falign-loops=0 -ftree-parallelize-loops=10
# -fsched-stalled-insns-dep=0 -fsched-stalled-insns=0
-FLAGS = -std=gnu99 $(WARN) $(OPTIMISE)
+FLAGS = -std=gnu99 $(WARN)
LIB_OBJ = digest files generalised-spec hex state
@@ -95,7 +95,7 @@ lib: bin/libkeccak.so.$(LIB_VERSION) bin/libkeccak.so.$(LIB_MAJOR) bin/libkeccak
obj/libkeccak/%.o: src/libkeccak/%.c src/libkeccak.h src/libkeccak/*.h
@mkdir -p obj/libkeccak
- $(CC) $(FLAGS) $(CFLAGS) $(CPPFLAGS) -fPIC -c -o $@ $<
+ $(CC) $(FLAGS) $(CFLAGS) $(COPTIMISE) $(CPPFLAGS) -fPIC -c -o $@ $<
bin/libkeccak.so.$(LIB_VERSION): $(foreach O,$(LIB_OBJ),obj/libkeccak/$(O).o)
@mkdir -p bin
@@ -118,7 +118,7 @@ bin/test: bin/libkeccak.so $(foreach O,$(TEST_OBJ),obj/test/$(O).o)
obj/test/%.o: src/test/%.c src/libkeccak/*.h src/libkeccak.h
@mkdir -p obj/test
- $(CC) $(FLAGS) $(CFLAGS) $(CPPFLAGS) -Isrc -c -o $@ $<
+ $(CC) $(FLAGS) $(CFLAGS) $(CPPFLAGS) -Isrc -O3 -c -o $@ $<
.PHONY: check