Debian Codegraph @

src/analyzer/Makefile

raw symbols SCIP
1 # pyOCD debugger
2 # Copyright (c) 2018 Arm Limited
3 # SPDX-License-Identifier: Apache-2.0
4 #
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
8 #
9 # http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16
17 PREFIX = arm-none-eabi-
18 CC = $(PREFIX)gcc
19 OBJCOPY = $(PREFIX)objcopy
20
21 TARGET = main.elf
22 TARGET_BIN = main.bin
23 TARGET_PY = main.py
24
25 OBJECTS = main.o
26
27 LIBRARIES =
28
29 INCLUDES =
30
31 CFLAGS = -std=gnu11 -MMD -MP $(INCLUDES) -O3 -fno-common -ffunction-sections \
32 -fdata-sections -Wall -Werror -mcpu=cortex-m0 -mthumb -mfloat-abi=soft -g3 -gdwarf-2 \
33 -gstrict-dwarf -nostdlib -fpic -ffixed-r9
34
35 LDFLAGS = -T"linker_script.ld" -Wl,-Map,gdb_test.map,--gc-sections,-ecompute_crc \
36 -n -nostdlib -fpic -ffixed-r9
37
38 .PHONY: all
39 all: $(TARGET_PY)
40
41 .PHONY: clean
42 clean:
43 rm -f *.o *.d $(TARGET) $(TARGET_BIN) $(TARGET_PY)
44
45 $(TARGET): $(OBJECTS)
46 $(CC) $(LDFLAGS) $(OBJECTS) $(LIBRARIES) -o $@
47
48 $(TARGET_BIN): $(TARGET)
49 $(OBJCOPY) -O binary $(TARGET) $(TARGET_BIN)
50
51 $(TARGET_PY): $(TARGET_BIN)
52 python generate_python.py $(TARGET_BIN) $(TARGET_PY)
53
54 # Include dependency files.
55 -include $(OBJECTS:.o=.d)