-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Minimalist GLU compilation
This page explains how to recompile the minGLU dependency on every platforms. MinGLu is a minimalist version of the OpenGL Utility Library used internally by Webots to perform tessellation.
On Windows, minGLU is provided as a MSYS2 pacman package and is automatically installed when installing the msys dependencies.
On Linux, minGLU is also provided as a package called libglu1-mesa-dev
and is automatically installed when installing the required packages.
From http://www.linuxfromscratch.org/blfs/view/cvs/x/glu.html, download glu-9.0.0.tar.bz2, and extract it to ~/software/glu-9.0.0
.
Edit ~/software/glu-9.0.0/include/GL/glu.
to change #include <GL/gl.h>
to #include <OpenGL/gl.h>
.
Create ~/software/glu-9.0.0/Makefile
:
SRC = \
src/libutil/error.c \
src/libutil/glue.c \
src/libtess/dict.c \
src/libtess/geom.c \
src/libtess/memalloc.c \
src/libtess/mesh.c \
src/libtess/normal.c \
src/libtess/priorityq.c \
src/libtess/render.c \
src/libtess/sweep.c \
src/libtess/tess.c \
src/libtess/tessmono.c
MACOSX_MIN_SDK_VERSION = 10.9
OBJ = $(SRC:.c=.o)
OUT = libminiglu.a
INCLUDES = -Iinclude -Isrc/include
CCFLAGS = -Wall -O3 -mmacosx-version-min=$(MACOSX_MIN_SDK_VERSION)
CCC = gcc
LDFLAGS = -mmacosx-version-min=$(MACOSX_MIN_SDK_VERSION)
.SUFFIXES: .c
default: $(OUT)
%.o: %.c
$(CCC) $(INCLUDES) $(CCFLAGS) -c $< -o $@
$(OUT): $(OBJ)
ar rcs $(OUT) $(OBJ)
clean:
rm -f $(OBJ) $(OUT)
Build:
cd ~/software/glu-9.0.0
ln -s /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-migrator/sdks/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/gl.h include/GL/
make
Create the precompiled package:
cd ~/software
tar -zcvf libminiglu.tar.gz glu-9.0.0