9540 libefi: add efienv functions
[unleashed.git] / usr / src / boot / sys / boot / efi / libefi / Makefile
blob0886f0f352d30cd8af5597cedf758541a75f0729
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.
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
19 CC= $(GCC_ROOT)/bin/gcc
21 LIB= efi
23 all: lib$(LIB).a
25 install:
27 SRCS= delay.c \
28 devicename.c \
29 devpath.c \
30 efi_console.c \
31 efi_driver_utils.c \
32 efichar.c \
33 efienv.c \
34 efinet.c \
35 efipart.c \
36 efizfs.c \
37 env.c \
38 errno.c \
39 handles.c \
40 libefi.c \
41 time.c \
42 wchar.c
44 #.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
45 #SRCS += time.c
46 #.elif ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm"
47 #SRCS+= time_event.c
48 #.endif
50 OBJS= $(SRCS:%.c=%.o)
52 CPPFLAGS= -D_STANDALONE
53 CFLAGS = -O2
55 #.if ${MACHINE_CPUARCH} == "aarch64"
56 #CFLAGS+= -msoft-float -mgeneral-regs-only
57 #.endif
58 #.if ${MACHINE_ARCH} == "amd64"
59 CFLAGS += -fPIC
60 #.endif
62 CFLAGS += -nostdinc -I. -I../../../../include -I../../..
63 CFLAGS += -I$(SRC)/common/ficl -I../../ficl
64 CFLAGS += -I../include
65 CFLAGS += -I../include/${MACH64}
66 CFLAGS += -I../../../../lib/libstand
67 CFLAGS += -I./../../zfs
68 CFLAGS += -I./../../../cddl/boot/zfs
70 # Pick up the bootstrap header for some interface items
71 CFLAGS += -I../../common
73 # Handle FreeBSD specific %b and %D printf format specifiers
74 # CFLAGS+= ${FORMAT_EXTENSIONS}
75 # CFLAGS += -D__printf__=__freebsd_kprintf__
76 CFLAGS += -DTERM_EMU
78 include ../Makefile.inc
80 lib$(LIB).a: $(SRCS) $(OBJS)
81 $(AR) $(ARFLAGS) $@ $(OBJS)
83 clean: clobber
84 clobber:
85 $(RM) $(CLEANFILES) $(OBJS) machine x86 lib$(LIB).a
87 machine:
88 $(RM) machine
89 $(SYMLINK) ../../../amd64/include machine
91 x86:
92 $(RM) x86
93 $(SYMLINK) ../../../x86/include x86
95 $(OBJS): machine x86