Makefile (1455B)
1 2 what_to_build:: all 3 4 -include local.mk 5 6 include build/build.mk 7 8 # bootloader download tool 9 SRCS := tools/lpcboot.c \ 10 tools/usb.c 11 $(call program,lpcboot,$(SRCS)) 12 13 # debugger 14 SRCS := tools/debugger.c \ 15 tools/debugger-core.c \ 16 tools/debugger-commands.c \ 17 tools/gdb-bridge.c \ 18 tools/jtag.c \ 19 tools/jtag-dap.c \ 20 tools/arm-m-debug.c \ 21 tools/linenoise.c \ 22 tools/lkdebug.c \ 23 tools/rswdp.c \ 24 tools/socket.c \ 25 tools/swo.c \ 26 tools/websocket.c \ 27 tools/base64.c \ 28 tools/sha1.c \ 29 tools/usb.c 30 31 ifneq ($(TOOLCHAIN),) 32 SRCS += out/builtins.c 33 else 34 SRCS += tools/builtins.c 35 endif 36 $(call program,debugger,$(SRCS)) 37 38 39 ifneq ($(TOOLCHAIN),) 40 # if there's a cross-compiler, build agents from source 41 42 $(call agent, lpclink2, 0x10080400, M3) 43 $(call agent, stm32f4xx, 0x20000400, M3) 44 $(call agent, stm32f0xx, 0x20000400, M0) 45 $(call agent, lpc13xx, 0x10000400, M3) 46 $(call agent, lpc15xx, 0x02000400, M3) 47 $(call agent, cc13xx, 0x20000400, M3) 48 $(call agent, nrf528xx, 0x20000400, M3) 49 $(call agent, efr32bg2x, 0x20000400, M3) 50 $(call agent, pico, 0x20000400, M0) 51 52 $(call program,picoboot,tools/picoboot.c) 53 54 # tool to pack the agents into a source file 55 SRCS := tools/mkbuiltins.c 56 $(call program,mkbuiltins,$(SRCS)) 57 58 AGENT_BINS := $(patsubst %,out/agent-%.bin,$(AGENTS)) 59 60 out/builtins.c: $(AGENT_BINS) bin/mkbuiltins 61 @mkdir -p $(dir $@) 62 @echo generate $@ 63 $(QUIET)./bin/mkbuiltins $(AGENT_BINS) > $@ 64 endif 65 66 -include $(DEPS) 67 68 all: $(ALL) 69 70 clean:: 71 rm -rf out bin