--- Makefile.orig 2020-06-16 11:03:34 UTC +++ Makefile @@ -86,7 +86,6 @@ endif MATCH=false ifeq ($(MODE), release) outdir = bin/release/ - cxxflags += -O2 MATCH=true endif ifeq ($(MODE), debug) @@ -98,13 +97,13 @@ ifeq ($(MODE), debug) endif ifeq ($(MODE), shared) outdir = bin/shared/ - cxxflags += -O2 -fPIC + cxxflags += -fPIC library = libfrobby.so MATCH=true endif ifeq ($(MODE), profile) outdir = bin/profile/ - cxxflags += -g -pg -O2 -D PROFILE + cxxflags += -g -pg -D PROFILE ldflags += -pg MATCH=true benchArgs = _profile $(FROBBYARGS) @@ -212,7 +211,7 @@ library: bin/$(library) bin/$(library): $(objs) | bin/ rm -f bin/$(library) ifeq ($(MODE), shared) - $(CXX) -shared -o bin/$(library) $(ldflags) \ + $(CXX) -shared -Wl,-soname,$(library) -o bin/$(library) $(ldflags) \ $(patsubst $(outdir)main.o,,$(objs)) else ar crs bin/$(library) $(patsubst $(outdir)main.o,,$(objs))