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)