mirror of
https://github.com/TheOfficialFloW/bd-jb
synced 2024-11-22 08:52:15 -05:00
20 lines
348 B
Makefile
20 lines
348 B
Makefile
TARGET = payload
|
|
OBJS = start.o payload.o
|
|
|
|
CC = gcc
|
|
AS = as
|
|
OBJCOPY = objcopy
|
|
CFLAGS = -Os -fno-stack-protector -fpic -fpie
|
|
LDFLAGS = -T linker.x -nostdlib -nostartfiles
|
|
|
|
all: $(TARGET).bin
|
|
|
|
%.bin: %.elf
|
|
$(OBJCOPY) -S -O binary $^ $@
|
|
|
|
$(TARGET).elf: $(OBJS)
|
|
$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
|
|
|
|
clean:
|
|
@rm -f $(TARGET).bin $(TARGET).elf $(OBJS)
|