Browse Source

Enable LDFLAGS flag override

In case of the project cross-compilation, dependent libraries
(libcrypt) are located outside of the default library locations.
pull/124/head
Oleksii Bidnichenko 3 years ago
parent
commit
25eb50e9cb
10 changed files with 10 additions and 9 deletions
  1. +1
    -1
      examples/Gertboard/Makefile
  2. +1
    -1
      examples/Makefile
  3. +1
    -1
      examples/PiFace/Makefile
  4. +1
    -1
      examples/PiGlow/Makefile
  5. +1
    -1
      examples/q2w/Makefile
  6. +1
    -1
      examples/scrollPhat/Makefile
  7. BIN
      gpio/.Makefile.swp
  8. +1
    -1
      gpio/Makefile
  9. +2
    -1
      wiringPi/Makefile
  10. +1
    -1
      wiringPiD/Makefile

+ 1
- 1
examples/Gertboard/Makefile View File

@@ -15,7 +15,7 @@ CC ?= gcc
INCLUDE = -I/usr/local/include
CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe $(EXTRA_CFLAGS)

LDFLAGS = -L/usr/local/lib
LDFLAGS ?= -L/usr/local/lib
LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm

# Should not alter anything below this line


+ 1
- 1
examples/Makefile View File

@@ -32,7 +32,7 @@ CC ?= gcc
INCLUDE = -I/usr/local/include
CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe $(EXTRA_CFLAGS)

LDFLAGS = -L/usr/local/lib
LDFLAGS ?= -L/usr/local/lib
LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm -lcrypt -lrt

# Should not alter anything below this line


+ 1
- 1
examples/PiFace/Makefile View File

@@ -32,7 +32,7 @@ CC ?= gcc
INCLUDE = -I/usr/local/include
CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe $(EXTRA_CFLAGS)

LDFLAGS = -L/usr/local/lib
LDFLAGS ?= -L/usr/local/lib
LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm

# Should not alter anything below this line


+ 1
- 1
examples/PiGlow/Makefile View File

@@ -32,7 +32,7 @@ CC ?= gcc
INCLUDE = -I/usr/local/include
CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe $(EXTRA_CFLAGS)

LDFLAGS = -L/usr/local/lib
LDFLAGS ?= -L/usr/local/lib
LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm

# Should not alter anything below this line


+ 1
- 1
examples/q2w/Makefile View File

@@ -32,7 +32,7 @@ CC ?= gcc
INCLUDE = -I/usr/local/include
CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe $(EXTRA_CFLAGS)

LDFLAGS = -L/usr/local/lib
LDFLAGS ?= -L/usr/local/lib
LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm

###############################################################################


+ 1
- 1
examples/scrollPhat/Makefile View File

@@ -32,7 +32,7 @@ CC ?= gcc
INCLUDE = -I/usr/local/include
CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe $(EXTRA_CFLAGS)

LDFLAGS = -L/usr/local/lib
LDFLAGS ?= -L/usr/local/lib
LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm

# Should not alter anything below this line


BIN
gpio/.Makefile.swp View File


+ 1
- 1
gpio/Makefile View File

@@ -36,7 +36,7 @@ CC ?= gcc
INCLUDE = -I$(DESTDIR)$(PREFIX)/include
CFLAGS = $(DEBUG) -Wall -Wextra $(INCLUDE) -Winline -pipe $(EXTRA_CFLAGS)

LDFLAGS = -L$(DESTDIR)$(PREFIX)/lib
LDFLAGS ?= -L$(DESTDIR)$(PREFIX)/lib
LIBS = -lwiringPi -lwiringPiDev -lpthread -lrt -lm -lcrypt

# May not need to alter anything below this line


+ 2
- 1
wiringPi/Makefile View File

@@ -42,6 +42,7 @@ DEFS = -D_GNU_SOURCE
CFLAGS = $(DEBUG) $(DEFS) -Wformat=2 -Wall -Wextra -Winline $(INCLUDE) -pipe -fPIC $(EXTRA_CFLAGS)
#CFLAGS = $(DEBUG) $(DEFS) -Wformat=2 -Wall -Wextra -Wconversion -Winline $(INCLUDE) -pipe -fPIC

LDFLAGS ?= -L/usr/local/lib
LIBS = -lm -lpthread -lrt -lcrypt

###############################################################################
@@ -75,7 +76,7 @@ static:

$(DYNAMIC): $(OBJ)
$Q echo "[Link (Dynamic)]"
$Q $(CC) -shared -Wl,-soname,libwiringPi.so$(WIRINGPI_SONAME_SUFFIX) -o libwiringPi.so.$(VERSION) $(OBJ) $(LIBS)
$Q $(CC) -shared -Wl,-soname,libwiringPi.so$(WIRINGPI_SONAME_SUFFIX) -o libwiringPi.so.$(VERSION) $(OBJ) $(LDFLAGS) $(LIBS)

.c.o:
$Q echo [Compile] $<


+ 1
- 1
wiringPiD/Makefile View File

@@ -35,7 +35,7 @@ CC ?= gcc
INCLUDE = -I$(DESTDIR)$(PREFIX)/include
CFLAGS = $(DEBUG) -Wall -Wextra $(INCLUDE) -Winline -pipe $(EXTRA_CFLAGS)

LDFLAGS = -L$(DESTDIR)$(PREFIX)/lib
LDFLAGS ?= -L$(DESTDIR)$(PREFIX)/lib
LIBS = -lwiringPi -lwiringPiDev -lpthread -lrt -lm -lcrypt

# May not need to alter anything below this line


Loading…
Cancel
Save