1# 2# Copyright 2020 Espressif Systems (Shanghai) PTE LTD 3# 4# Licensed under the Apache License, Version 2.0 (the "License"); 5# you may not use this file except in compliance with the License. 6# You may obtain a copy of the License at 7# 8# http:#www.apache.org/licenses/LICENSE-2.0 9# 10# Unless required by applicable law or agreed to in writing, software 11# distributed under the License is distributed on an "AS IS" BASIS, 12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13# See the License for the specific language governing permissions and 14# limitations under the License. 15 16CC=gcc 17CFLAGS=-W -fasynchronous-unwind-tables -I. -I../include/ -std=c99 -g -DCONFIG_ESP_SYSTEM_USE_EH_FRAME -m32 18LDFLAGS=-Wl,--eh-frame-hdr -m32 -g -Tlinker.ld -no-pie 19OBJECTS=objs/eh_frame_parser.o objs/main.o 20HEADERS=eh_frame_parser_impl.h 21BIN=eh_frame_test 22 23.PHONY: all clean createdir 24 25all: $(OBJECTS) 26 $(CC) -o $(BIN) $^ $(LDFLAGS) 27 28objs/main.o:main.c 29 @mkdir -p objs 30 $(CC) -o $@ -c $^ $(CFLAGS) 31 32objs/eh_frame_parser.o: ../eh_frame_parser.c 33 @mkdir -p objs 34 $(CC) -o $@ -c $^ $(CFLAGS) 35 36clean: 37 rm -rf objs $(BIN) 38