xref: /illumos-gate/usr/src/boot/efi/libefi/Makefile.com (revision dd72704bd9e794056c558153663c739e2012d721)
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 2016 Toomas Soome <tsoome@me.com>
14#
15
16include $(SRC)/Makefile.master
17include $(SRC)/boot/Makefile.inc
18
19install:
20
21SRCS +=	delay.c \
22	devicename.c \
23	devpath.c \
24	efi_console.c \
25	efi_driver_utils.c \
26	efichar.c \
27	efienv.c \
28	efinet.c \
29	efipart.c \
30	efizfs.c \
31	env.c \
32	errno.c \
33	gfx_fb.c \
34	handles.c \
35	libefi.c \
36	pnglite.c \
37	wchar.c
38
39OBJS=	$(SRCS:%.c=%.o)
40
41CPPFLAGS += -DEFI
42CPPFLAGS += -I. -I../../../include -I../../../sys
43CPPFLAGS += -I$(SRC)/common/ficl -I../../../libficl
44CPPFLAGS += -I../../include
45CPPFLAGS += -I../../include/$(MACHINE)
46CPPFLAGS += -I../../../libsa
47CPPFLAGS += -I$(ZFSSRC)
48CPPFLAGS += -I../../../sys/cddl/boot/zfs
49
50gfx_fb.o := CPPFLAGS += $(DEFAULT_CONSOLE_COLOR) -I$(LZ4)
51pnglite.o := CPPFLAGS += -I$(ZLIB)
52gfx_fb.o pnglite.o efi_console.o := CPPFLAGS += -I$(PNGLITE)
53
54# Pick up the bootstrap header for some interface items
55CPPFLAGS += -I../../../common
56
57include ../../Makefile.inc
58
59# For multiboot2.h, must be last, to avoid conflicts
60CPPFLAGS +=	-I$(SRC)/uts/common
61
62libefi.a: $(OBJS)
63	$(AR) $(ARFLAGS) $@ $(OBJS)
64
65clean: clobber
66clobber:
67	$(RM) $(CLEANFILES) $(OBJS) libefi.a
68
69machine:
70	$(RM) machine
71	$(SYMLINK) ../../../sys/$(MACHINE)/include machine
72
73x86:
74	$(RM) x86
75	$(SYMLINK) ../../../sys/x86/include x86
76
77%.o:	../%.c
78	$(COMPILE.c) $<
79
80%.o:	../../../common/%.c
81	$(COMPILE.c) $<
82
83%.o:	$(PNGLITE)/%.c
84	$(COMPILE.c) $<
85