diff --git a/tools/libdol2asm/exporter/makefile.py b/tools/libdol2asm/exporter/makefile.py index e99c5c787f8..a0070431e13 100644 --- a/tools/libdol2asm/exporter/makefile.py +++ b/tools/libdol2asm/exporter/makefile.py @@ -61,8 +61,8 @@ async def create_library(library: Library): await builder.write(f"{o_path}/%.o: {cpp_path}/%.cpp") await builder.write(f"\t@mkdir -p $(@D)") await builder.write(f"\t@echo building... $<") - await builder.write(f"\t@iconv -f UTF-8 -t CP932 < $< > $@.iconv.cpp") - await builder.write(f"\t@$(CC) $(CFLAGS) $({prefix}_CFLAGS) -c -o $@ $@.iconv.cpp") + await builder.write(f"\t@$(ICONV) -f UTF-8 -t CP932 < $< > $(basename $@).cpp") + await builder.write(f"\t@$(CC) $(CFLAGS) $({prefix}_CFLAGS) -c -o $@ $(basename $@).cpp") await builder.write("") debug(f"generated Makefile: '{makefile_path}'") @@ -149,8 +149,8 @@ async def create_rel(module: Module, rel_path: Path): await builder.write(f"{o_path}/%.o: {cpp_path}/%.cpp") await builder.write(f"\t@echo [{module.index:>3}] building $@") await builder.write(f"\t@mkdir -p $(@D)") - await builder.write(f"\t@iconv -f UTF-8 -t CP932 < $< > $@.iconv.cpp") - await builder.write(f"\t@$(CC) $(CFLAGS) $({prefix}_CFLAGS) -c -o $@ $@.iconv.cpp") + await builder.write(f"\t@$(ICONV) -f UTF-8 -t CP932 < $< > $(basename $@).cpp") + await builder.write(f"\t@$(CC) $(CFLAGS) $({prefix}_CFLAGS) -c -o $@ $(basename $@).cpp") await builder.write("") for library in libraries[1:]: