2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"), version 1.0.
4 # You may only use this file in accordance with the terms of version
7 # A full copy of the text of the CDDL should have accompanied this
8 # source. A copy of the CDDL is also available via the Internet at
9 # http://www.illumos.org/license/CDDL.
13 # Copyright 2015 Toomas Soome <tsoome@me.com>
16 include $(SRC
)/Makefile.master
18 ROOT_BOOT
= $(ROOT
)/boot
20 LD
= $(GNU_ROOT
)/bin
/gld
21 CC
= $(GCC_ROOT
)/bin
/gcc
23 CFLAGS
= -O2
-I..
/common
-march
=i386
-ffreestanding
-mno-mmx
-mno-3dnow
24 CFLAGS
+= -mno-sse
-mno-sse2
-mno-sse3
-msoft-float
-std
=gnu99
-m32
26 CCASFLAGS
= -Wa
,--divide
38 LDFLAGS
=-m elf_i386_sol2
-e start
-Ttext
${ORG} -N
-S
--oformat binary
42 install: $(PROG
:%=$(ROOT_BOOT
)/%)
45 ${LD} ${LDFLAGS} -o
$@
$^
52 $(CC
) $(CFLAGS
) $(CCASFLAGS
) -c
-o
$@
$<