Skip to content

Commit

Permalink
Change LIBS to LDFLAGS in Makefiles
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
xexyl committed Jul 10, 2023
1 parent 19f3263 commit 1d86daf
Show file tree
Hide file tree
Showing 321 changed files with 801 additions and 801 deletions.
6 changes: 3 additions & 3 deletions 1984/anonymous/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}

# Libraries needed to build
#
LIBS=
LDFLAGS=

# C compiler to use
#
Expand Down Expand Up @@ -131,7 +131,7 @@ all: data ${TARGET}
supernova deep_magic magic charon pluto

${PROG}: ${PROG}.c
${CC} ${CFLAGS} $< -o $@ ${LIBS}
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}

# alternative executable
#
Expand All @@ -140,7 +140,7 @@ alt: data ${ALT_TARGET}

${ALT_TARGET}: ${PROG}.alt.c
@echo "** NOTE: this version might not work on some systems **"
${CC} ${CFLAGS} $< -o $@ ${LIBS}
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}
@echo "** NOTE: this version might not work on some systems **"

# data files
Expand Down
6 changes: 3 additions & 3 deletions 1984/decot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}

# Libraries needed to build
#
LIBS= -lm
LDFLAGS= -lm

# C compiler to use
#
Expand Down Expand Up @@ -134,7 +134,7 @@ all: data ${TARGET}
supernova deep_magic magic charon pluto

${PROG}: ${PROG}.c
${CC} ${CFLAGS} $< -o $@ ${LIBS}
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}
@echo "NOTE: this program prints out a string of garbage."

# alternative executable
Expand All @@ -144,7 +144,7 @@ alt: data ${ALT_TARGET}


${PROG}.alt: ${PROG}.alt.c
${CC} ${CFLAGS} -traditional-cpp $< -o $@ ${LIBS}
${CC} ${CFLAGS} -traditional-cpp $< -o $@ ${LDFLAGS}
# data files
#
data: ${DATA}
Expand Down
4 changes: 2 additions & 2 deletions 1984/laman/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}

# Libraries needed to build
#
LIBS=
LDFLAGS=

# C compiler to use
#
Expand Down Expand Up @@ -130,7 +130,7 @@ all: data ${TARGET}

${PROG}: ${PROG}.c
@echo "NOTE: this entry will likely crash or do something else without an arg."
${CC} ${CFLAGS} $< -o $@ ${LIBS}
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}

# alternative executable
#
Expand Down
8 changes: 4 additions & 4 deletions 1984/mullender/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}

# Libraries needed to build
#
LIBS=
LDFLAGS=

# C compiler to use
#
Expand Down Expand Up @@ -130,10 +130,10 @@ all: data ${TARGET}
${PROG}: ${PROG}.c
@echo "NOTE: This entry is likely to fail and/or dump core on any computer other"
@echo "than a Vax-11 or pdp-11."
${CC} ${CFLAGS} $< -o $@ ${LIBS}
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}

gentab: gentab.c
${CC} ${CFLAGS} $< -o $@ ${LIBS}
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}


# alternative executable
Expand All @@ -142,7 +142,7 @@ alt: data ${ALT_TARGET}
@${TRUE}

${ALT_TARGET}: ${PROG}.alt.c
${CC} -include stdio.h -include unistd.h -include stdlib.h ${CFLAGS} $< -o $@ ${LIBS}
${CC} -include stdio.h -include unistd.h -include stdlib.h ${CFLAGS} $< -o $@ ${LDFLAGS}

# data files
#
Expand Down
4 changes: 2 additions & 2 deletions 1985/applin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}

# Libraries needed to build
#
LIBS=
LDFLAGS=

# C compiler to use
#
Expand Down Expand Up @@ -129,7 +129,7 @@ all: data ${TARGET}

${PROG}: ${PROG}.c
@echo "NOTE: this does not work properly in macOS."
${CC} ${CFLAGS} $< -o $@ ${LIBS}
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}

# alternative executable
#
Expand Down
4 changes: 2 additions & 2 deletions 1985/august/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}

# Libraries needed to build
#
LIBS=
LDFLAGS=

# C compiler to use
#
Expand Down Expand Up @@ -129,7 +129,7 @@ all: data ${TARGET}
supernova deep_magic magic charon pluto

${PROG}: ${PROG}.c
${CC} ${CFLAGS} $< -o $@ ${LIBS}
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}

# alternative executable
#
Expand Down
4 changes: 2 additions & 2 deletions 1985/lycklama/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}

# Libraries needed to build
#
LIBS=
LDFLAGS=

# C compiler to use
#
Expand Down Expand Up @@ -129,7 +129,7 @@ all: data ${TARGET}
supernova deep_magic magic charon pluto

${PROG}: ${PROG}.c
${CC} ${CFLAGS} $< -o $@ ${LIBS}
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}

# alternative executable
#
Expand Down
6 changes: 3 additions & 3 deletions 1985/shapiro/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}

# Libraries needed to build
#
LIBS=
LDFLAGS=

# C compiler to use
#
Expand Down Expand Up @@ -128,15 +128,15 @@ all: data ${TARGET}
supernova deep_magic magic charon pluto

${PROG}: ${PROG}.c
${CC} ${CFLAGS} $< -o $@ ${LIBS}
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}

# alternative executable
#
alt: data ${ALT_TARGET}
@${TRUE}

${PROG}.alt: ${PROG}.alt.c
${CC} ${CFLAGS} $< -o $@ ${LIBS}
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}

# data files
#
Expand Down
6 changes: 3 additions & 3 deletions 1985/sicherman/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}

