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
|
$NetBSD: patch-ac,v 1.7 2010/11/10 20:22:54 adam Exp $
--- Makefile.orig 2010-11-03 20:55:35.000000000 +0000
+++ Makefile
@@ -89,7 +89,7 @@ lib/$(LIB.STATIC): $(LIB.OBJS)
$(AR) cr $@ $^
lib/$(LIB.SHARED): $(LIB.SOBJS)
- $(LD) $(LDFLAGS.SO) -o $@ $^ $(LIB.LDFLAGS) $(LIB.LIBS)
+ $(LD) $(LDFLAGS) $(LDFLAGS.SO) -o $@ $^ $(LIB.LDFLAGS) $(LIB.LIBS)
ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),)
else
$(LN) $(LIB.SHARED) lib/$(LIB.SONAME)
@@ -97,10 +97,10 @@ else
endif
bin/$(GLEWINFO.BIN): $(GLEWINFO.BIN.OBJS) lib/$(LIB.SHARED)
- $(CC) $(CFLAGS) -o $@ $(GLEWINFO.BIN.OBJS) $(BIN.LIBS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(GLEWINFO.BIN.OBJS) $(BIN.LIBS)
bin/$(VISUALINFO.BIN): $(VISUALINFO.BIN.OBJS) lib/$(LIB.SHARED)
- $(CC) $(CFLAGS) -o $@ $(VISUALINFO.BIN.OBJS) $(BIN.LIBS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(VISUALINFO.BIN.OBJS) $(BIN.LIBS)
%.o: %.c
$(CC) -c $(CFLAGS) -o $@ $<
@@ -122,33 +122,31 @@ glew.pc: glew.pc.in
install: all
# directories
- $(INSTALL) -d -m 0755 $(BINDIR)
- $(INSTALL) -d -m 0755 $(INCDIR)
- $(INSTALL) -d -m 0755 $(LIBDIR)
- $(INSTALL) -d -m 0755 $(LIBDIR)/pkgconfig
+ $(INSTALL) -d -m 0755 $(DESTDIR)$(BINDIR)
+ $(INSTALL) -d -m 0755 $(DESTDIR)$(INCDIR)
+ $(INSTALL) -d -m 0755 $(DESTDIR)$(LIBDIR)
+ $(INSTALL) -d -m 0755 $(DESTDIR)$(LIBDIR)/pkgconfig
# runtime
ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),)
$(STRIP) -x lib/$(LIB.SHARED)
$(INSTALL) -m 0644 lib/$(LIB.SHARED) $(BINDIR)/
else
- $(STRIP) -x lib/$(LIB.SHARED)
- $(INSTALL) -m 0644 lib/$(LIB.SHARED) $(LIBDIR)/
- $(LN) $(LIB.SHARED) $(LIBDIR)/$(LIB.SONAME)
+ $(INSTALL) -m 0644 lib/$(LIB.SHARED) $(DESTDIR)$(LIBDIR)/
+ $(LN) $(LIB.SHARED) $(DESTDIR)$(LIBDIR)/$(LIB.SONAME)
endif
# development files
- $(INSTALL) -m 0644 include/GL/wglew.h $(INCDIR)/
- $(INSTALL) -m 0644 include/GL/glew.h $(INCDIR)/
- $(INSTALL) -m 0644 include/GL/glxew.h $(INCDIR)/
- $(INSTALL) -m 0644 glew.pc $(LIBDIR)/pkgconfig/
+ $(INSTALL) -m 0644 include/GL/wglew.h $(DESTDIR)$(INCDIR)/
+ $(INSTALL) -m 0644 include/GL/glew.h $(DESTDIR)$(INCDIR)/
+ $(INSTALL) -m 0644 include/GL/glxew.h $(DESTDIR)$(INCDIR)/
+ $(INSTALL) -m 0644 glew.pc $(DESTDIR)$(LIBDIR)/pkgconfig/
ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),)
$(INSTALL) -m 0644 lib/$(LIB.DEVLNK) $(LIBDIR)/
else
- $(STRIP) -x lib/$(LIB.STATIC)
- $(INSTALL) -m 0644 lib/$(LIB.STATIC) $(LIBDIR)/
- $(LN) $(LIB.SHARED) $(LIBDIR)/$(LIB.DEVLNK)
+ $(INSTALL) -m 0644 lib/$(LIB.STATIC) $(DESTDIR)$(LIBDIR)/
+ $(LN) $(LIB.SHARED) $(DESTDIR)$(LIBDIR)/$(LIB.DEVLNK)
endif
# utilities
- $(INSTALL) -s -m 0755 bin/$(GLEWINFO.BIN) bin/$(VISUALINFO.BIN) $(BINDIR)/
+ $(INSTALL) -s -m 0755 bin/$(GLEWINFO.BIN) bin/$(VISUALINFO.BIN) $(DESTDIR)$(BINDIR)/
uninstall:
$(RM) $(INCDIR)/wglew.h
|