-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (27 loc) · 639 Bytes
/
Copy pathMakefile
File metadata and controls
41 lines (27 loc) · 639 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
CC=./xtensa-esp32-elf-gcc-5.2.0/bin/xtensa-esp32-elf-gcc
OBJCOPY=./xtensa-esp32-elf-gcc-5.2.0/bin/xtensa-esp32-elf-objcopy
CFLAGS = -mlongcalls \
-mtext-section-literals \
-Wall \
-nostdlib \
-Os \
LDFLAGS = -nostdlib \
-T smu3.ld \
-lgcc \
DEPS=
OBJS= main.o
NAME=SMUPayload
ELF=$(NAME).elf
BIN=$(NAME).bin
all: $(BIN)
%.o: %.c $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)
%.o: %.S $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)
$(NAME).elf: $(OBJS) smu3.ld
$(CC) -o $@ $(OBJS) $(LDFLAGS)
%.bin: %.elf
$(OBJCOPY) -O binary $< $@
.PHONY: clean
clean:
rm -rf $(ELF) $(BIN) $(OBJS)