bd-jb/payload/Makefile

19 lines
421 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
2024-12-06 07:57:11 -05:00
CFLAGS = -DSMP -isystem freebsd-headers/include -Wl,--build-id=none -Os -fno-stack-protector -fcf-protection=none -fpic -fpie
LDFLAGS = -T linker.ld -nostartfiles -nostdlib
2021-10-24 11:23:44 -04:00
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)