libefi: Add definitions and utilities for EFI drivers
[unleashed.git] / usr / src / boot / sys / boot / efi / libefi / Makefile
blob407d24ec2d1f57fc24f8218fa685ae07959f34a2
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 devpath.c efi_console.c efinet.c efipart.c env.c errno.c \
28 handles.c libefi.c time.c wchar.c efi_driver_utils.c
30 #.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
31 #SRCS += time.c
32 #.elif ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm"
33 #SRCS+= time_event.c
34 #.endif
36 OBJS= $(SRCS:%.c=%.o)
38 CPPFLAGS= -DTERM_EMU -D_STANDALONE
39 CFLAGS = -O2
41 #.if ${MACHINE_CPUARCH} == "aarch64"
42 #CFLAGS+= -msoft-float -mgeneral-regs-only
43 #.endif
44 #.if ${MACHINE_ARCH} == "amd64"
45 CFLAGS += -fPIC
46 #.endif
48 CFLAGS += -nostdinc -I. -I../../../../include -I../../..
49 CFLAGS += -I$(SRC)/common/ficl -I../../ficl
50 CFLAGS += -I../include
51 CFLAGS += -I../include/${MACH64}
52 CFLAGS += -I../../../../lib/libstand
54 # Pick up the bootstrap header for some interface items
55 CFLAGS += -I../../common
57 # Handle FreeBSD specific %b and %D printf format specifiers
58 # CFLAGS+= ${FORMAT_EXTENSIONS}
59 # CFLAGS += -D__printf__=__freebsd_kprintf__
60 CFLAGS+= -DTERM_EMU
62 include ../Makefile.inc
64 lib$(LIB).a: $(SRCS) $(OBJS)
65 $(AR) $(ARFLAGS) $@ $(OBJS)
67 clean: clobber
68 clobber:
69 $(RM) $(CLEANFILES) $(OBJS) machine x86 lib$(LIB).a
71 machine:
72 $(RM) machine
73 $(SYMLINK) ../../../amd64/include machine
75 x86:
76 $(RM) x86
77 $(SYMLINK) ../../../x86/include x86
79 $(OBJS): machine x86