You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

18 lines
361 B

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)