Skip to content

Relative file paths #3

Description

@kentosama

Hello,

I would like to have a folder structure where ".asm" files are located in a "src" subfolder. When I compile the code with clownassembler, I get an error because I include the files like this

include "header.asm

and not

include "src/header.asm

This makes sense, because the "main.asm" file is also in the "src" folder.

When I include the files by adding the "src" subfolder in the path, I get an error in VisualCode, but the program compiles correctly.

Is there any way of telling clownassembler where to work?

In my Makefile, I've added "cd $(SRC_DIR) to work in the src folder:

$(OUT_DIR)/$(BIN): $(SRC_DIR)/$(SRC)
	@cd $(SRC_DIR) && $(ASM) $(ASFLAGS) -i $(SRC) -o ../$(OUT_DIR)/temp
	@dd if=$(OUT_DIR)/temp of=$@ bs=128K conv=sync status=none
	@rm -f $(OUT_DIR)/temp

Thanks a lot!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions