diff --git a/Makefile b/Makefile index e5b35a8302..1bfeebf616 100644 --- a/Makefile +++ b/Makefile @@ -159,7 +159,7 @@ $(C_BUILDDIR)/%.o : $(C_SUBDIR)/%.c $$(c_dep) ifeq ($(NODEP),1) $(ASM_BUILDDIR)/%.o: asm_dep := else -$(ASM_BUILDDIR)/%.o: asm_dep = $(shell $(SCANINC) $(ASM_SUBDIR)/$*.s) +$(ASM_BUILDDIR)/%.o: asm_dep = $(shell $(SCANINC) -I "" $(ASM_SUBDIR)/$*.s) endif $(ASM_BUILDDIR)/%.o: $(ASM_SUBDIR)/%.s $$(asm_dep) @@ -168,7 +168,7 @@ $(ASM_BUILDDIR)/%.o: $(ASM_SUBDIR)/%.s $$(asm_dep) ifeq ($(NODEP),1) $(DATA_ASM_BUILDDIR)/%.o: data_dep := else -$(DATA_ASM_BUILDDIR)/%.o: data_dep = $(shell $(SCANINC) -I include $(DATA_ASM_SUBDIR)/$*.s) +$(DATA_ASM_BUILDDIR)/%.o: data_dep = $(shell $(SCANINC) -I include -I "" $(DATA_ASM_SUBDIR)/$*.s) endif $(DATA_ASM_BUILDDIR)/%.o: $(DATA_ASM_SUBDIR)/%.s $$(data_dep) diff --git a/tools/scaninc/scaninc.cpp b/tools/scaninc/scaninc.cpp index 0d55d11f65..696842dc91 100644 --- a/tools/scaninc/scaninc.cpp +++ b/tools/scaninc/scaninc.cpp @@ -62,7 +62,7 @@ int main(int argc, char **argv) argv++; includeDir = std::string(argv[0]); } - if (includeDir.back() != '/') + if (!includeDir.empty() && includeDir.back() != '/') { includeDir += '/'; }