# Libraries needed to build
#
LIBS=
LDFLAGS=

# C compiler to use
#
Expand Down Expand Up @@ -129,12 +129,12 @@ all: data ${TARGET}
supernova deep_magic magic charon pluto

${PROG}: ${PROG}.c
${CC} ${CFLAGS} $< -o $@ ${LIBS}
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}

# alternative executable
#
alt: ${PROG}.alt.c
${CC} ${CFLAGS} -traditional-cpp $< -o $@ ${LIBS}
${CC} ${CFLAGS} -traditional-cpp $< -o $@ ${LDFLAGS}

# data files
#
Expand Down
4 changes: 2 additions & 2 deletions 1986/applin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}

# Libraries needed to build
#
LIBS=
LDFLAGS=

# C compiler to use
#
Expand Down Expand Up @@ -130,7 +130,7 @@ all: data ${TARGET}
supernova deep_magic magic charon pluto

${PROG}: ${PROG}.c
${CC} ${CFLAGS} $< -o $@ ${LIBS}
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}

# alternative executable
#
Expand Down
4 changes: 2 additions & 2 deletions 1986/august/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}

# Libraries needed to build
#
LIBS=
LDFLAGS=

# C compiler to use
#
Expand Down Expand Up @@ -131,7 +131,7 @@ all: data ${TARGET}

${PROG}: ${PROG}.c
@echo "NOTE: this entry is very likely to dump core after its output."
${CC} ${CFLAGS} $< -o $@ ${LIBS}
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}

# alternative executable
#
Expand Down
4 changes: 2 additions & 2 deletions 1986/bright/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}

# Libraries needed to build
#
LIBS=
LDFLAGS=

# C compiler to use
#
Expand Down Expand Up @@ -132,7 +132,7 @@ all: data ${TARGET}
supernova deep_magic magic charon pluto

${PROG}: ${PROG}.c
${CC} ${CFLAGS} $< -o $@ ${LIBS}
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}

# alternative executable
#
Expand Down
4 changes: 2 additions & 2 deletions 1986/hague/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}

# Libraries needed to build
#
LIBS=
LDFLAGS=

# C compiler to use
#
Expand Down Expand Up @@ -132,7 +132,7 @@ all: data ${TARGET}
${PROG}: ${PROG}.c
@echo "NOTE: this entry uses gets() so you might get a warning about this"
@echo " when compiling and running this program with some systems."
${CC} ${CFLAGS} $< -o $@ ${LIBS}
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}

# alternative executable
#
Expand Down
4 changes: 2 additions & 2 deletions 1986/holloway/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}

# Libraries needed to build
#
LIBS=
LDFLAGS=

# C compiler to use
#
Expand Down Expand Up @@ -130,7 +130,7 @@ all: data ${TARGET}
supernova deep_magic magic charon pluto

${PROG}: ${PROG}.c
${CC} ${CFLAGS} $< -o $@ ${LIBS}
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}

# alternative executable
#
Expand Down
4 changes: 2 additions & 2 deletions 1986/marshall/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}

# Libraries needed to build
#
LIBS=
LDFLAGS=

# C compiler to use
#
Expand Down Expand Up @@ -132,7 +132,7 @@ all: data ${TARGET}
supernova deep_magic magic charon pluto

${PROG}: ${PROG}.c
${CC} ${CFLAGS} $< -o $@ ${LIBS}
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}

# alternative executable
#
Expand Down
4 changes: 2 additions & 2 deletions 1986/pawka/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}

# Libraries needed to build
#
LIBS=
LDFLAGS=

# C compiler to use
#
Expand Down Expand Up @@ -127,7 +127,7 @@ all: data ${TARGET}
supernova deep_magic magic charon pluto

${PROG}: ${PROG}.c
${CC} ${CFLAGS} $< -o $@ ${LIBS}
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}

# alternative executable
#
Expand Down
4 changes: 2 additions & 2 deletions 1986/stein/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}

# Libraries needed to build
#
LIBS=
LDFLAGS=

# C compiler to use
#
Expand Down Expand Up @@ -129,7 +129,7 @@ all: data ${TARGET}
supernova deep_magic magic charon pluto

${PROG}: ${PROG}.c
${CC} ${CFLAGS} $< -o $@ ${LIBS}
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}
-${RM} -f a.out
-${LN} $@ a.out

Expand Down
4 changes: 2 additions & 2 deletions 1986/wall/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}

# Libraries needed to build
#
LIBS=
LDFLAGS=

# C compiler to use
#
Expand Down Expand Up @@ -132,7 +132,7 @@ all: data ${TARGET}
supernova deep_magic magic charon pluto

${PROG}: ${PROG}.c
${CC} ${CFLAGS} $< -o $@ ${LIBS}
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}

# alternative executable
#
Expand Down
4 changes: 2 additions & 2 deletions 1987/biggar/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}

# Libraries needed to build
#
LIBS=
LDFLAGS=

# C compiler to use
#
Expand Down Expand Up @@ -130,7 +130,7 @@ all: data ${TARGET}
${PROG}: ${PROG}.c
${CC} ${CFLAGS} -DC="R>0" -DI="if(T)O" -DO="c=write(1,&c,1);" \
-DP="main(){X}" -DR="read(0,&c,1)" -DT="c!=015" \
-DW="while(C)I" -DX="char c;W" $< -o $@ ${LIBS}
-DW="while(C)I" -DX="char c;W" $< -o $@ ${LDFLAGS}

# alternative executable
#
Expand Down
Loading

0 comments on commit 1d86daf

Please sign in to comment.