In case of the project cross-compilation, dependent libraries (libcrypt) are located outside of the default library locations.pull/124/head
@@ -15,7 +15,7 @@ CC ?= gcc | |||||
INCLUDE = -I/usr/local/include | INCLUDE = -I/usr/local/include | ||||
CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe $(EXTRA_CFLAGS) | CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe $(EXTRA_CFLAGS) | ||||
LDFLAGS = -L/usr/local/lib | |||||
LDFLAGS ?= -L/usr/local/lib | |||||
LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm | LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm | ||||
# Should not alter anything below this line | # Should not alter anything below this line | ||||
@@ -32,7 +32,7 @@ CC ?= gcc | |||||
INCLUDE = -I/usr/local/include | INCLUDE = -I/usr/local/include | ||||
CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe $(EXTRA_CFLAGS) | 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 | LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm -lcrypt -lrt | ||||
# Should not alter anything below this line | # Should not alter anything below this line | ||||
@@ -32,7 +32,7 @@ CC ?= gcc | |||||
INCLUDE = -I/usr/local/include | INCLUDE = -I/usr/local/include | ||||
CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe $(EXTRA_CFLAGS) | CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe $(EXTRA_CFLAGS) | ||||
LDFLAGS = -L/usr/local/lib | |||||
LDFLAGS ?= -L/usr/local/lib | |||||
LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm | LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm | ||||
# Should not alter anything below this line | # Should not alter anything below this line | ||||
@@ -32,7 +32,7 @@ CC ?= gcc | |||||
INCLUDE = -I/usr/local/include | INCLUDE = -I/usr/local/include | ||||
CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe $(EXTRA_CFLAGS) | CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe $(EXTRA_CFLAGS) | ||||
LDFLAGS = -L/usr/local/lib | |||||
LDFLAGS ?= -L/usr/local/lib | |||||
LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm | LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm | ||||
# Should not alter anything below this line | # Should not alter anything below this line | ||||
@@ -32,7 +32,7 @@ CC ?= gcc | |||||
INCLUDE = -I/usr/local/include | INCLUDE = -I/usr/local/include | ||||
CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe $(EXTRA_CFLAGS) | CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe $(EXTRA_CFLAGS) | ||||
LDFLAGS = -L/usr/local/lib | |||||
LDFLAGS ?= -L/usr/local/lib | |||||
LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm | LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm | ||||
############################################################################### | ############################################################################### | ||||
@@ -32,7 +32,7 @@ CC ?= gcc | |||||
INCLUDE = -I/usr/local/include | INCLUDE = -I/usr/local/include | ||||
CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe $(EXTRA_CFLAGS) | CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe $(EXTRA_CFLAGS) | ||||
LDFLAGS = -L/usr/local/lib | |||||
LDFLAGS ?= -L/usr/local/lib | |||||
LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm | LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm | ||||
# Should not alter anything below this line | # Should not alter anything below this line | ||||
@@ -36,7 +36,7 @@ CC ?= gcc | |||||
INCLUDE = -I$(DESTDIR)$(PREFIX)/include | INCLUDE = -I$(DESTDIR)$(PREFIX)/include | ||||
CFLAGS = $(DEBUG) -Wall -Wextra $(INCLUDE) -Winline -pipe $(EXTRA_CFLAGS) | 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 | LIBS = -lwiringPi -lwiringPiDev -lpthread -lrt -lm -lcrypt | ||||
# May not need to alter anything below this line | # May not need to alter anything below this line | ||||
@@ -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 -Winline $(INCLUDE) -pipe -fPIC $(EXTRA_CFLAGS) | ||||
#CFLAGS = $(DEBUG) $(DEFS) -Wformat=2 -Wall -Wextra -Wconversion -Winline $(INCLUDE) -pipe -fPIC | #CFLAGS = $(DEBUG) $(DEFS) -Wformat=2 -Wall -Wextra -Wconversion -Winline $(INCLUDE) -pipe -fPIC | ||||
LDFLAGS ?= -L/usr/local/lib | |||||
LIBS = -lm -lpthread -lrt -lcrypt | LIBS = -lm -lpthread -lrt -lcrypt | ||||
############################################################################### | ############################################################################### | ||||
@@ -75,7 +76,7 @@ static: | |||||
$(DYNAMIC): $(OBJ) | $(DYNAMIC): $(OBJ) | ||||
$Q echo "[Link (Dynamic)]" | $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: | .c.o: | ||||
$Q echo [Compile] $< | $Q echo [Compile] $< | ||||
@@ -35,7 +35,7 @@ CC ?= gcc | |||||
INCLUDE = -I$(DESTDIR)$(PREFIX)/include | INCLUDE = -I$(DESTDIR)$(PREFIX)/include | ||||
CFLAGS = $(DEBUG) -Wall -Wextra $(INCLUDE) -Winline -pipe $(EXTRA_CFLAGS) | 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 | LIBS = -lwiringPi -lwiringPiDev -lpthread -lrt -lm -lcrypt | ||||
# May not need to alter anything below this line | # May not need to alter anything below this line | ||||