xref: /illumos-gate/usr/src/lib/libfakekernel/Makefile.com (revision 4c28a617e3922d92a58e813a5b955eb526b9c386)
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 2013 Nexenta Systems, Inc.  All rights reserved.
14# Copyright 2017 RackTop Systems.
15#
16
17LIBRARY =	libfakekernel.a
18VERS =		.1
19
20COBJS = \
21	clock.o \
22	cond.o \
23	copy.o \
24	cred.o \
25	cyclic.o \
26	kiconv.o \
27	kmem.o \
28	kmisc.o \
29	ksid.o \
30	ksocket.o \
31	kstat.o \
32	mutex.o \
33	printf.o \
34	random.o \
35	rwlock.o \
36	sema.o \
37	strext.o \
38	taskq.o \
39	thread.o \
40	uio.o
41
42OBJECTS=	$(COBJS)
43
44include ../../Makefile.lib
45
46# libfakekernel must be installed in the root filesystem for libzpool
47include ../../Makefile.rootfs
48
49SRCDIR=		../common
50
51LIBS =		$(DYNLIB) $(LINTLIB)
52SRCS=   $(COBJS:%.o=$(SRCDIR)/%.c)
53
54$(LINTLIB) :=	SRCS = $(SRCDIR)/$(LINTSRC)
55
56CSTD =       $(CSTD_GNU99)
57C99LMODE =      -Xc99=%all
58
59# Note: need our sys includes _before_ ENVCPPFLAGS, proto etc.
60CPPFLAGS.first += -I../common
61
62CFLAGS +=	$(CCVERBOSE)
63CPPFLAGS += $(INCS) -D_REENTRANT -D_FAKE_KERNEL
64CPPFLAGS += -D_FILE_OFFSET_BITS=64
65
66# Could make this $(NOT_RELEASE_BUILD) but as the main purpose of
67# this library is for debugging, let's always define DEBUG here.
68CPPFLAGS += -DDEBUG
69
70LINTCHECKFLAGS += -erroff=E_INCONS_ARG_DECL2
71LINTCHECKFLAGS += -erroff=E_INCONS_VAL_TYPE_DECL2
72LINTCHECKFLAGS += -erroff=E_INCONS_VAL_TYPE_USED2
73
74LDLIBS += -lumem -lcryptoutil -lsocket -lc
75
76.KEEP_STATE:
77
78all: $(LIBS)
79
80lint: lintcheck
81
82include ../../Makefile.targ
83