Not all systems have easy access to hard links or symlinks, so add
fallback logic to the run->psim build code to handle those.
Bug: https://sourceware.org/PR18864
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
+LN_S = @LN_S@
CC = @CC@
C_DIALECT = @C_DIALECT@
$(CC) $(CFLAGS) $(LDFLAGS) -o psim$(EXEEXT) main.o $(TARGETLIB) $(BFD_LIB) $(ZLIB) $(LIBINTL) $(LIBIBERTY_LIB) $(LIBS)
run$(EXEEXT): psim$(EXEEXT)
- rm -f run$(EXEEXT)
- ln psim$(EXEEXT) run$(EXEEXT)
+ rm -f $@
+ ln $< $@ 2>/dev/null || $(LN_S) $< $@ 2>/dev/null || cp -p $< $@
$(TARGETLIB): tmp-igen tmp-dgen tmp-hw tmp-pk tmp-defines $(LIB_OBJ) $(GDB_OBJ)
rm -f $(TARGETLIB)