xref: /titanic_51/usr/src/lib/libzpool/Makefile.com (revision 491f61a1e1c1fc54a47bbcf53dbbbe1293b93b27)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21#
22# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25
26LIBRARY= libzpool.a
27VERS= .1
28
29# include the list of ZFS sources
30include ../../../uts/common/Makefile.files
31KERNEL_OBJS = kernel.o taskq.o util.o
32LIST_OBJS = list.o
33
34OBJECTS=$(ZFS_COMMON_OBJS) $(ZFS_SHARED_OBJS) $(KERNEL_OBJS) $(LIST_OBJS)
35
36# include library definitions
37include ../../Makefile.lib
38
39ZFS_COMMON_SRCS=	$(ZFS_COMMON_OBJS:%.o=../../../uts/common/fs/zfs/%.c)
40ZFS_SHARED_SRCS=	$(ZFS_SHARED_OBJS:%.o=../../../common/zfs/%.c)
41KERNEL_SRCS=		$(KERNEL_OBJS:%.o=../common/%.c)
42LIST_SRCS=		$(LIST_OBJS:%.o=../../../uts/common/os/%.c)
43
44SRCS=$(ZFS_COMMON_SRCS) $(ZFS_SHARED_SRCS) $(KERNEL_SRCS) $(LIST_SRCS)
45SRCDIR=		../common
46
47# There should be a mapfile here
48MAPFILES =
49
50LIBS +=		$(LINTLIB)
51
52INCS += -I../common
53INCS += -I../../../uts/common/fs/zfs
54INCS += -I../../../common/zfs
55INCS += -I../../../common
56
57$(LINTLIB) := SRCS=	$(SRCDIR)/$(LINTSRC)
58
59C99MODE=	-xc99=%all
60C99LMODE=	-Xc99=%all
61
62CFLAGS +=	-g $(CCVERBOSE) $(CNOGLOBAL)
63CFLAGS64 +=	-g $(CCVERBOSE) $(CNOGLOBAL)
64LDLIBS +=	-lumem -lavl -lnvpair -lz -lc -lsysevent
65CPPFLAGS +=	$(INCS)
66
67.KEEP_STATE:
68
69all: $(LIBS)
70
71lint: $(LINTLIB)
72
73include ../../Makefile.targ
74
75pics/%.o: ../../../uts/common/fs/zfs/%.c
76	$(COMPILE.c) -o $@ $<
77	$(POST_PROCESS_O)
78
79pics/%.o: ../../../common/zfs/%.c
80	$(COMPILE.c) -o $@ $<
81	$(POST_PROCESS_O)
82
83pics/%.o: ../../../uts/common/os/%.c
84	$(COMPILE.c) -o $@ $<
85	$(POST_PROCESS_O)
86