From: nhmall Date: Sun, 19 Feb 2023 20:06:55 +0000 (-0500) Subject: fix recover on Linux X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a92ed87c93d167a27b52c63dac3be81273a7ff77;p=nethack fix recover on Linux Also, recover should be a target-side utility, not host. That really only makes a difference if you are cross-compiling. --- diff --git a/sys/unix/Makefile.utl b/sys/unix/Makefile.utl index b97f59b55..6c85f7e8d 100644 --- a/sys/unix/Makefile.utl +++ b/sys/unix/Makefile.utl @@ -195,7 +195,7 @@ ODATE = $(OBJDIR)/date.o MAKEOBJS = makedefs.o $(OMONOBJ) $(ODATE) $(OALLOC) # object files for recovery utility -RECOVOBJS = recover.o +RECOVOBJS = $(TARGETPFX)recover.o # object files for the data librarian DLBOBJS = dlb_main.o $(OBJDIR)/dlb.o $(OALLOC) @@ -266,11 +266,11 @@ lintdgn: # dependencies for recover # -recover: $(RECOVOBJS) - $(CLINK) $(LFLAGS) -o recover $(RECOVOBJS) $(LIBS) +$(TARGETPFX)recover: $(RECOVOBJS) + $(TARGET_CLINK) $(TARGET_LFLAGS) -o recover $(RECOVOBJS) $(LIBS) -recover.o: recover.c $(CONFIG_H) - $(CC) $(CFLAGS) -c recover.c -o $@ +$(TARGETPFX)recover.o: recover.c $(CONFIG_H) + $(TARGET_CC) $(TARGET_CFLAGS) $(CSTD) -c recover.c -o $@ # dependencies for dlb diff --git a/sys/unix/hints/linux.370 b/sys/unix/hints/linux.370 index ada161efc..39363b7ed 100755 --- a/sys/unix/hints/linux.370 +++ b/sys/unix/hints/linux.370 @@ -258,7 +258,7 @@ endif # WANT_LIBNH #PREFIX=/usr PREFIX=$(wildcard ~)/nh/install -HACKDIR=$(PREFIX)/games/lib/$(GAME)dir +HACKDIR=$(PREFIX)/games/lib/nethackdir SHELLDIR = $(PREFIX)/games INSTDIR=$(HACKDIR) VARDIR = $(HACKDIR) diff --git a/sys/unix/hints/unix b/sys/unix/hints/unix index b761757ea..7b937c45f 100644 --- a/sys/unix/hints/unix +++ b/sys/unix/hints/unix @@ -11,7 +11,7 @@ PREFIX=/usr -HACKDIR=$(PREFIX)/games/lib/$(GAME)dir +HACKDIR=$(PREFIX)/games/lib/nethackdir INSTDIR=$(HACKDIR) VARDIR=$(HACKDIR) SHELLDIR=$(PREFIX)/games