mirror of
https://github.com/cesanta/mongoose.git
synced 2026-12-04 21:58:22 +00:00
37 lines
1.5 KiB
Makefile
37 lines
1.5 KiB
Makefile
CFLAGS = -pedantic -W -Wall -Werror -Wshadow -Wdouble-promotion
|
|
CFLAGS += -fno-common -Wconversion -Wundef -Wmissing-prototypes -Wstrict-prototypes
|
|
CFLAGS += -O3 -g3 -ffunction-sections -fdata-sections
|
|
CFLAGS += -I../../src -DMG_ARCH=MG_ARCH_ARMGCC -DMG_TLS=MG_TLS_BUILTIN
|
|
CFLAGS += -DMG_P256=MG_P256_LENNGREN -DMG_ENABLE_CUSTOM_RANDOM=1
|
|
# M4, M33, and M55 cover Armv7E-M, v8-M, and v8.1-M. M7 is ISA-equivalent
|
|
# to M4 for this scalar DSP code, so its cache and FPU add no coverage here.
|
|
TARGETS = p256_m4 p256_m33 p256_m55
|
|
SOURCES = p256_test.c p256_startup.S ../../src/tls_p256.c
|
|
SOURCES += ../../src/tls_p256_cortex.c ../../src/sha256.c ../../src/util.c
|
|
SOURCES += ../../src/iobuf.c ../../src/fmt.c ../../src/printf.c ../../src/log.c
|
|
|
|
.PHONY: all clean $(TARGETS)
|
|
|
|
all: $(TARGETS)
|
|
|
|
p256_m4: P256_CPU = cortex-m4
|
|
p256_m4: P256_MACHINE = mps2-an386
|
|
p256_m4: P256_LD = p256_m4.ld
|
|
p256_m4: p256_m4.ld
|
|
p256_m33: P256_CPU = cortex-m33
|
|
p256_m33: P256_MACHINE = mps2-an505
|
|
p256_m33: P256_LD = p256_m33.ld
|
|
p256_m33: p256_m33.ld
|
|
p256_m55: P256_CPU = cortex-m55
|
|
p256_m55: P256_MACHINE = mps3-an547
|
|
p256_m55: P256_LD = p256_m55.ld
|
|
p256_m55: p256_m55.ld
|
|
CFLAGS += -mcpu=$(P256_CPU) -mthumb $(CFLAGS_EXTRA)
|
|
LDFLAGS ?= -nostartfiles --specs=rdimon.specs -Wl,-T,$(P256_LD) -Wl,--gc-sections
|
|
$(TARGETS): $(SOURCES)
|
|
arm-none-eabi-gcc $(SOURCES) $(CFLAGS) $(LDFLAGS) -o $@
|
|
qemu-system-arm -M $(P256_MACHINE) -nographic -semihosting-config enable=on,target=native -kernel $@
|
|
|
|
clean:
|
|
rm -rf $(TARGETS)
|