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>
14 # Copyright 2016 RackTop Systems.
17 include $(SRC
)/Makefile.master
20 CPPFLAGS
= -nostdinc
-I..
/..
/..
/..
/include -I..
/..
/..
21 CPPFLAGS
+= -I..
/..
/..
/..
/lib
/libz
22 CPPFLAGS
+= -I..
/..
/zfs
23 CPPFLAGS
+= -D_STANDALONE
25 all install: libi386.a
29 $(RM
) machine x86
$(OBJS
) libi386.a
31 AS
= $(GNU_ROOT
)/bin
/gas
32 CC
= $(GNUC_ROOT
)/bin
/gcc
33 OBJCOPY
= $(GNU_ROOT
)/bin
/gobjcopy
37 COMPILE.s
= $(AS
) $(AS_FLAGS
)
106 PNGLITE
=$(SRC
)/common
/pnglite
107 VGASUBR
=$(SRC
)/common
/vga
108 CPPFLAGS
+= -I
$(PNGLITE
)
109 SRCS
+= $(COMMON
)/gfx_fb.c
$(PNGLITE
)/pnglite.c
110 OBJS
+= gfx_fb.o pnglite.o
112 SRCS
+= $(LIBZFS
)/devicename_stubs.c
113 OBJS
+= devicename_stubs.o
115 BOOT_COMCONSOLE_PORT
= 0x3f8
116 CFLAGS
+= -DCOMPORT
=${BOOT_COMCONSOLE_PORT}
118 BOOT_COMCONSOLE_SPEED
= 9600
119 CFLAGS
+= -DCOMSPEED
=${BOOT_COMCONSOLE_SPEED}
121 # Make the disk code more talkative
122 # CFLAGS+= -DDISK_DEBUG
124 # Export serial numbers, UUID, and asset tag from loader.
125 smbios.o
:= CFLAGS
+= -DSMBIOS_SERIAL_NUMBERS
126 # Use little-endian UUID format as defined in SMBIOS 2.6.
127 smbios.o
:= CFLAGS
+= -DSMBIOS_LITTLE_ENDIAN_UUID
128 # Use network-endian UUID format for backward compatibility.
129 #CFLAGS += -DSMBIOS_NETWORK_ENDIAN_UUID
131 # XXX: make alloca() useable
132 CFLAGS
+= -Dalloca
=__builtin_alloca
134 CFLAGS
+= -I
$(SRC
)/common
/ficl
-I..
/..
/libficl \
135 -I..
/..
/common
-I..
/common \
137 -I
$(SRCTOP
)/arch
/x86
/include/sys
/acpi \
139 # the location of libstand
140 CFLAGS
+= -I..
/..
/..
/..
/lib
/libstand
/
142 # Handle FreeBSD specific %b and %D printf format specifiers
143 #FORMAT_EXTENSIONS=-D__printf__=__freebsd_kprintf__
144 #CFLAGS += ${FORMAT_EXTENSIONS}
146 CLEANFILES
+= machine x86
148 # XXX: clang integrated-as doesn't grok .codeNN directives yet
149 # CFLAGS.amd64_tramp.S= ${CLANG_NO_IAS}
150 # CFLAGS.multiboot_tramp.S= ${CLANG_NO_IAS}
151 # CFLAGS += ${CFLAGS.${.IMPSRC:T}}
153 include ..
/Makefile.inc
155 # For multiboot2.h, must be last, to avoid conflicts
156 CPPFLAGS
+= -I
$(SRCTOP
)/include
160 $(SYMLINK
) ..
/..
/..
/i386
/include machine
164 $(SYMLINK
) ..
/..
/..
/x86
/include x86
169 $(AR
) $(ARFLAGS
) $@
$(OBJS
)
172 $(COMPILE.c
) -o
$@
$<
175 $(COMPILE.c
) -o
$@
$<
178 $(COMPILE.c
) -o
$@
$<
181 $(COMPILE.c
) -o
$@
$<