python-pyasn: bump to version 1.6.0b1
[buildroot-gz.git] / package / libsoil / 0001-fix-makefile.patch
blob310d26448b617626f70635da723c054ebced6402
1 Various makefile fixes to allow cross compilation
3 Partly ported from
4 http://anonscm.debian.org/cgit/pkg-games/libsoil.git/tree/debian/patches/linking_correctly.patch
6 Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
8 diff -uNr soil.org/projects/makefile/alternate_Makefile.txt soil/projects/makefile/alternate_Makefile.txt
9 --- soil.org/projects/makefile/alternate_Makefile.txt 2008-07-07 18:13:28.000000000 +0200
10 +++ soil/projects/makefile/alternate_Makefile.txt 2015-11-07 11:15:04.140106336 +0100
11 @@ -1,8 +1,8 @@
12 MAKE = make
13 -CC = gcc
14 -INSTALL_FILE = install -p -o root -g root -m 644
15 -INSTALL_DIR = install -p -o root -g root -d
16 -LN = ln -s
17 +CC = $(GCC)
18 +INSTALL_FILE = $(INSTALL) -m 644
19 +INSTALL_DIR = $(INSTALL) -d
20 +LN = ln -sf
21 RM = rm -fv
22 CFLAGS += -c -O2 -Wall
23 LDFLAGS +=
24 @@ -23,13 +23,13 @@
25 all: $(OFILES) lib
27 %.o: %.c
28 - $(CC) $(CFLAGS) $< -o $@
29 + $(CC) $(CFLAGS) -c -fPIC $< -o $@
31 lib: $(OFILES)
32 # create static library
33 - ar -cvq $(LIBNAME).a $(OFILES)
34 + $(AR) -cvq $(LIBNAME).a $(OFILES)
35 # create shared library
36 - gcc -shared -Wl,-soname,$(LIBNAME).so.$(MAJOR) -o $(LIBNAME).so.$(VERSION) $(OFILES)
37 + $(CC) -shared -Wl,-soname,$(LIBNAME).so.$(MAJOR) -o $(LIBNAME).so.$(VERSION) $(OFILES) -lGL -lm
39 install:
40 $(INSTALL_DIR) $(DESTDIR)/$(INCLUDEDIR)