1# CDDL HEADER START
2#
3# The contents of this file are subject to the terms of the
4# Common Development and Distribution License (the "License").
5# You may not use this file except in compliance with the License.
6#
7# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8# or http://www.opensolaris.org/os/licensing.
9# See the License for the specific language governing permissions
10# and limitations under the License.
11#
12# When distributing Covered Code, include this CDDL HEADER in each
13# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
14# If applicable, add the following below this CDDL HEADER, with the
15# fields enclosed by brackets "[]" replaced with your own identifying
16# information: Portions Copyright [yyyy] [name of copyright owner]
17#
18# CDDL HEADER END
19#
20#
21# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
22# Use is subject to license terms.
23#
24# lib/libunistat/Makefile
25
26include		../Makefile.lib
27
28UTSBASE= ../../uts
29
30SUBDIRS=	$(MACH)
31
32all :=		TARGET= all
33clean :=	TARGET= clean
34clobber :=	TARGET= clobber
35delete :=	TARGET= delete
36install :=	TARGET= install
37lint :=		TARGET= lint
38lintinter :=		TARGET= lintinter
39_msg :=		TARGET= _msg
40package :=	TARGET= package
41
42LIBRARY= 	libunistat.a
43
44HDRS=		spcs_dtrinkets.h \
45		spcs_etrinkets.h \
46		spcs_errors.h \
47		spcs_etext.h
48HDRDIR=		common
49
50ROOTHDRDIR=	$(ROOT)/usr/include/sys/unistat
51ROOTHDRS=	$(HDRS:%=$(ROOTHDRDIR)/%)
52
53.KEEP_STATE:
54
55all clean clobber delete lint package lintinter: $(SUBDIRS)
56
57install: $(SUBDIRS)
58install_h: $(ROOTHDRDIR) $(ROOTHDRS)
59
60check:
61
62# install rule for install_h target
63$(ROOTHDRDIR):
64	$(INS.dir)
65
66$(ROOTHDRDIR)/spcs_errors.h: $(MACH)/spcs_errors.h
67	$(INS.file) $(MACH)/spcs_errors.h
68
69$(MACH)/spcs_errors.h:	FRC
70	@ cd $(MACH); pwd; $(MAKE) spcs_errors.h
71
72$(ROOTHDRDIR)/spcs_s_u.h: common/spcs_s_u.h
73	$(INS.file) common/spcs_s_u.h
74
75$(ROOTHDRDIR)/spcs_etext.h: $(MACH)/spcs_etext.h
76	$(INS.file) $(MACH)/spcs_etext.h
77
78$(MACH)/spcs_etext.h:	FRC
79	@ cd $(MACH); pwd; $(MAKE) spcs_etext.h
80
81$(ROOTHDRDIR)/spcs_dtrinkets.h: $(MACH)/spcs_dtrinkets.h
82	$(INS.file) $(MACH)/spcs_dtrinkets.h
83
84$(MACH)/spcs_dtrinkets.h:	FRC
85	@ cd $(MACH); pwd; $(MAKE) spcs_dtrinkets.h
86
87$(ROOTHDRDIR)/spcs_etrinkets.h: $(MACH)/spcs_etrinkets.h
88	$(INS.file) $(MACH)/spcs_etrinkets.h
89
90$(MACH)/spcs_etrinkets.h:	FRC
91	@ cd $(MACH); pwd; $(MAKE) spcs_etrinkets.h
92
93$(MACH) $(MACH64):	FRC
94	@cd $@; pwd; $(MAKE) $(TARGET)
95
96FRC:
97