Debian Codegraph @

examples/embedding/Makefile

raw
1 # This file is part of the MicroPython project, http://micropython.org/
2 # The MIT License (MIT)
3 # Copyright (c) 2022-2023 Damien P. George
4 #
5 # This is a very simple makefile that demonstrates how to build the embed port.
6 # All it needs to do is build all *.c files in the micropython_embed directory.
7 # This makefile would be replaced with your custom build system.
8
9 EMBED_DIR = micropython_embed
10 PROG = embed
11
12 CFLAGS += -I.
13 CFLAGS += -I$(EMBED_DIR)
14 CFLAGS += -I$(EMBED_DIR)/port
15 CFLAGS += -Wall -Og -fno-common
16
17 SRC += main.c
18 SRC += $(wildcard $(EMBED_DIR)/*/*.c) $(wildcard $(EMBED_DIR)/*/*/*.c)
19 OBJ += $(SRC:.c=.o)
20
21 $(PROG): $(OBJ)
22 $(CC) -o $@ $^
23
24 clean:
25 /bin/rm -f $(OBJ) $(PROG)