--- src/makefile 2007-08-21 03:59:54.000000000 +0000 +++ src/makefile 2010-07-02 23:07:03.269747714 +0000 @@ -13,7 +13,7 @@ ifeq ($(UNAME), Linux) CXX = g++ -CPPFLAGS += $(OPTS) -Wall -pedantic +CPPFLAGS += $(OPTS) -Wall -pedantic -fPIC endif ####################################### @@ -44,13 +44,15 @@ GLUI_LIB = lib/libglui.a +GLUI_SO = lib/libglui.so + GLUI_EXAMPLES = bin/example1 bin/example2 bin/example3 bin/example4 bin/example5 bin/example6 GLUI_TOOLS = bin/ppm2array .PHONY: all setup examples tools clean depend doc doc-pdf doc-dist dist -all: setup $(GLUI_LIB) examples tools +all: setup $(GLUI_LIB) $(GLUI_SO) examples tools setup: mkdir -p bin @@ -69,6 +71,9 @@ $(GLUI_LIB): $(GLUI_OBJS) ar -r $(GLUI_LIB) $(GLUI_OBJS) +$(GLUI_SO): $(GLUI_OBJS) + gcc --shared $(GLUI_OBJS) -lglut -lGLU -Wl,-soname,libglui.so.0 -o $@ + .cpp.o: $(CXX) $(CPPFLAGS) -c $<