Add another program for 2001/anonymous
This sings a different counting song, Ten in the Bed. It uses another C feature (a char *[]) that the Ten Green Bottles does not use. This is for fun as well as to show another program (with a different C feature) that the program works on, again assuming -m32 is allowed. Instead of using numbers it uses strings (as expected with a char *[]) in the singing. This was for fun (and to see if the program would work on arrays) after I remembered the song in a comment on GitHub - about the Ten Green Bottles song.
This commit is contained in:
1 parent
1b9ea65e05
commit
93684cfc19
4 files changed
+64
-2
No files matched your search
+23
-2
@@ -117,7 +117,7 @@ PROG= ${ENTRY}
|
||||
#
|
||||
OBJ= ${PROG}.o
|
||||
DATA=
|
||||
TARGET= ${PROG} ${PROG}.ten ${PROG}.ten.64
|
||||
TARGET= ${PROG} ${PROG}.ten ${PROG}.ten.64 ${PROG}.bed ${PROG}.bed.64
|
||||
#
|
||||
ALT_OBJ= ${PROG}.ten.64.o
|
||||
ALT_TARGET= ${PROG}.ten.64
|
||||
@@ -150,7 +150,7 @@ ${PROG}.ten: ${PROG}.ten.c
|
||||
@echo "If you want to use it where this is not possible e.g. with a Mac, say to"
|
||||
@echo "use by itself, try:"
|
||||
@echo
|
||||
@echo " ${CC} $< -o $@"
|
||||
@echo " make anonymous.ten.64"
|
||||
@echo
|
||||
@echo "but running ${PROG} on the resulting binary will crash."
|
||||
@echo
|
||||
@@ -162,6 +162,27 @@ ${PROG}.ten.64: ${PROG}.ten.c
|
||||
@echo "lets you see the supplementary program in action."
|
||||
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||
|
||||
${PROG}.bed: ${PROG}.bed.c
|
||||
@echo "WARNING: ${PROG}.bed.c must be compiled as 32-bit to use with the entry itself;"
|
||||
@echo "this is because the program works on 32-bit binaries. If you cannot use -m32 this"
|
||||
@echo "will NOT work!"
|
||||
@echo
|
||||
@echo "If you want to use it where this is not possible e.g. with a Mac, say to"
|
||||
@echo "use by itself, try:"
|
||||
@echo
|
||||
@echo " make anonymous.bed.64"
|
||||
@echo
|
||||
@echo "but running ${PROG} on the resulting binary will crash."
|
||||
@echo
|
||||
${CC} ${CFLAGS} -m32 $< -o $@ ${LIBS}
|
||||
|
||||
${PROG}.bed.64: ${PROG}.bed.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
|
||||
#
|
||||
alt: data ${ALT_TARGET}
|
||||
|
||||
Reference in new issue
Block a user