1 #
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
5 # 1.0 of the CDDL.
6 #
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.
10 #
11
12 #
13 # Copyright 2015 Toomas Soome <tsoome@me.com>
14 #
15
16 include $(SRC)/Makefile.master
17
18 CFLAGS= -O2 -I../../../../include -I../../..
19 CFLAGS += -DLOADER_ZFS_SUPPORT
20 CPPFLAGS=
21
22 all: machine x86 libi386.a
23
24 clean: clobber
25 clobber:
26 $(RM) machine x86 $(OBJS) libi386.a
27
28 AS= $(GNU_ROOT)/bin/gas
29 CC= $(GCC_ROOT)/bin/gcc
30 OBJCOPY= $(GNU_ROOT)/bin/gobjcopy
31 AS_FLAGS=--32
32 ASFLAGS=-m32
33 AS_CPPFLAGS=
34 COMPILE.s = $(AS) $(AS_FLAGS)
35
36 SRCS= biosacpi.c bioscd.c biosdisk.c biosmem.c biospnp.c \
37 biospci.c biossmap.c bootinfo.c bootinfo32.c bootinfo64.c \
38 comconsole.c devicename.c elf32_freebsd.c \
39 elf64_freebsd.c multiboot.c multiboot_tramp.S \
40 i386_copy.c i386_module.c nullconsole.c pxe.c pxetramp.s \
41 smbios.c time.c vidconsole.c amd64_tramp.S spinconsole.c linux.c \
42 relocater_tramp.S
88 #FORMAT_EXTENSIONS=-D__printf__=__freebsd_kprintf__
89 #CFLAGS += ${FORMAT_EXTENSIONS}
90
91 CLEANFILES += machine x86
92
93 # XXX: clang integrated-as doesn't grok .codeNN directives yet
94 # CFLAGS.amd64_tramp.S= ${CLANG_NO_IAS}
95 # CFLAGS.multiboot_tramp.S= ${CLANG_NO_IAS}
96 # CFLAGS += ${CFLAGS.${.IMPSRC:T}}
97
98 include ../Makefile.inc
99
100 machine:
101 $(RM) machine
102 $(SYMLINK) ../../../i386/include machine
103
104 x86:
105 $(RM) x86
106 $(SYMLINK) ../../../x86/include x86
107
108 libi386.a: machine $(OBJS)
109 $(AR) $(ARFLAGS) $@ $(OBJS)
110
111 %.o: $(LIBZFS)/%.c
112 $(COMPILE.c) -o $@ $<
|
1 #
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
5 # 1.0 of the CDDL.
6 #
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.
10 #
11
12 #
13 # Copyright 2015 Toomas Soome <tsoome@me.com>
14 # Copyright 2016 RackTop Systems.
15 #
16
17 include $(SRC)/Makefile.master
18
19 CFLAGS= -O2 -I../../../../include -I../../..
20 CFLAGS += -DLOADER_ZFS_SUPPORT
21 CPPFLAGS=
22
23 all: libi386.a
24
25 clean: clobber
26 clobber:
27 $(RM) machine x86 $(OBJS) libi386.a
28
29 AS= $(GNU_ROOT)/bin/gas
30 CC= $(GCC_ROOT)/bin/gcc
31 OBJCOPY= $(GNU_ROOT)/bin/gobjcopy
32 AS_FLAGS=--32
33 ASFLAGS=-m32
34 AS_CPPFLAGS=
35 COMPILE.s = $(AS) $(AS_FLAGS)
36
37 SRCS= biosacpi.c bioscd.c biosdisk.c biosmem.c biospnp.c \
38 biospci.c biossmap.c bootinfo.c bootinfo32.c bootinfo64.c \
39 comconsole.c devicename.c elf32_freebsd.c \
40 elf64_freebsd.c multiboot.c multiboot_tramp.S \
41 i386_copy.c i386_module.c nullconsole.c pxe.c pxetramp.s \
42 smbios.c time.c vidconsole.c amd64_tramp.S spinconsole.c linux.c \
43 relocater_tramp.S
89 #FORMAT_EXTENSIONS=-D__printf__=__freebsd_kprintf__
90 #CFLAGS += ${FORMAT_EXTENSIONS}
91
92 CLEANFILES += machine x86
93
94 # XXX: clang integrated-as doesn't grok .codeNN directives yet
95 # CFLAGS.amd64_tramp.S= ${CLANG_NO_IAS}
96 # CFLAGS.multiboot_tramp.S= ${CLANG_NO_IAS}
97 # CFLAGS += ${CFLAGS.${.IMPSRC:T}}
98
99 include ../Makefile.inc
100
101 machine:
102 $(RM) machine
103 $(SYMLINK) ../../../i386/include machine
104
105 x86:
106 $(RM) x86
107 $(SYMLINK) ../../../x86/include x86
108
109 $(OBJS): machine x86
110
111 libi386.a: $(OBJS)
112 $(AR) $(ARFLAGS) $@ $(OBJS)
113
114 %.o: $(LIBZFS)/%.c
115 $(COMPILE.c) -o $@ $<
|