From 9e85bfe6c7e4bc98d4515e3793212fdcc32932cc Mon Sep 17 00:00:00 2001 From: Michael Uleysky Date: Fri, 18 Sep 2015 12:46:12 +1000 Subject: [PATCH] Fix compilation on Ubuntu --- Makefile | 3 ++- src/Makefile | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 0b1b6c8..30af73f 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,4 @@ +SHELL=/bin/bash OPTFLAGS=-O2 -flto -g EXPORTFLAGS=-fvisibility=hidden -fpic -Wl,--export-dynamic CPPFLAGS=-std=gnu++11 -I../include -I../../include @@ -17,7 +18,7 @@ DEPENDS = $(subst .cpp,.d,$(SOURCE)) OBJECTS = $(subst .cpp,.o,$(SOURCE)) ../../bin/$(MODULE).so: $(OBJECTS) - $(CC) $(LDFLAGS) $(MODLIBS) -shared -o $@ $(OBJECTS) + $(CC) -shared -o $@ $(OBJECTS) $(LDFLAGS) $(MODLIBS) %.o: %.cpp $(CC) -c $(CFLAGS) -o $@ $< diff --git a/src/Makefile b/src/Makefile index 01c3f7f..24e994b 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,7 +1,8 @@ +SHELL=/bin/bash OPTFLAGS=-O2 -flto -g EXPORTFLAGS=-fvisibility=hidden -fpic -Wl,--export-dynamic CPPFLAGS=-std=gnu++11 -I../include -LIBSFLAGS=-ldl -lpthread +LIBSFLAGS=-ldl -lpthread $(MODLIBS) WARNFLAGS=-Wall CFLAGS=$(OPTFLAGS) $(EXPORTFLAGS) $(WARNFLAGS) $(CPPFLAGS) @@ -14,7 +15,7 @@ DEPENDS = $(subst .cpp,.d,$(SOURCE)) OBJECTS = $(subst .cpp,.o,$(SOURCE)) makemap: $(OBJECTS) $(MODOBJECTS) - $(CC) $(LDFLAGS) $(MODLIBS) -o $@ $(OBJECTS) $(MODOBJECTS) + $(CC) -o $@ $(OBJECTS) $(MODOBJECTS) $(LDFLAGS) include $(DEPENDS)