vim: update to 9.1.0984
[oi-userland.git] / components / library / libglew / Makefile
blobd57ebd597a19725f922883a72634c401fbbeee42
2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"). You may
4 # only use this file in accordance with the terms of the CDDL.
6 # A full copy of the text of the CDDL should have accompanied this
7 # source. A copy of the CDDL is also available via the Internet at
8 # http://www.illumos.org/license/CDDL.
12 # Copyright 2016 Jim Klimov <jimklimov@gmail.com>
15 # NOTE: This project links with /usr/openwin/lib/libGL.so.1, which unrolls
16 # to /usr/lib/GL/libGL.so.1 which is a symlink to run-time (hardware-related?)
17 # mediator in the ../../../var/run/opengl/lib/libGL.so.1. So far so good...
18 # In my case (GZ on a VirtualBox host, even though it is dual-booted and runs
19 # OI/Hipster natively at the moment) this library symlink points back to
20 # /usr/lib/mesa/libGL.so.1 and this one object points to /usr/lib/VBoxOGL.so
21 # rather than the nearby mesa objects. This breaks the build because pkgmogrify
22 # insists on objects coming from known repo's, and because ultimate objects do
23 # refer to virtualbox rather than libs expected available on all deployments!
24 # Perhaps we should *require* do the builds in a dedicated local zone?..
25 # TODO: Find out the root-cause and attach a patch-file with a fix to this.
27 include ../../../make-rules/shared-macros.mk
29 COMPONENT_NAME= glew
30 COMPONENT_VERSION= 1.13.0
31 COMPONENT_REVISION= 1
32 COMPONENT_SUMMARY= The OpenGL Extension Wrangler Library
33 COMPONENT_CLASSIFICATION=System/Libraries
34 COMPONENT_FMRI= x11/library/lib$(COMPONENT_NAME)
35 COMPONENT_LICENSE= GLEW,Mesa3D,Khronos
36 COMPONENT_LICENSE_FILE= LICENSE.txt
37 COMPONENT_PROJECT_URL= http://$(COMPONENT_NAME).sourceforge.net/
38 COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
39 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tgz
40 COMPONENT_ARCHIVE_HASH= \
41 sha256:aa25dc48ed84b0b64b8d41cdd42c8f40f149c37fa2ffa39cd97f42c78d128bc7
42 COMPONENT_ARCHIVE_URL= \
43 http://sourceforge.net/projects/$(COMPONENT_NAME)/files/$(COMPONENT_NAME)/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
45 PATH=/usr/gnu/bin:/usr/bin
47 include $(WS_MAKE_RULES)/prep.mk
48 include $(WS_MAKE_RULES)/justmake.mk
49 include $(WS_MAKE_RULES)/ips.mk
51 CUSTOM.LDFLAGS.GL = -lGL
52 COMPONENT_PREP_ACTION = \
53 ( cd "$(SOURCE_DIR)/config" && cp -pf "$(COMPONENT_DIR)/files/Makefile.illumos-gcc" ./ )
55 CFLAGS += -I$(SOURCE_DIR)/include
56 CFLAGS += -D_FILE_OFFSET_BITS=64
58 # These flags define the nuances of "oi-userland" in "glew"'s Makefile dialect.
59 # They are common for build and install actions, so we define them once in an
60 # extra variable, and re-use it below. Note we use "CUSTOM.*" flags defined in
61 # the custom Makefile.illumos-gcc to append common oi-userland flag values
62 # and not override the project's CFLAGS etc. in whole.
64 LIBDIR.32=$(USRLIBDIR)
65 LIBDIR.64=$(USRLIBDIR64)
67 COMPONENT_COMMON_ARGS = SYSTEM=illumos-gcc
68 COMPONENT_COMMON_ARGS += BINDIR="$(USRBINDIR$(BITS))"
69 COMPONENT_COMMON_ARGS += LIBDIR="$(LIBDIR.$(BITS))"
70 COMPONENT_COMMON_ARGS += INCDIR="$(USRINCDIR)"
71 COMPONENT_COMMON_ARGS += DESTDIR="$(PROTO_DIR)"
72 COMPONENT_COMMON_ARGS += GLEW_PREFIX="$(USRDIR)"
73 COMPONENT_COMMON_ARGS += GLEW_DEST="$(USRDIR)"
74 COMPONENT_COMMON_ARGS += CC="$(CC)"
75 COMPONENT_COMMON_ARGS += CUSTOM.CFLAGS.EXTRA="$(CFLAGS)"
76 COMPONENT_COMMON_ARGS += LD="$(CC)"
77 COMPONENT_COMMON_ARGS += CUSTOM.LDFLAGS.EXTRA="$(LDFLAGS)"
78 COMPONENT_COMMON_ARGS += CUSTOM.LDFLAGS.SO="$(LDFLAGS)"
79 COMPONENT_COMMON_ARGS += CUSTOM.LDFLAGS.GL="$(CUSTOM.LDFLAGS.GL)"
80 COMPONENT_COMMON_ARGS += AR="$(AR)"
81 COMPONENT_COMMON_ARGS += CUSTOM.ARFLAGS.EXTRA="$(ARFLAGS)"
83 ### In case of updates, review what the glew Makefile defines (and expects)
84 ### these commands to be. In particular, their LN="ln -sf" now, and it matters.
85 COMPONENT_COMMON_ARGS += RM="$(RM)"
86 COMPONENT_COMMON_ARGS += LN="$(SYMLINK) -f"
88 COMPONENT_BUILD_ARGS += $(COMPONENT_COMMON_ARGS)
89 COMPONENT_BUILD_TARGETS = all
90 COMPONENT_INSTALL_ARGS += $(COMPONENT_COMMON_ARGS)
91 COMPONENT_INSTALL_TARGETS = install.all
93 build: $(BUILD_32_and_64)
95 install: $(INSTALL_32_and_64)
97 test: $(TEST_32_and_64)
99 REQUIRED_PACKAGES += SUNWcs
100 REQUIRED_PACKAGES += system/library
101 REQUIRED_PACKAGES += x11/library/libx11