diff --git a/lib/Makefile b/lib/Makefile index 5aaf468..54df19d 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -30,7 +30,7 @@ depends.mk: *.cc -include depends.mk %.o: %.cc ../include/crucible/%.h - $(CXX) $(CXXFLAGS) -o $@ -c $< + $(CXX) $(CXXFLAGS) -fPIC -o $@ -c $< libcrucible.so: $(OBJS) Makefile - $(CXX) $(LDFLAGS) -o $@ $(OBJS) -shared -Wl,-soname,$@ -luuid + $(CXX) $(LDFLAGS) -fPIC -o $@ $(OBJS) -shared -Wl,-soname,$@ -luuid diff --git a/makeflags b/makeflags index f5983cb..de4a66f 100644 --- a/makeflags +++ b/makeflags @@ -1,4 +1,4 @@ -CCFLAGS = -Wall -Wextra -Werror -O3 -march=native -I../include -ggdb -fpic -D_FILE_OFFSET_BITS=64 +CCFLAGS = -Wall -Wextra -Werror -O3 -march=native -I../include -ggdb -D_FILE_OFFSET_BITS=64 # CCFLAGS = -Wall -Wextra -Werror -O0 -I../include -ggdb -fpic -D_FILE_OFFSET_BITS=64 CFLAGS = $(CCFLAGS) -std=c99 CXXFLAGS = $(CCFLAGS) -std=c++11 -Wold-style-cast