Browse Source

Fix compilation on Ubuntu

test
Michael Uleysky 9 years ago
parent
commit
9e85bfe6c7
  1. 3
      Makefile
  2. 5
      src/Makefile

3
Makefile

@ -1,3 +1,4 @@
SHELL=/bin/bash
OPTFLAGS=-O2 -flto -g OPTFLAGS=-O2 -flto -g
EXPORTFLAGS=-fvisibility=hidden -fpic -Wl,--export-dynamic EXPORTFLAGS=-fvisibility=hidden -fpic -Wl,--export-dynamic
CPPFLAGS=-std=gnu++11 -I../include -I../../include CPPFLAGS=-std=gnu++11 -I../include -I../../include
@ -17,7 +18,7 @@ DEPENDS = $(subst .cpp,.d,$(SOURCE))
OBJECTS = $(subst .cpp,.o,$(SOURCE)) OBJECTS = $(subst .cpp,.o,$(SOURCE))
../../bin/$(MODULE).so: $(OBJECTS) ../../bin/$(MODULE).so: $(OBJECTS)
$(CC) $(LDFLAGS) $(MODLIBS) -shared -o $@ $(OBJECTS) $(CC) -shared -o $@ $(OBJECTS) $(LDFLAGS) $(MODLIBS)
%.o: %.cpp %.o: %.cpp
$(CC) -c $(CFLAGS) -o $@ $< $(CC) -c $(CFLAGS) -o $@ $<

5
src/Makefile

@ -1,7 +1,8 @@
SHELL=/bin/bash
OPTFLAGS=-O2 -flto -g OPTFLAGS=-O2 -flto -g
EXPORTFLAGS=-fvisibility=hidden -fpic -Wl,--export-dynamic EXPORTFLAGS=-fvisibility=hidden -fpic -Wl,--export-dynamic
CPPFLAGS=-std=gnu++11 -I../include CPPFLAGS=-std=gnu++11 -I../include
LIBSFLAGS=-ldl -lpthread LIBSFLAGS=-ldl -lpthread $(MODLIBS)
WARNFLAGS=-Wall WARNFLAGS=-Wall
CFLAGS=$(OPTFLAGS) $(EXPORTFLAGS) $(WARNFLAGS) $(CPPFLAGS) CFLAGS=$(OPTFLAGS) $(EXPORTFLAGS) $(WARNFLAGS) $(CPPFLAGS)
@ -14,7 +15,7 @@ DEPENDS = $(subst .cpp,.d,$(SOURCE))
OBJECTS = $(subst .cpp,.o,$(SOURCE)) OBJECTS = $(subst .cpp,.o,$(SOURCE))
makemap: $(OBJECTS) $(MODOBJECTS) makemap: $(OBJECTS) $(MODOBJECTS)
$(CC) $(LDFLAGS) $(MODLIBS) -o $@ $(OBJECTS) $(MODOBJECTS) $(CC) -o $@ $(OBJECTS) $(MODOBJECTS) $(LDFLAGS)
include $(DEPENDS) include $(DEPENDS)

Loading…
Cancel
Save