Change LIBS to LDFLAGS in Makefiles
This is to make it more standard which further allows one to run make on some other source code, say because they want to try and fix an entry but forget to update the Makefile. Or if they're the author they can not worry about it in some cases. But since LDFLAGS is the standard way it seems better to have the LIBS variable in the Makefile be LDFLAGS. Maybe there is a reason to not have this and I'm happy to close this in that case but it does seem better this way so I'm doing this commit.
This commit is contained in:
1 parent
19f3263d8e
commit
1d86daf19a
321 files changed
+801
-801
No files matched your search
@@ -76,7 +76,7 @@ CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}
|
||||
|
||||
# Libraries needed to build
|
||||
#
|
||||
LIBS=
|
||||
LDFLAGS=
|
||||
|
||||
# C compiler to use
|
||||
#
|
||||
@@ -132,7 +132,7 @@ all: data ${TARGET}
|
||||
|
||||
${PROG}: ${PROG}.c
|
||||
@echo "NOTE: This entry uses non-standard args to main() that do not work with some modern compilers."
|
||||
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}
|
||||
|
||||
# alternative executable
|
||||
#
|
||||
@@ -141,22 +141,22 @@ alt: data ${ALT_TARGET}
|
||||
|
||||
ver0: ${PROG}
|
||||
-./${PROG} < westley.c > ver0.c
|
||||
-${CC} ${CFLAGS} ver0.c -o $@ ${LIBS}
|
||||
-${CC} ${CFLAGS} ver0.c -o $@ ${LDFLAGS}
|
||||
|
||||
ver1: ${PROG}
|
||||
-./${PROG} 1 < westley.c > ver1.c
|
||||
@echo "** NOTE: this version will not compile with clang **"
|
||||
-${CC} ${CFLAGS} ver1.c -o $@ ${LIBS}
|
||||
-${CC} ${CFLAGS} ver1.c -o $@ ${LDFLAGS}
|
||||
|
||||
ver2: ${PROG}
|
||||
-./${PROG} 1 2 < westley.c > ver2.c
|
||||
@echo "** NOTE: this version will not compile with clang **"
|
||||
-${CC} ${CFLAGS} ver2.c -o $@ ${LIBS}
|
||||
-${CC} ${CFLAGS} ver2.c -o $@ ${LDFLAGS}
|
||||
|
||||
ver3: ${PROG}
|
||||
-./${PROG} 1 2 3 < westley.c > ver3.c
|
||||
@echo "** NOTE: this version will not compile with clang **"
|
||||
-${CC} ${CFLAGS} ver3.c -o $@ ${LIBS}
|
||||
-${CC} ${CFLAGS} ver3.c -o $@ ${LDFLAGS}
|
||||
|
||||
# data files
|
||||
#
|
||||
|
||||
Reference in new issue
Block a user