• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/libsoil/0001-fix-makefile.patch
Ricardo MartincoskiRicardo Martincoski committed 8461906db4e24 Jan 2016
Raw file
Source viewDiff to previous
xxxxxxxxxx
 
1
Various makefile fixes to allow cross compilation
2
​
3
Partly ported from
4
http://anonscm.debian.org/cgit/pkg-games/libsoil.git/tree/debian/patches/linking_correctly.patch
5
​
6
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
7
​
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
26
 
27
 %.o: %.c
28
-   $(CC) $(CFLAGS) $< -o $@
29
+   $(CC) $(CFLAGS) -c -fPIC $< -o $@
30
 
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
38
 
39
 install:
40
    $(INSTALL_DIR) $(DESTDIR)/$(INCLUDEDIR)
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.