Update fixdep defines

This commit is contained in:
PikalaxALT 2021-11-23 08:18:20 -05:00
parent f034ea35d9
commit d20745b988
2 changed files with 11 additions and 8 deletions

View File

@ -122,16 +122,16 @@ $(MWAS):
all: tools
ifeq ($(NODEP),)
ifneq ($(WINE),)
WINEPATH := $(shell winepath -w $(PROJECT_ROOT) | $(SED) 's/\\/\//g')
else
ifeq ($(WSLENV),)
WINEPATH := $(shell wslpath -w $(PROJECT_ROOT) | $(SED) 's/\\/\//g')
endif
endif
ifneq ($(WINPATH),)
PROJECT_ROOT_NT := $(shell $(WINPATH) -w $(PROJECT_ROOT) | $(SED) 's/\\/\//g')
define fixdep
$(SED) -i 's/\r//g; s/\\/\//g; s/\/$$/\\/g; s#$(WINEPATH)#$(PROJECT_ROOT)#g' $(1)
$(SED) -i 's/\r//g; s/\\/\//g; s/\/$$/\\/g; s#$(PROJECT_ROOT_NT)#$(PROJECT_ROOT)#g' $(1)
endef
else
define fixdep
$(SED) -i 's/\r//g; s/\\/\//g; s/\/$$/\\/g' $(1)
endef
endif
DEPFLAGS := -gccdep -MMD
DEPFILES := $(ALL_OBJS:%.o=%.d)
$(DEPFILES):

View File

@ -32,4 +32,7 @@ endif
ifeq ($(NOWINE),1)
WINE :=
WINPATH := wslpath
else
WINPATH := winepath
endif