From: PatR Date: Wed, 8 Feb 2023 19:38:47 +0000 (-0800) Subject: Unix Makefiles X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bfd3cee886b6d64b2be16f72e821903a8aa671de;p=nethack Unix Makefiles Move building uudecode for unpacking .Wav files from Makefile.dat to Makefile.utl and add uudecode to util's 'make spotless'. --- diff --git a/sys/unix/Makefile.utl b/sys/unix/Makefile.utl index 6c9cfb3ee..13a2bbe9c 100644 --- a/sys/unix/Makefile.utl +++ b/sys/unix/Makefile.utl @@ -354,6 +354,11 @@ tileedit: tileedit.o $(TEXT_IO) $(QTDIR)/bin/moc -o tileedit.moc tileedit.h $(CXXLINK) -o tileedit -L$(QTDIR)/lib tileedit.o $(TEXT_IO) -lqt +uudecode: uudecode.o + $(CLINK) $(LFLAGS) -o uudecode uudecode.o $(LIBS) +uudecode.o: ../sys/share/uudecode.c + $(CC) $(CFLAGS) -c -o uudecode.o ../sys/share/uudecode.c + # using dependencies like # ../src/foo:: # @( cd ../src ; $(MAKE) foo ) @@ -408,4 +413,4 @@ clean: spotless: clean -rm -f makedefs recover dlb -rm -f gif2txt txt2ppm tile2x11 tile2img.ttp xpm2img.ttp \ - tilemap tileedit tile2bmp + tilemap tileedit tile2bmp uudecode diff --git a/sys/unix/hints/include/multisnd-post.370 b/sys/unix/hints/include/multisnd-post.370 index 114f5c40c..431745dab 100644 --- a/sys/unix/hints/include/multisnd-post.370 +++ b/sys/unix/hints/include/multisnd-post.370 @@ -2,18 +2,22 @@ # NetHack 3.7 multisnd-post.370 $NHDT-Date: 1597332785 2020/08/13 15:33:05 $ $NHDT-Branch: NetHack-3.7 $ ifeq "$(HAVE_SNDLIB)" "1" +# note: one possible value for $(SNDLIBSRC) is 'macsound.m' which is written +# in Objective-C; this relies on $(CC) recognizing the filename suffix +# and knowing how to handle that; clang on MacOS does, both when +# masquerading as gcc and when invoked as itself $(TARGETPFX)$(SNDLIBOBJ): $(SNDLIBSRC) $(HACK_H) - $(CC) $(CFLAGS) -c -o$@ $(SNDLIBSRC) + $(CC) $(CFLAGS) -c -o $@ $(SNDLIBSRC) + ifeq "$(NEEDS_WAV)" "1" + $(WAVDIR)/%.wav: ../util/uudecode $(WAVDIR)/%.uu $^ mv $(notdir $@) $@ -../util/uudecode: uudecode.o - $(CC) $(LFLAGS) uudecode.o -o $@ +../util/uudecode: ../sys/share/uudecode.c + ( cd ../util ; $(MAKE) uudecode ) -uudecode.o: ../sys/share/uudecode.c - $(CC) $(CFLAGS) -c -o $@ ../sys/share/uudecode.c endif # NEEDS_WAV endif # HAVE_SNDLIB