mirror of
https://github.com/TheOfficialFloW/bd-jb
synced 2024-12-12 18:22:15 -05:00
19 lines
361 B
Makefile
19 lines
361 B
Makefile
TARGET = payload
|
|
OBJS = start.o payload.o
|
|
|
|
CC = gcc
|
|
OBJCOPY = objcopy
|
|
CFLAGS = -isystem freebsd-headers/include -Os -fno-stack-protector
|
|
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)
|