Improve how 1986/wall alt code is built
Add explicit rule to compile alt code and update CFLAGS to include (if
CC is gcc) -traditional-cpp. Clang does not support it. If CC is cc it
might support it depending on the system (macOS gcc is actually clang so
it won't but linux it will). This allows just running instead of:
make CFLAGS+="-traditional-cpp" alt
to do:
make CC=gcc alt
but still allowing for the former which might be necessary if CC is not
defined to be gcc.
The README.md points out that in macOS gcc is clang.
Improve the command (in the thanks file) of how to see the difference
between the -traditional-cpp version and the fixed version so that it
doesn't need git but rather just diff (as git diff is unnecessary here).
Note that there is discussion about new make rules that will make this
type of thing not needed so the thanks file would be updated at this
point for that to just refer to the FAQ (or not say anything about it at
all).
This commit is contained in:
1 parent
8f20693d56
commit
b26aaccd08
3 files changed
+31
-20
No files matched your search
+5
-1
@@ -103,6 +103,7 @@ ifeq ($(CC),gcc)
|
||||
#
|
||||
#CWARN+=
|
||||
#
|
||||
CFLAGS+= -traditional-cpp
|
||||
endif
|
||||
|
||||
|
||||
@@ -136,9 +137,12 @@ ${PROG}: ${PROG}.c
|
||||
|
||||
# alternative executable
|
||||
#
|
||||
alt: data ${ALT_TARGET}
|
||||
alt: ${ALT_TARGET}
|
||||
@${TRUE}
|
||||
|
||||
${PROG}.alt: ${PROG}.alt.c
|
||||
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}
|
||||
|
||||
# data files
|
||||
#
|
||||
data: ${DATA}
|
||||
|
||||
Reference in new issue
Block a user