b.liu | b17525e | 2025-05-14 17:22:29 +0800 | [diff] [blame] | 1 | # Common make definitions, customized for each platform
|
| 2 |
|
| 3 | # Definitions required in all program directories to compile and link
|
| 4 | # C programs using gcc.
|
| 5 |
|
| 6 | # static / shared
|
| 7 | BUILD_LIB_TYPE = shared
|
| 8 |
|
| 9 | ROOT = $(BUILD_ROOT)
|
| 10 | OUT_DIR = $(ROOT)/out
|
| 11 | BUILD_TOOLCHAIN_DIR = $(ROOT)/toolchain
|
| 12 | LOCAL_PATH=.
|
| 13 |
|
| 14 | export STAGING_DIR=
|
| 15 |
|
b.liu | b913ecf | 2025-05-27 18:51:54 +0800 | [diff] [blame] | 16 | CC=$(BUILD_TOOLCHAIN_DIR)/bin/arm-openwrt-linux-gnueabi-gcc
|
| 17 | AR=$(BUILD_TOOLCHAIN_DIR)/bin/arm-openwrt-linux-gnueabi-ar
|
b.liu | b17525e | 2025-05-14 17:22:29 +0800 | [diff] [blame] | 18 |
|
| 19 | MAKE=make
|
| 20 |
|
| 21 | $(info BUILD_LIB_TYPE=$(BUILD_LIB_TYPE))
|
| 22 | $(info ROOT=$(ROOT))
|
| 23 | $(info CC=$(CC))
|
| 24 | $(info AR=$(AR))
|
| 25 |
|
| 26 | # -Werror=non-virtual-dtor
|
| 27 | #CFLAGS= --sysroot=$(BUILD_TOOLCHAIN_DIR) -Os -pipe -rdynamic -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -mfloat-abi=hard -fno-exceptions -Wno-multichar -ffunction-sections -fdata-sections -funwind-tables -Wa,--noexecstack -fno-short-enums -no-canonical-prefixes -fno-canonical-system-headers -mfpu=neon -fno-builtin-sin -fno-strict-volatile-bitfields -Wno-psabi -mthumb-interwork -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -g -Wstrict-aliasing=2 -fgcse-after-reload -frerun-cse-after-loop -frename-registers -mthumb -fomit-frame-pointer -fno-strict-aliasing -Werror=format-security -Werror=return-type -Werror=address -Werror=sequence-point -ffunction-sections -Wl,--gc-sections -Wl,--no-undefined -Wno-sign-compare -Wno-pointer-arith
|
| 28 | CFLAGS_DEF = --sysroot=$(BUILD_TOOLCHAIN_DIR) -Os -pipe -rdynamic -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -Wall -Werror -g
|
| 29 |
|
| 30 | CFLAGS_IGNORE_WARN = --sysroot=$(BUILD_TOOLCHAIN_DIR) -Os -pipe -rdynamic -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -mfloat-abi=hard -fno-exceptions -Wno-multichar -ffunction-sections -fdata-sections -funwind-tables -Wa,--noexecstack -fno-short-enums -no-canonical-prefixes -fno-canonical-system-headers -mfpu=neon -fno-builtin-sin -fno-strict-volatile-bitfields -Wno-psabi -mthumb-interwork -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -g -Wstrict-aliasing=2 -fgcse-after-reload -frerun-cse-after-loop -frename-registers -mthumb -fomit-frame-pointer -fno-strict-aliasing -Werror=format-security -Werror=return-type -Werror=address -Werror=sequence-point -ffunction-sections -Wl,--gc-sections -Wl,--no-undefined -Wno-sign-compare -Wno-pointer-arith
|
| 31 |
|
| 32 | AWK=awk
|
| 33 |
|
| 34 | #CFLAGS += -Wno-error=format-truncation -Wno-error=format-overflow= -Wno-error=stringop-overread -Wno-error=deprecated-declarations
|
| 35 |
|
| 36 | CFLAGS=$(CFLAGS_IGNORE_WARN)
|
| 37 |
|
| 38 | INC_DIR = \
|
| 39 | -I$(LOCAL_PATH)/ \
|
| 40 | -I$(BUILD_ROOT)/mbtk/include \
|
| 41 | -I$(BUILD_ROOT)/mbtk/include/mbtk \
|
| 42 | -I$(BUILD_ROOT)/mbtk/include/lynq \
|
| 43 | -I$(BUILD_ROOT)/mbtk/include/mqtt \
|
| 44 | -I$(BUILD_ROOT)/mbtk/include/ql_v2
|
| 45 |
|
| 46 | # -DCONFIG_AB_SYSTEM
|
| 47 | DEFINE = \
|
| 48 | -DMBTK_SUPPORT \
|
| 49 | -DMARVELL_EXTENDED \
|
| 50 | -DPXA1826_AUDIO \
|
| 51 | -D__USE_GNU \
|
| 52 | -DNOT_DROPPED_FLAGS_TEST \
|
| 53 | -DNDEBUG \
|
| 54 | -UDEBUG \
|
| 55 | -D_FORTIFY_SOURCE=2 \
|
| 56 | -D_GNU_SOURCE
|
| 57 |
|
| 58 | # -L$(OUT_DIR)/lib
|
| 59 | LIB_DIR = \
|
| 60 | -L$(BUILD_ROOT)/mbtk/lib
|
| 61 |
|
| 62 | LIBS = -lpthread -lstdc++
|
| 63 |
|
| 64 | # Common temp files to delete from each directory.
|
| 65 | TEMPFILES=core core.* *.o temp.* *.out
|