elftosb: support static linking
[openwrt/staging/wigyori.git] / tools / elftosb / patches / 003-use-ldflags.patch
1 --- a/makefile.rules
2 +++ b/makefile.rules
3 @@ -131,19 +131,20 @@ exec_always:
4 @echo "LIBS = ${LIBS}"
5 @echo "EXEC_FILE = ${EXEC_FILE}"
6 @echo "BUILD_DIR = ${BUILD_DIR}"
7 + @echo "LDFLAGS = ${LDFLAGS}"
8
9 clean:
10 rm -f ${OBJ_FILES_ELFTOSB2} ${OBJ_FILES_SBTOOL} ${OBJ_FILES_KEYGEN} \
11 ${EXEC_FILE_ELFTOSB2} ${EXEC_FILE_SBTOOL} ${EXEC_FILE_KEYGEN}
12
13 elftosb: ${OBJ_FILES_ELFTOSB2}
14 - gcc ${OBJ_FILES_ELFTOSB2} ${LIBS} -o ${EXEC_FILE_ELFTOSB2}
15 + gcc ${OBJ_FILES_ELFTOSB2} ${LIBS} ${LDFLAGS} -o ${EXEC_FILE_ELFTOSB2}
16
17 sbtool: ${OBJ_FILES_SBTOOL}
18 - gcc ${OBJ_FILES_SBTOOL} ${LIBS} -o ${EXEC_FILE_SBTOOL}
19 + gcc ${OBJ_FILES_SBTOOL} ${LIBS} ${LDFLAGS} -o ${EXEC_FILE_SBTOOL}
20
21 keygen: ${OBJ_FILES_KEYGEN}
22 - gcc ${OBJ_FILES_KEYGEN} ${LIBS} -o ${EXEC_FILE_KEYGEN}
23 + gcc ${OBJ_FILES_KEYGEN} ${LIBS} ${LDFLAGS} -o ${EXEC_FILE_KEYGEN}
24
25
26 #ifeq ("${UNAMES}", "Linux")