diff options
author | gahr <gahr@FreeBSD.org> | 2011-12-01 18:44:52 +0800 |
---|---|---|
committer | gahr <gahr@FreeBSD.org> | 2011-12-01 18:44:52 +0800 |
commit | d71b163c37bff03d8c9f5d8f93d3f204e4d84057 (patch) | |
tree | 6578173e3923b43bf9b19b2a515b091ab2bb6252 /devel | |
parent | 20293cc8d6e2ba2139e4aa42233939708b02b9dc (diff) | |
download | freebsd-ports-gnome-d71b163c37bff03d8c9f5d8f93d3f204e4d84057.tar.gz freebsd-ports-gnome-d71b163c37bff03d8c9f5d8f93d3f204e4d84057.tar.zst freebsd-ports-gnome-d71b163c37bff03d8c9f5d8f93d3f204e4d84057.zip |
- Build and install shared library as well
Feature safe: yes
Diffstat (limited to 'devel')
-rw-r--r-- | devel/glui/Makefile | 3 | ||||
-rw-r--r-- | devel/glui/files/patch-makefile | 39 |
2 files changed, 38 insertions, 4 deletions
diff --git a/devel/glui/Makefile b/devel/glui/Makefile index d041f078bf6b..b87872d67a04 100644 --- a/devel/glui/Makefile +++ b/devel/glui/Makefile @@ -21,12 +21,13 @@ MAKEFILE= makefile WRKSRC= ${WRKDIR}/${DISTNAME}/src -PLIST_FILES= include/glui.h lib/libglui.a +PLIST_FILES= include/glui.h lib/libglui.a lib/libglui.so PORTDOCS= * do-install: ${INSTALL_DATA} ${WRKSRC}/include/GL/glui.h ${PREFIX}/include/ ${INSTALL_DATA} ${WRKSRC}/lib/libglui.a ${PREFIX}/lib/ + ${INSTALL_DATA} ${WRKSRC}/lib/libglui.so ${PREFIX}/lib/ .if !defined(NOPORTDOCS) ${MKDIR} ${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/doc/glui_manual.pdf ${DOCSDIR}/ diff --git a/devel/glui/files/patch-makefile b/devel/glui/files/patch-makefile index 99f9ae9c045f..0ec894578f82 100644 --- a/devel/glui/files/patch-makefile +++ b/devel/glui/files/patch-makefile @@ -1,5 +1,5 @@ ---- makefile.orig 2007-08-21 07:59:54.000000000 +0400 -+++ makefile 2010-02-08 19:56:05.000000000 +0300 +--- makefile.orig 2007-08-21 05:59:54.000000000 +0200 ++++ makefile 2011-12-01 11:36:01.000000000 +0100 @@ -9,12 +9,7 @@ OPTS=-O0 #OPTS=-O2 @@ -10,7 +10,7 @@ -CXX = g++ -CPPFLAGS += $(OPTS) -Wall -pedantic -endif -+CPPFLAGS = $(CXXFLAGS) -Wall -pedantic ++CPPFLAGS = $(CXXFLAGS) -Wall -pedantic -fPIC ####################################### @@ -25,3 +25,36 @@ ####################################### +@@ -44,13 +39,15 @@ + + GLUI_LIB = lib/libglui.a + ++GLUI_DYNLIB = 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_DYNLIB) examples tools + + setup: + mkdir -p bin +@@ -64,11 +61,14 @@ + $(CXX) $(CPPFLAGS) -o $@ $^ + + bin/%: example/%.cpp $(GLUI_LIB) +- $(CXX) $(CPPFLAGS) -o $@ $< $(LIBGLUI) $(LIBGLUT) $(LIBGL) $(LIBS) ++ $(CXX) $(CPPFLAGS) -o $@ $< $(GLUI_LIB) $(LIBGLUT) $(LIBGL) $(LIBS) + + $(GLUI_LIB): $(GLUI_OBJS) + ar -r $(GLUI_LIB) $(GLUI_OBJS) + ++$(GLUI_DYNLIB): $(GLUI_OBJS) ++ $(CXX) -shared -o $@ $(GLUI_OBJS) $(LIBGLUT) $(LIBGL) $(LIBS) ++ + .cpp.o: + $(CXX) $(CPPFLAGS) -c $< + |