Skip to content

Commit 1e3fb31

Browse files
cencarnamclaireb
authored andcommitted
examples: add build script for example projects
Signed-off-by: Cedric Encarnacion <cedricjustine.encarnacion@analog.com>
1 parent 05f3c5b commit 1e3fb31

File tree

5 files changed

+226
-0
lines changed

5 files changed

+226
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
include ../../../tools/sharcfx/sharcfx.mk
2+
3+
# Initialize project root and build directory
4+
PROJECT := denoiser_fileio
5+
PROJECT_ROOT := .
6+
BUILD_DIR := ./build
7+
DEBUGGER := 1000
8+
9+
# Shared and common source files
10+
SHARED := ../../shared
11+
COMMON := ../common
12+
13+
# Add include directories
14+
INCLUDES += \
15+
-I"$(PROJECT_ROOT)/src" \
16+
-I"$(PROJECT_ROOT)/system" \
17+
-I"$(COMMON)/model/model_fp" \
18+
-I"$(SHARED)/system" \
19+
-I"$(SHARED)"
20+
21+
# Add C sources
22+
C_SRCS += \
23+
$(wildcard $(PROJECT_ROOT)/system/*.c) \
24+
$(wildcard $(PROJECT_ROOT)/system/pinmux/GeneratedSources/*.c) \
25+
$(wildcard $(PROJECT_ROOT)/system/startup_lsp/lsp/*.c) \
26+
$(wildcard $(PROJECT_ROOT)/system/sru/*.c) \
27+
$(wildcard $(SHARED)/system/*.c) \
28+
$(wildcard $(SHARED)/*.c) \
29+
$(wildcard $(COMMON)/*.c)
30+
31+
# Add C++ sources (.cc)
32+
CC_SRCS += \
33+
$(wildcard $(COMMON)/model/model_fp/*.cc)
34+
35+
# Add C++ sources (.cpp)
36+
CPP_SRCS += \
37+
$(wildcard $(PROJECT_ROOT)/src/*.cpp)
38+
39+
include ../../../tools/sharcfx/project.mk
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
include ../../../tools/sharcfx/sharcfx.mk
2+
3+
# Initialize project root and build directory
4+
PROJECT := denoiser_realtime
5+
PROJECT_ROOT := .
6+
BUILD_DIR := ./build
7+
DEBUGGER := 1000
8+
9+
# Shared and common source files
10+
SHARED := ../../shared
11+
COMMON := ../common
12+
13+
# Add include directories
14+
INCLUDES += \
15+
-I"$(PROJECT_ROOT)/src" \
16+
-I"$(PROJECT_ROOT)/system" \
17+
-I"$(PROJECT_ROOT)/system/drivers/sport" \
18+
-I"$(PROJECT_ROOT)/system/drivers/twi" \
19+
-I"$(PROJECT_ROOT)/system/services/pdma" \
20+
-I"$(COMMON)/model/model_fp" \
21+
-I"$(SHARED)/system" \
22+
-I"$(SHARED)"
23+
24+
# Add C sources
25+
C_SRCS += \
26+
$(wildcard $(PROJECT_ROOT)/system/*.c) \
27+
$(wildcard $(PROJECT_ROOT)/system/pinmux/GeneratedSources/*.c) \
28+
$(wildcard $(PROJECT_ROOT)/system/startup_lsp/lsp/*.c) \
29+
$(wildcard $(PROJECT_ROOT)/system/sru/*.c) \
30+
$(wildcard $(SHARED)/system/*.c) \
31+
$(wildcard $(SHARED)/*.c) \
32+
$(wildcard $(COMMON)/*.c)
33+
34+
# Add C++ sources (.cc)
35+
CC_SRCS += \
36+
$(wildcard $(COMMON)/model/model_fp/*.cc)
37+
38+
# Add C++ sources (.cpp)
39+
CPP_SRCS += \
40+
$(wildcard $(PROJECT_ROOT)/src/*.cpp)
41+
42+
# Add drivers and services
43+
SYSCFG_SRCS += \
44+
$(DRIVER_DIR)/Source/sport/adi_sport.c \
45+
$(DRIVER_DIR)/Source/twi/adi_twi.c \
46+
$(DRIVER_DIR)/Source/uart/adi_uart.c \
47+
$(SERVICE_DIR)/Source/pdma/adi_pdma.c \
48+
$(SERVICE_DIR)/Source/gpio/adi_gpio.c \
49+
$(SERVICE_DIR)/Source/pwr/adi_pwr.c \
50+
$(SERVICE_DIR)/Source/spu/adi_spu.c
51+
52+
include ../../../tools/sharcfx/project.mk
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
include ../../../tools/sharcfx/sharcfx.mk
2+
3+
# Initialize project root and build directory
4+
PROJECT := genre_id_fileio
5+
PROJECT_ROOT := .
6+
BUILD_DIR := ./build
7+
DEBUGGER := 1000
8+
9+
# Shared and common source files
10+
SHARED := ../../shared
11+
COMMON := ../common
12+
13+
# Add include directories
14+
INCLUDES += \
15+
-I"$(PROJECT_ROOT)/src" \
16+
-I"$(PROJECT_ROOT)/system" \
17+
-I"$(COMMON)/model/float_genre_ID" \
18+
-I"$(COMMON)/model/int8_genre_ID" \
19+
-I"$(COMMON)" \
20+
-I"$(SHARED)/system" \
21+
-I"$(SHARED)"
22+
23+
# Add C sources
24+
C_SRCS += \
25+
$(wildcard $(PROJECT_ROOT)/system/*.c) \
26+
$(wildcard $(PROJECT_ROOT)/system/pinmux/GeneratedSources/*.c) \
27+
$(wildcard $(PROJECT_ROOT)/system/startup_lsp/lsp/*.c) \
28+
$(wildcard $(PROJECT_ROOT)/system/sru/*.c) \
29+
$(wildcard $(SHARED)/system/*.c) \
30+
$(wildcard $(SHARED)/*.c) \
31+
$(wildcard $(COMMON)/*.c)
32+
33+
# Add C++ sources (.cc)
34+
CC_SRCS += \
35+
$(wildcard $(COMMON)/model/float_genre_ID/*.cc) \
36+
$(wildcard $(COMMON)/model/int8_genre_ID/*.cc)
37+
38+
# Add C++ sources (.cpp)
39+
CPP_SRCS += \
40+
$(wildcard $(PROJECT_ROOT)/src/*.cpp)
41+
42+
include ../../../tools/sharcfx/project.mk
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
include ../../../tools/sharcfx/sharcfx.mk
2+
3+
# Initialize project root and build directory
4+
PROJECT := kws_fileio
5+
PROJECT_ROOT := .
6+
BUILD_DIR := ./build
7+
DEBUGGER := 1000
8+
9+
# Shared and common source files
10+
SHARED := ../../shared
11+
COMMON := ../common
12+
13+
# Add include directories
14+
INCLUDES += \
15+
-I"$(PROJECT_ROOT)/src" \
16+
-I"$(PROJECT_ROOT)/system" \
17+
-I"$(COMMON)/model" \
18+
-I"$(COMMON)" \
19+
-I"$(SHARED)/system" \
20+
-I"$(SHARED)"
21+
22+
# Add C sources
23+
C_SRCS += \
24+
$(wildcard $(PROJECT_ROOT)/system/*.c) \
25+
$(wildcard $(PROJECT_ROOT)/system/pinmux/GeneratedSources/*.c) \
26+
$(wildcard $(PROJECT_ROOT)/system/startup_lsp/lsp/*.c) \
27+
$(wildcard $(PROJECT_ROOT)/system/sru/*.c) \
28+
$(wildcard $(SHARED)/system/*.c) \
29+
$(wildcard $(SHARED)/*.c) \
30+
$(wildcard $(COMMON)/*.c)
31+
32+
# Add C++ sources (.cc)
33+
CC_SRCS += \
34+
$(wildcard $(COMMON)/model/*.cc)
35+
36+
# Add C++ sources (.cpp)
37+
CPP_SRCS += \
38+
$(wildcard $(PROJECT_ROOT)/src/*.cpp)
39+
40+
include ../../../tools/sharcfx/project.mk
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
include ../../../tools/sharcfx/sharcfx.mk
2+
3+
# Initialize project root and build directory
4+
PROJECT := kws_realtime
5+
PROJECT_ROOT := .
6+
BUILD_DIR := ./build
7+
DEBUGGER := 1000
8+
9+
# Shared and common source files
10+
SHARED := ../../shared
11+
COMMON := ../common
12+
13+
# Add include directories
14+
INCLUDES += \
15+
-I"$(PROJECT_ROOT)/src" \
16+
-I"$(PROJECT_ROOT)/system" \
17+
-I"$(PROJECT_ROOT)/system/drivers/sport" \
18+
-I"$(PROJECT_ROOT)/system/drivers/twi" \
19+
-I"$(PROJECT_ROOT)/system/services/pdma" \
20+
-I"$(COMMON)/model" \
21+
-I"$(COMMON)" \
22+
-I"$(SHARED)/system" \
23+
-I"$(SHARED)"
24+
25+
# Add C sources
26+
C_SRCS += \
27+
$(wildcard $(PROJECT_ROOT)/system/*.c) \
28+
$(wildcard $(PROJECT_ROOT)/system/pinmux/GeneratedSources/*.c) \
29+
$(wildcard $(PROJECT_ROOT)/system/startup_lsp/lsp/*.c) \
30+
$(wildcard $(PROJECT_ROOT)/system/sru/*.c) \
31+
$(wildcard $(SHARED)/system/*.c) \
32+
$(wildcard $(SHARED)/*.c) \
33+
$(wildcard $(COMMON)/*.c)
34+
35+
# Add C++ sources (.cc)
36+
CC_SRCS += \
37+
$(wildcard $(COMMON)/model/*.cc)
38+
39+
# Add C++ sources (.cpp)
40+
CPP_SRCS += \
41+
$(wildcard $(PROJECT_ROOT)/src/*.cpp)
42+
43+
# Add drivers and services
44+
SYSCFG_SRCS += \
45+
$(DRIVER_DIR)/Source/sport/adi_sport.c \
46+
$(DRIVER_DIR)/Source/twi/adi_twi.c \
47+
$(DRIVER_DIR)/Source/uart/adi_uart.c \
48+
$(SERVICE_DIR)/Source/pdma/adi_pdma.c \
49+
$(SERVICE_DIR)/Source/gpio/adi_gpio.c \
50+
$(SERVICE_DIR)/Source/pwr/adi_pwr.c \
51+
$(SERVICE_DIR)/Source/spu/adi_spu.c
52+
53+
include ../../../tools/sharcfx/project.mk

0 commit comments

Comments
 (0)