1 Various makefile fixes to allow cross compilation
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
14 -INSTALL_FILE = install -p -o root -g root -m 644
15 -INSTALL_DIR = install -p -o root -g root -d
18 +INSTALL_FILE = $(INSTALL) -m 644
19 +INSTALL_DIR = $(INSTALL) -d
22 CFLAGS += -c -O2 -Wall
28 - $(CC) $(CFLAGS) $< -o $@
29 + $(CC) $(CFLAGS) -c -fPIC $< -o $@
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
40 $(INSTALL_DIR) $(DESTDIR)/$(INCLUDEDIR)