run.mk: Work around missing LD_LIBRARY_PATH on Windows

worked around missing LD_LIBRARY_PATH for Windows (via a temporary
start batch script setting PATH).
This commit is contained in:
Jan Lindemann 2007-10-30 19:11:33 +00:00 committed by Jan Lindemann
commit f8971953c8

View file

@ -19,16 +19,27 @@ include $(MODDIR)/make/ldlibpath.mk
#LD_LIB_PATH_ORIG := $(LD_LIBRARY_PATH)
#export LD_LIBRARY_PATH=$(shell echo $(strip $(LD_LIB_PATH):$(LD_LIB_PATH_ORIG)) | sed 's/ /:/g; s/::*/:/g')
ifeq ($(TARGET),mingw)
DLL_PATH = $(shell echo $(LD_LIBRARY_PATH) | sed 's/:/;/g');$(CROSS_TOOL_DIR)/bin
endif
all:
install:
valgrind:
rm -f $(CORE)
valgrind $(VALGRIND_OPTS) ./$(EXE) $(EXE_ARGS)
ifeq ($(TARGET),mingw)
run: start.bat
cat start.bat | wine cmd
clean: winrunclean
winrunclean:
rm -f start.bat
else
run:
rm -f $(CORE)
ifeq ($(TARGET),mingw)
wine ./$(EXE) $(EXE_ARGS)
else
./$(EXE) $(EXE_ARGS)
endif
@ -54,3 +65,8 @@ clean: runclean localclean
ldd:
ldd $(EXE)
start.bat:
echo "set PATH=%PATH;$(DLL_PATH)" > $@.tmp
echo "$(EXE) $(EXE_ARGS)" >> $@.tmp
mv $@.tmp $@