Change how 1985/sicherman alt code is managed
Removed the original sicherman.alt.c (which was the original code that requires -traditional-cpp or an older compiler) and make sicherman.alt2.c it instead which is a slight modification of sicherman.c: it has two args to main() in case some compilers (like clang) eventually object to having one arg (like it does for 4 args and claims it does for 1 even though it does not). Since the sicherman.alt.c is built automatically if compilation fails in the sicherman rule it will compile to sicherman. However if it is built manually like 'make alt' then it's built as sicherman.alt. This makes it easier to use but also allows one to build the alt version should they wish and not have it overwrite sicherman. The try.alt.sh script was added in the case of manual compilation of sicherman.alt.c.
This commit is contained in:
1 parent
5292717f04
commit
8ad90e157e
6 files changed
+77
-61
No files matched your search
@@ -132,18 +132,15 @@ all: data ${TARGET}
|
||||
clean clobber install love haste waste maker easter_egg \
|
||||
sandwich supernova deep_magic magic charon pluto
|
||||
|
||||
${PROG}: ${PROG}.c ${PROG}.alt2.c
|
||||
${PROG}: ${PROG}.c ${PROG}.alt.c
|
||||
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS} || \
|
||||
${CC} ${CFLAGS} ${PROG}.alt2.c -o $@ ${LDFLAGS}
|
||||
${CC} ${CFLAGS} ${PROG}.alt.c -o $@ ${LDFLAGS}
|
||||
|
||||
# alternative executable
|
||||
#
|
||||
alt: data ${ALT_TARGET}
|
||||
@${TRUE}
|
||||
|
||||
${PROG}.alt: ${PROG}.alt.c
|
||||
${CC} ${CFLAGS} -traditional-cpp $< -o $@ ${LDFLAGS}
|
||||
|
||||
# data files
|
||||
#
|
||||
data: ${DATA}
|
||||
|
||||
Reference in new issue
Block a user