From 659ec36d2defef6d668434222e9004cf72d0c44c Mon Sep 17 00:00:00 2001 From: "Darryl L. Miles" Date: Fri, 18 Jul 2025 14:12:51 +0100 Subject: [PATCH] ext2spice: Makefile use EXT2SPICE_MAIN for deprecated standalone --- ext2spice/Makefile | 5 ++++- ext2spice/ext2spice.c | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ext2spice/Makefile b/ext2spice/Makefile index 1a53cc67..0c94f32d 100644 --- a/ext2spice/Makefile +++ b/ext2spice/Makefile @@ -11,7 +11,7 @@ EXTRA_LIBS = ${MAGICDIR}/extflat/libextflat.o ${MAGICDIR}/utils/libutils.a include ${MAGICDIR}/defs.mak LIBS += -lm ${LD_EXTRA_LIBS} ${SUB_EXTRA_LIBS} -CLEANS += exttospice${SHDLIB_EXT} spicewrap.o spicehier.o +CLEANS += exttospice${SHDLIB_EXT} ext2spice_main.o spicewrap.o spicehier.o main: ext2spice @@ -23,6 +23,9 @@ spicewrap.o: ext2spice.c ext2spice.h spicehier.o: ext2hier.c ext2spice.h ${CC} ${CFLAGS} ${CPPFLAGS} ${DFLAGS} ext2hier.c -c -o spicehier.o +ext2spice_main.o: ext2spice.c + ${CC} ${CFLAGS} ${CPPFLAGS} ${DFLAGS} -DEXT2SPICE_MAIN -c -o $@ $^ + exttospice${SHDLIB_EXT}: spicewrap.o spicehier.o ${MAGICDIR}/extflat/libextflat.o @echo --- making exttospice Tcl library \(exttospice${SHDLIB_EXT}\) ${RM} exttospice${SHDLIB_EXT} diff --git a/ext2spice/ext2spice.c b/ext2spice/ext2spice.c index 80ee8784..87bc155e 100644 --- a/ext2spice/ext2spice.c +++ b/ext2spice/ext2spice.c @@ -1157,7 +1157,7 @@ runexttospice: return; } -#if 0 /* Independent program "ext2spice" has been deprecated */ +#ifdef EXT2SPICE_MAIN /* Independent program "ext2spice" has been deprecated */ /* * ---------------------------------------------------------------------------- @@ -1324,7 +1324,7 @@ main( exit (0); } -#endif /* Deprecated */ +#endif /* EXT2SPICE_MAIN Deprecated */ /*