Skip to content

Commit

Permalink
fixed makefile flags
Browse files Browse the repository at this point in the history
  • Loading branch information
dvirsky committed Jan 22, 2017
1 parent 0df0731 commit fdac637
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
9 changes: 6 additions & 3 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,19 @@
# find the OS
uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')


CFLAGS= -Wall -Wno-unused-function -Wno-unused-variable -Wno-pointer-sign -fPIC -lc -lm -std=gnu99 -I./
# Compile flags for linux / osx
ifeq ($(uname_S),Linux)
SHOBJ_CFLAGS ?= -fno-common -g -ggdb
SHOBJ_CFLAGS ?= -fno-common -g -ggdb
SHOBJ_LDFLAGS ?= -shared -Bsymbolic -Bsymbolic-functions
# We add -Werror to CFLAGS only on Linux since on OSX there are still tons of warnings
CFLAGS +=-Werror
else
SHOBJ_CFLAGS ?= -dynamic -fno-common -g -ggdb
SHOBJ_LDFLAGS ?= -bundle -undefined dynamic_lookup
endif
CFLAGS= -Wall -Werror -Wno-unused-function -Wno-unused-variable -Wno-pointer-sign -fPIC -lc -lm -std=gnu99 -I./
export CFLAGS

RELEASEFLAGS=-O3 -g
DEBUGFLAGS=-O0 -g
VARINT=varint.o buffer.o
Expand Down
3 changes: 2 additions & 1 deletion src/rmutil/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ ifndef RM_INCLUDE_DIR
RM_INCLUDE_DIR=../
endif

CFLAGS = -g -fPIC -lc -lm -O3 -std=gnu99 -I$(RM_INCLUDE_DIR) -Wall -Wno-unused-function
CFLAGS ?= -g -fPIC -lc -lm -O3 -std=gnu99 -Wall -Wno-unused-function
CFLAGS += -I$(RM_INCLUDE_DIR)
CC=gcc

OBJS=util.o strings.o sds.o vector.o alloc.o
Expand Down
3 changes: 2 additions & 1 deletion src/trie/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ ifndef RM_INCLUDE_DIR
RM_INCLUDE_DIR=../
endif

CFLAGS = -g -fPIC -lc -lm -O3 -std=gnu99 -I$(RM_INCLUDE_DIR) -Wall -Werror -Wno-unused-function -Wno-unused-variable
CFLAGS ?= -g -fPIC -lc -lm -O3 -std=gnu99 -Wall -Wno-unused-function -Wno-unused-variable
CFLAGS += -I$(RM_INCLUDE_DIR)
CC=gcc
OBJS=levenshtein.o rune_util.o sparse_vector.o trie.o trie_type.o

Expand Down
2 changes: 1 addition & 1 deletion src/util/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CFLAGS = -g -fPIC -lc -lm -O3 -std=gnu99
CFLAGS ?= -g -fPIC -lc -lm -O2 -std=gnu99

CC=gcc
.SUFFIXES: .c .so .xo .o
Expand Down

0 comments on commit fdac637

Please sign in to comment.