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