ext2sim: Makefile target for: finds sim2simp

Not a serious attempt to make these work but they appear to compile
so this helps CI to cover as much code as possible.

ext2sim_main standalone does not link (probably due to unclean cross
module dependencies that now exist due to libutil.a being a heap where
anything with no modular home ends up)
This commit is contained in:
Darryl L. Miles 2025-07-18 13:21:40 +01:00 committed by R. Timothy Edwards
parent 975411f40b
commit 1f9ce81154
3 changed files with 16 additions and 4 deletions

View File

@ -11,12 +11,22 @@ EXTRA_LIBS = ${MAGICDIR}/extflat/libextflat.o ${MAGICDIR}/utils/libutils.a
include ${MAGICDIR}/defs.mak
LIBS += -lm ${LD_EXTRA_LIBS} ${SUB_EXTRA_LIBS}
CLEANS += exttosim${SHDLIB_EXT} simwrap.o
CLEANS += exttosim${SHDLIB_EXT} simwrap.o finds.o ext2sim_main.o ext2sim_main finds sim2simp
main: ext2sim
main: finds sim2simp # ext2sim_main # deprecated
tcl-main: exttosim${SHDLIB_EXT}
# Not linkable due to libutils.a needing more hierarchical separation
ext2sim_main: ext2sim_main.o ${EXTRA_LIBS} ${MAGICDIR}/tiles/libtiles.o
${CC} ${LDFLAGS} ${CFLAGS} -o $@ $^ ${LIBS} -lX11 -lz
ext2sim_main.o: ext2sim.c
${CC} ${CFLAGS} -I${MAGICDIR} -DEXT2SIM_MAIN -c -o $@ $^
finds: finds.o ${MAGICDIR}/utils/libutils.a
${CC} ${LDFLAGS} ${CFLAGS} -o $@ $^
simwrap.o: ext2sim.c
${CC} ${CFLAGS} ${CPPFLAGS} ${DFLAGS} ext2sim.c -c -o simwrap.o

View File

@ -707,7 +707,7 @@ runexttosim:
TxPrintf("exttosim finished.\n");
}
#if 0 /* Independent program "ext2sim" deprecated */
#ifdef EXT2SIM_MAIN /* Independent program "ext2sim" deprecated */
/*
* ----------------------------------------------------------------------------
@ -834,7 +834,7 @@ main(
exit(0);
}
#endif /* Deprecated */
#endif /* EXT2SIM_MAIN Deprecated */
/*
* ----------------------------------------------------------------------------

View File

@ -1,8 +1,10 @@
#include "utils/magic.h"
#include "utils/hash.h"
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <ctype.h>
#include <string.h>
char *
token(