Skip to content
This repository has been archived by the owner on Jul 3, 2024. It is now read-only.

Help Modifying Makefile to compile additional code #627

Open
Emil808 opened this issue Jan 6, 2022 · 0 comments
Open

Help Modifying Makefile to compile additional code #627

Emil808 opened this issue Jan 6, 2022 · 0 comments

Comments

@Emil808
Copy link

Emil808 commented Jan 6, 2022

I would like advice on how to add additional custom code.

The structure I am working with now is:

/software/hello
Here, where the main function is located, and uses code from headers defined in:

/custom-software/custom_header.h
/custom-software/custom_src.c

I'm overwhelmed by this bigger code base, so how do I modify the current make file that shown bellow to compile and include the custom software that I made. I tried looking at makefile tutorials but having a hard time understanding how to adapt it to the freedom-e-sdk setup.


$(PROGRAM): $(wildcard *.c) $(wildcard *.h) $(wildcard *.S) 
	$(CC) $(CFLAGS) -Iinclude $(LDFLAGS) $(filter %.c %.S,$^) $(LOADLIBES) $(LDLIBS) -o $@

clean:
	rm -f $(PROGRAM) $(PROGRAM).hex
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant