Various makefile fixes to allow cross compilation
http://anonscm.debian.org/cgit/pkg-games/libsoil.git/tree/debian/patches/linking_correctly.patch
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
diff -uNr soil.org/projects/makefile/alternate_Makefile.txt soil/projects/makefile/alternate_Makefile.txt
--- soil.org/projects/makefile/alternate_Makefile.txt 2008-07-07 18:13:28.000000000 +0200
+++ soil/projects/makefile/alternate_Makefile.txt 2015-11-07 11:15:04.140106336 +0100
-INSTALL_FILE = install -p -o root -g root -m 644
-INSTALL_DIR = install -p -o root -g root -d
+INSTALL_FILE = $(INSTALL) -m 644
+INSTALL_DIR = $(INSTALL) -d
- $(CC) $(CFLAGS) $< -o $@
+ $(CC) $(CFLAGS) -c -fPIC $< -o $@
- ar -cvq $(LIBNAME).a $(OFILES)
+ $(AR) -cvq $(LIBNAME).a $(OFILES)
- gcc -shared -Wl,-soname,$(LIBNAME).so.$(MAJOR) -o $(LIBNAME).so.$(VERSION) $(OFILES)
+ $(CC) -shared -Wl,-soname,$(LIBNAME).so.$(MAJOR) -o $(LIBNAME).so.$(VERSION) $(OFILES) -lGL -lm
$(INSTALL_DIR) $(DESTDIR)/$(INCLUDEDIR)