summaryrefslogtreecommitdiff
path: root/package/libglew/patches/patch-Makefile
blob: 51cabbe773780ef9085759a5fc2dfa8b189f32f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
--- glew-1.10.0.orig/Makefile	2013-07-22 16:11:22.000000000 +0200
+++ glew-1.10.0/Makefile	2013-12-08 15:26:15.000000000 +0100
@@ -31,13 +31,13 @@
 include config/version
 
 SHELL = /bin/sh
-SYSTEM ?= $(shell config/config.guess | cut -d - -f 3 | sed -e 's/[0-9\.]//g;')
-SYSTEM.SUPPORTED = $(shell test -f config/Makefile.$(SYSTEM) && echo 1)
+SYSTEMS ?= $(shell config/config.guess | cut -d - -f 3 | sed -e 's/[0-9\.]//g;')
+SYSTEM.SUPPORTED = $(shell test -f config/Makefile.$(SYSTEMS) && echo 1)
 
 ifeq ($(SYSTEM.SUPPORTED), 1)
-include config/Makefile.$(SYSTEM)
+include config/Makefile.$(SYSTEMS)
 else
-$(error "Platform '$(SYSTEM)' not supported")
+$(error "Platform '$(SYSTEMS)' not supported")
 endif
 
 GLEW_DEST ?= /usr
@@ -71,7 +71,8 @@ else
 OPT = $(POPT)
 endif
 INCLUDE = -Iinclude
-CFLAGS = $(OPT) $(WARN) $(INCLUDE) $(CFLAGS.EXTRA)
+CFLAGS ?= $(OPT) $(WARN) $(CFLAGS.EXTRA)
+CFLAGS += $(INCLUDE)
 
 all debug: glew.lib glew.lib.mx glew.bin
 
@@ -83,14 +84,14 @@ LIB.LIBS           := $(GL_LDFLAGS)
 LIB.SRCS           := src/glew.c
 LIB.SRCS.NAMES     := $(notdir $(LIB.SRCS))
 
-LIB.OBJS           := $(addprefix tmp/$(SYSTEM)/default/static/,$(LIB.SRCS.NAMES))
+LIB.OBJS           := $(addprefix tmp/$(SYSTEMS)/default/static/,$(LIB.SRCS.NAMES))
 LIB.OBJS           := $(LIB.OBJS:.c=.o)
-LIB.SOBJS          := $(addprefix tmp/$(SYSTEM)/default/shared/,$(LIB.SRCS.NAMES))
+LIB.SOBJS          := $(addprefix tmp/$(SYSTEMS)/default/shared/,$(LIB.SRCS.NAMES))
 LIB.SOBJS          := $(LIB.SOBJS:.c=.o)
 
-LIB.OBJS.MX        := $(addprefix tmp/$(SYSTEM)/mx/static/,$(LIB.SRCS.NAMES))
+LIB.OBJS.MX        := $(addprefix tmp/$(SYSTEMS)/mx/static/,$(LIB.SRCS.NAMES))
 LIB.OBJS.MX        := $(LIB.OBJS.MX:.c=.o)
-LIB.SOBJS.MX       := $(addprefix tmp/$(SYSTEM)/mx/shared/,$(LIB.SRCS.NAMES))
+LIB.SOBJS.MX       := $(addprefix tmp/$(SYSTEMS)/mx/shared/,$(LIB.SRCS.NAMES))
 LIB.SOBJS.MX       := $(LIB.SOBJS.MX:.c=.o)
 
 glew.lib: lib lib/$(LIB.SHARED) lib/$(LIB.STATIC) glew.pc
@@ -114,11 +115,11 @@ ifneq ($(STRIP),)
 	$(STRIP) -x $@
 endif
 
-tmp/$(SYSTEM)/default/static/glew.o: src/glew.c include/GL/glew.h include/GL/wglew.h include/GL/glxew.h
+tmp/$(SYSTEMS)/default/static/glew.o: src/glew.c include/GL/glew.h include/GL/wglew.h include/GL/glxew.h
 	@mkdir -p $(dir $@)
 	$(CC) -DGLEW_NO_GLU -DGLEW_STATIC $(CFLAGS) $(CFLAGS.SO) -o $@ -c $<
 
-tmp/$(SYSTEM)/default/shared/glew.o: src/glew.c include/GL/glew.h include/GL/wglew.h include/GL/glxew.h
+tmp/$(SYSTEMS)/default/shared/glew.o: src/glew.c include/GL/glew.h include/GL/wglew.h include/GL/glxew.h
 	@mkdir -p $(dir $@)
 	$(CC) -DGLEW_NO_GLU $(CFLAGS) $(CFLAGS.SO) -o $@ -c $<
 
@@ -154,11 +155,11 @@ ifneq ($(STRIP),)
 	$(STRIP) -x $@
 endif
 
-tmp/$(SYSTEM)/mx/static/glew.o: src/glew.c include/GL/glew.h include/GL/wglew.h include/GL/glxew.h
+tmp/$(SYSTEMS)/mx/static/glew.o: src/glew.c include/GL/glew.h include/GL/wglew.h include/GL/glxew.h
 	@mkdir -p $(dir $@)
 	$(CC) -DGLEW_NO_GLU -DGLEW_MX -DGLEW_STATIC $(CFLAGS) $(CFLAGS.SO) -o $@ -c $<
 
-tmp/$(SYSTEM)/mx/shared/glew.o: src/glew.c include/GL/glew.h include/GL/wglew.h include/GL/glxew.h
+tmp/$(SYSTEMS)/mx/shared/glew.o: src/glew.c include/GL/glew.h include/GL/wglew.h include/GL/glxew.h
 	@mkdir -p $(dir $@)
 	$(CC) -DGLEW_NO_GLU -DGLEW_MX $(CFLAGS) $(CFLAGS.SO) -o $@ -c $<
 
@@ -183,17 +184,17 @@ BIN.LIBS = -Llib $(LDFLAGS.DYNAMIC) -l$(
 
 GLEWINFO.BIN       := glewinfo$(BIN.SUFFIX)
 GLEWINFO.BIN.SRC   := src/glewinfo.c
-GLEWINFO.BIN.OBJ   := $(addprefix tmp/$(SYSTEM)/default/shared/,$(notdir $(GLEWINFO.BIN.SRC)))
+GLEWINFO.BIN.OBJ   := $(addprefix tmp/$(SYSTEMS)/default/shared/,$(notdir $(GLEWINFO.BIN.SRC)))
 GLEWINFO.BIN.OBJ   := $(GLEWINFO.BIN.OBJ:.c=.o)
 
 VISUALINFO.BIN     := visualinfo$(BIN.SUFFIX)
 VISUALINFO.BIN.SRC := src/visualinfo.c
-VISUALINFO.BIN.OBJ := $(addprefix tmp/$(SYSTEM)/default/shared/,$(notdir $(VISUALINFO.BIN.SRC)))
+VISUALINFO.BIN.OBJ := $(addprefix tmp/$(SYSTEMS)/default/shared/,$(notdir $(VISUALINFO.BIN.SRC)))
 VISUALINFO.BIN.OBJ := $(VISUALINFO.BIN.OBJ:.c=.o)
 
 # Don't build glewinfo or visualinfo for NaCL, yet.
 
-ifneq ($(filter nacl%,$(SYSTEM)),)
+ifneq ($(filter nacl%,$(SYSTEMS)),)
 glew.bin: glew.lib bin
 else
 glew.bin: glew.lib bin bin/$(GLEWINFO.BIN) bin/$(VISUALINFO.BIN) 
@@ -233,7 +234,7 @@ install.mx:  install.include install.lib
 install.lib: glew.lib
 	$(INSTALL) -d -m 0755 $(LIBDIR)
 # runtime
-ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),)
+ifeq ($(filter-out mingw% cygwin,$(SYSTEMS)),)
 	$(INSTALL) -d -m 0755 $(BINDIR)
 	$(INSTALL) -m 0755 lib/$(LIB.SHARED) $(BINDIR)/
 else
@@ -244,7 +245,7 @@ ifneq ($(LN),)
 endif
 
 # development files
-ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),)
+ifeq ($(filter-out mingw% cygwin,$(SYSTEMS)),)
 	$(INSTALL) -m 0644 lib/$(LIB.DEVLNK) $(LIBDIR)/
 endif
 ifneq ($(LN),)
@@ -255,7 +256,7 @@ endif
 install.lib.mx: glew.lib.mx
 	$(INSTALL) -d -m 0755 $(LIBDIR)
 # runtime
-ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),)
+ifeq ($(filter-out mingw% cygwin,$(SYSTEMS)),)
 	$(INSTALL) -d -m 0755 $(BINDIR)
 	$(INSTALL) -m 0755 lib/$(LIB.SHARED.MX) $(BINDIR)/
 else
@@ -265,7 +266,7 @@ ifneq ($(LN),)
 	$(LN) $(LIB.SHARED.MX) $(LIBDIR)/$(LIB.SONAME.MX)
 endif
 # development files
-ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),)
+ifeq ($(filter-out mingw% cygwin,$(SYSTEMS)),)
 	$(INSTALL) -m 0644 lib/$(LIB.DEVLNK.MX) $(LIBDIR)/
 endif
 ifneq ($(LN),)
@@ -298,7 +299,7 @@ uninstall:
 	$(RM) $(INCDIR)/glew.h
 	$(RM) $(INCDIR)/glxew.h
 	$(RM) $(LIBDIR)/$(LIB.DEVLNK) $(LIBDIR)/$(LIB.DEVLNK.MX)
-ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),)
+ifeq ($(filter-out mingw% cygwin,$(SYSTEMS)),)
 	$(RM) $(BINDIR)/$(LIB.SHARED) $(BINDIR)/$(LIB.SHARED.MX)
 else
 	$(RM) $(LIBDIR)/$(LIB.SONAME) $(LIBDIR)/$(LIB.SONAME.MX)