8809 libzpool should leverage work done in libfakekernel
[unleashed.git] / usr / src / lib / libfakekernel / Makefile.com
blobdd448d45db12b253cdc45fc05c1e480392eb1cf8
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 2013 Nexenta Systems, Inc.  All rights reserved.
14 # Copyright 2017 RackTop Systems.
17 LIBRARY =       libfakekernel.a
18 VERS =          .1
20 COBJS = \
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
42 OBJECTS=        $(COBJS)
44 include ../../Makefile.lib
46 # libfakekernel must be installed in the root filesystem for libzpool
47 include ../../Makefile.rootfs
49 SRCDIR=         ../common
51 LIBS =          $(DYNLIB) $(LINTLIB)
52 SRCS=   $(COBJS:%.o=$(SRCDIR)/%.c)
54 $(LINTLIB) :=   SRCS = $(SRCDIR)/$(LINTSRC)
56 C99MODE =       -xc99=%all
57 C99LMODE =      -Xc99=%all
59 # Note: need our sys includes _before_ ENVCPPFLAGS, proto etc.
60 CPPFLAGS.first += -I../common
62 CFLAGS +=       $(CCVERBOSE)
63 CPPFLAGS += $(INCS) -D_REENTRANT -D_FAKE_KERNEL
64 CPPFLAGS += -D_FILE_OFFSET_BITS=64
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.
68 CPPFLAGS += -DDEBUG
70 LINTCHECKFLAGS += -erroff=E_INCONS_ARG_DECL2
71 LINTCHECKFLAGS += -erroff=E_INCONS_VAL_TYPE_DECL2
72 LINTCHECKFLAGS += -erroff=E_INCONS_VAL_TYPE_USED2
74 LDLIBS += -lumem -lcryptoutil -lsocket -lc
76 .KEEP_STATE:
78 all: $(LIBS)
80 lint: lintcheck
82 include ../../Makefile.targ