patch-Makefile 5.6 KB

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