Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build files in subfolder #3

Open
kentosama opened this issue Jun 3, 2023 · 0 comments
Open

Build files in subfolder #3

kentosama opened this issue Jun 3, 2023 · 0 comments

Comments

@kentosama
Copy link

kentosama commented Jun 3, 2023

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant