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