Add alt supplementary program to 2001/anonymous

Running make alt will compile the anonymous.ten.c without specifying
-m32: whether it'll end up being 64-bit or not would depend on the
system but it'll be saved as anonymous.ten.64 anyway.

The try.me.sh script will run this program directly, skipping the entry
itself, if the anonymous.ten.c cannot be compiled as a 32-bit binary.

Updated .gitignore.
This commit is contained in:
Cody Boone Ferguson committed 2023-05-21 04:17:30 -07:00
1 parent cfdbd0fef7
commit d47b9d50ef
4 files changed
+16 -5

No files matched your search

+8 -3
View File
@@ -117,10 +117,10 @@ PROG= ${ENTRY}
#
OBJ= ${PROG}.o
DATA=
TARGET= ${PROG} ${PROG}.ten
TARGET= ${PROG} ${PROG}.ten ${PROG}.ten.64
#
ALT_OBJ=
ALT_TARGET=
ALT_OBJ= ${PROG}.ten.64.o
ALT_TARGET= ${PROG}.ten.64
#################
@@ -156,6 +156,11 @@ ${PROG}.ten: ${PROG}.ten.c
@echo
${CC} ${CFLAGS} -m32 $< -o $@ ${LIBS}
${PROG}.ten.64: ${PROG}.ten.c
@echo "WARNING: the file created by this rule will NOT work with the entry itself;"
@echo "this is because it works ONLY on 32-bit ELF binaries! This however at least"
@echo "lets you see the supplementary program in action."
${CC} ${CFLAGS} $< -o $@ ${LIBS}
# alternative executable
#