Help Modifying Makefile to compile additional code
Emil808 opened this issue · 0 comments
Emil808 commented
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