From 63b03f5222f0ab5e9c8dc5dc63c8ed8a63884438 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Mon, 15 May 2017 18:04:46 +0200 Subject: allow overloading of LDFLAGS (for -f elf on OSX, -f elf32 on Linux) --- src/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Makefile') diff --git a/src/Makefile b/src/Makefile index c2b91fa..bb8aafc 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,6 +1,7 @@ CC := gcc CFLAGS := -std=c99 -m32 -ffreestanding -O0 -g -Wall -Werror LD := ld +LDFLAGS := -f elf32 all: image.bin @@ -42,7 +43,7 @@ serial.o: serial.c serial.h $(CC) $(CFLAGS) -c -o serial.o serial.c port_asm.o: port.asm - nasm port.asm -f elf32 -o port_asm.o + nasm port.asm $(LDFLAGS) -o port_asm.o string.o: string.c string.h $(CC) $(CFLAGS) -c -o string.o string.c -- cgit v1.2.3-54-g00ecf