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

Help Modifying Makefile to compile additional code #627

@Emil808

Description

@Emil808

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions