Fix 2004/vik2 for Linux
Unfortunately this fix required heavy modification to the original file and inclusion of a file that was once generated by the Makefile but now it works for both macOS and Linux. It unfortunately will generate a lot of warnings in Linux (or at least some - in Rocky Linux and Fedora Linux it generates a lot of warnings about GCC extensions and with clang it also generates warning(s?) about reserved keywords for a total of 45131 (!!) warnings) but still it now works with Linux and macOS (clean compilation). See the thanks-for-fixes.md file for example warnings and what this fix entailed.
This commit is contained in:
1 parent
04ffb70221
commit
a836f887eb
5 files changed
+2628
-1027
No files matched your search
@@ -1,6 +1,4 @@
|
||||
cat-killing-curiosity
|
||||
vik2
|
||||
vik2_1.c
|
||||
vik2_2.c
|
||||
vik2.possible.cat.death_1.c
|
||||
vik2.possible.cat.death_2.c
|
||||
+5
-10
@@ -38,7 +38,7 @@ include ../../var.mk
|
||||
|
||||
# Common C compiler warnings to silence
|
||||
#
|
||||
CSILENCE= -Wno-strict-prototypes
|
||||
CSILENCE= -Wno-strict-prototypes -Wno-implicit-function-declaration
|
||||
|
||||
# Common C compiler warning flags
|
||||
#
|
||||
@@ -127,11 +127,7 @@ all: data ${TARGET}
|
||||
supernova deep_magic magic charon pluto
|
||||
|
||||
${PROG}: ${PROG}.c
|
||||
${RM} -f ${PROG}_1.c
|
||||
${CC} -E '-DSTOP=_5' '-DFNAME="${PROG}_1.c"' ${PROG}.c > ${PROG}_1.c
|
||||
${RM} -f ${PROG}_2.c
|
||||
${CC} -E ${PROG}_1.c > ${PROG}_2.c
|
||||
${CC} ${CFLAGS} ${PROG}_2.c -o ${PROG}
|
||||
${CC} ${CFLAGS} -DFNAME='"${PROG}.c"' '-DSTOP=_5' ${PROG}.c -o ${PROG}
|
||||
|
||||
# alternative executable
|
||||
#
|
||||
@@ -153,12 +149,12 @@ everything: all alt
|
||||
# On some systems such as Linux, this source either fails
|
||||
# to finish compiling or takes a super-long time generating
|
||||
# a huge number of compiler errors. As such, we do not
|
||||
# recommend compiling this code. However for some the
|
||||
# recommend compiling this code. However for ailurophiles the
|
||||
# curiosity factor, even though it may have the effect of:
|
||||
#
|
||||
# kill -9 cat
|
||||
#
|
||||
# may too strong for some not try to compile the original
|
||||
# may be too strong to not try and compile the original
|
||||
# vik2 source code. Therefore we offer this special
|
||||
# Makefile rule for those who do not wish curtail their curiosity.
|
||||
#
|
||||
@@ -184,14 +180,13 @@ clean:
|
||||
${RM} -f indent.c; \
|
||||
fi
|
||||
vik2_clean:
|
||||
${RM} -f vik2_1.c vik2_2.c vik2.o
|
||||
${RM} -f vik2.o
|
||||
|
||||
vik2_clobber: vik2_clean
|
||||
${RM} -f vik2
|
||||
|
||||
clobber: clean
|
||||
${RM} -f ${TARGET} ${ALT_TARGET}
|
||||
${RM} -f ${PROG}_1.c ${PROG}_2.c
|
||||
${RM} -f ${PROG}.possible.cat.death_1.c ${PROG}.possible.cat.death_2.c cat-killing-curiosity
|
||||
@-if [ -e sandwich ]; then \
|
||||
${RM} -f sandwich; \
|
||||
|
||||
+995
-1014
File diff suppressed because it is too large.
Load diff
+1555
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user