bd-jb/payload/Makefile

19 lines
361 B
Makefile
Raw Normal View History

2021-10-24 11:23:44 -04:00
TARGET = payload
OBJS = start.o payload.o
CC = gcc
OBJCOPY = objcopy
CFLAGS = -isystem freebsd-headers/include -Os -fno-stack-protector
2021-10-24 11:23:44 -04:00
LDFLAGS = -T linker.x -nostdlib -nostartfiles
all: $(TARGET).bin
%.bin: %.elf
$(OBJCOPY) -S -O binary $^ $@
2021-10-24 11:23:44 -04:00
$(TARGET).elf: $(OBJS)
$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
clean:
@rm -f $(TARGET).bin $(TARGET).elf $(OBJS)