diff --git a/Makefile b/Makefile index 7f97342..8280f87 100644 --- a/Makefile +++ b/Makefile @@ -45,6 +45,7 @@ GLEW_DEST ?= /usr BINDIR ?= $(GLEW_DEST)/bin LIBDIR ?= $(GLEW_DEST)/lib INCDIR ?= $(GLEW_DEST)/include/GL +PKGDIR ?= $(GLEW_DEST)/lib/pkgconfig ifneq ($(GLEW_NO_GLU), -DGLEW_NO_GLU) LIBGLU = glu @@ -229,9 +230,9 @@ install.include: $(INSTALL) -m 0644 include/GL/glxew.h "$(DESTDIR)$(INCDIR)/" install.pkgconfig: glew.pc - $(INSTALL) -d -m 0755 "$(DESTDIR)$(LIBDIR)" - $(INSTALL) -d -m 0755 "$(DESTDIR)$(LIBDIR)/pkgconfig" - $(INSTALL) -m 0644 glew.pc "$(DESTDIR)$(LIBDIR)/pkgconfig/" + $(INSTALL) -d -m 0755 "$(DESTDIR)$(PKGDIR)" + $(INSTALL) -d -m 0755 "$(DESTDIR)$(PKGDIR)" + $(INSTALL) -m 0644 glew.pc "$(DESTDIR)$(PKGDIR)/" uninstall: $(RM) "$(DESTDIR)$(INCDIR)/wglew.h" diff --git a/README.md b/README.md index 6f4659c..a85faa9 100644 --- a/README.md +++ b/README.md @@ -73,8 +73,37 @@ RedHat/CentOS/Fedora: `$ sudo yum install libXmu-devel libXi-devel libGL-devel g ### Windows +#### Visual Studio + Use the provided Visual Studio project file in build/vc12/ +Projects for vc6 and vc10 are also provided + +#### MSYS/Mingw + +Available from [Mingw](http://www.mingw.org/) + +Requirements: bash, make, gcc + + $ mingw32-make + $ mingw32-make install + $ mingw32-make install.all + +Alternative toolchain: `SYSTEM=mingw-win32` + +#### MSYS2/Mingw-w64 + +Available from [Msys2](http://msys2.github.io/) and/or [Mingw-w64](http://mingw-w64.org/) + +Requirements: bash, make, gcc + + $ pacman -S gcc make mingw-w64-i686-gcc mingw-w64-x86_64-gcc + $ make + $ make install + $ make install.all + +Alternative toolchain: `SYSTEM=msys, SYSTEM=msys-win32, SYSTEM=msys-win64` + ## glewinfo `glewinfo` is a command-line tool useful for inspecting the capabilities of an diff --git a/config/Makefile.msys b/config/Makefile.msys index 7be7344..dfee9c7 100644 --- a/config/Makefile.msys +++ b/config/Makefile.msys @@ -3,6 +3,7 @@ NAME = glew32 CC := gcc LD := gcc LN := +CFLAGS.EXTRA += -D_WIN32 LDFLAGS.GL = -lopengl32 -lgdi32 -luser32 -lkernel32 LDFLAGS.EXTRA = LIBDIR = $(GLEW_DEST)/bin diff --git a/config/Makefile.msys-win32 b/config/Makefile.msys-win32 new file mode 100644 index 0000000..160d3eb --- /dev/null +++ b/config/Makefile.msys-win32 @@ -0,0 +1,5 @@ +include config/Makefile.msys + +POPT := -march=i686 -mtune=generic -O2 +CFLAGS.EXTRA += -m32 +LDFLAGS.EXTRA += -m32 diff --git a/config/Makefile.msys-win64 b/config/Makefile.msys-win64 new file mode 100644 index 0000000..c1c785a --- /dev/null +++ b/config/Makefile.msys-win64 @@ -0,0 +1,5 @@ +include config/Makefile.msys + +POPT := -mtune=generic -O2 +CFLAGS.EXTRA += -m64 +LDFLAGS.EXTRA += -m64