Conversation
|
After running the makefile, I have ran: The output is a runnable executable for both architectures. I was wondering if I am working towards the correct direction and what the next step would be for the following ticket |
RyanJMah
left a comment
There was a problem hiding this comment.
Sorry this took so long, overall looks fine. I left some comments that I urge you to read before merging though. I'll leave it up to you to merge when you feel it's ready.
| .PHONY: install-toolchain host target clean | ||
|
|
||
| install-toolchain: | ||
| $(MKDIR) ./downloads |
There was a problem hiding this comment.
Can we consider moving this downloads folder into ./build? I'm not sure I like it in the main directory like this.
Also, consider making variables defined near the top of the file for these directories. For example:
BUILD_DIR = ./build| $(CC) -o ./install/$@ $^ $(CFLAGS) | ||
|
|
||
| clean: | ||
| $(RM) $(@D)/build |
There was a problem hiding this comment.
I don't think make clean should delete the toolchain. Maybe we can have a clean-toolchain target or something like that.
| @echo $(PATH) | ||
|
|
||
| target: $(C_SOURCES) | ||
| $(MKDIR) install |
There was a problem hiding this comment.
I don't like calling this directory install. I think we should put all of our compiled objects into a subdirectory of ./build
|
|
||
| target: $(C_SOURCES) | ||
| $(MKDIR) install | ||
| $(CC-arm) -o ./install/$@ $^ $(CFLAGS) |
There was a problem hiding this comment.
This should work for now, but the typical way to do this is to compile each .c file without linking (the -c flag), then link afterwards as a separate step.
No description provided.