xref: /illumos-gate/usr/src/lib/libsmedia/library/Makefile (revision 03831d35f7499c87d51205817c93e9a8d42c4bae)
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 2004 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28# lib/libsmedia/library/Makefile
29
30include		../../Makefile.lib
31
32sparc_ARCHITECTURES = sparc sparcv9
33i386_ARCHITECTURES =    i386 $(BUILD64) amd64
34
35SUBDIRS=	spec .WAIT $($(MACH)_ARCHITECTURES)
36
37all :=		TARGET= all
38clean :=	TARGET= clean
39clobber :=	TARGET= clobber
40delete :=	TARGET= delete
41install :=	TARGET= install
42lint :=		TARGET= lint
43package :=	TARGET= package
44
45LIBRARY= 	libsmedia.a
46TEXT_DOMAIN=	SUNW_OST_OSLIB
47XGETFLAGS=	-a
48POFILE=		$(LIBRARY:.a=.po)
49POFILES=	generic.po
50
51SED=	sed
52GREP=	grep
53CP=	cp
54
55.KEEP_STATE:
56
57all clean delete install lint package: $(SUBDIRS)
58
59clobber : $(SUBDIRS)
60	$(RM) $(CLOBBERFILES)
61
62# definitions for install_h target
63HDRS=           inc/smedia.h
64ROOTHDRDIR=     $(ROOT)/usr/include/sys
65ROOTHDRS=       $(HDRS:inc/%=$(ROOTHDRDIR)/%)
66CHECKHDRS=      $(HDRS:%.h=%.check)
67
68# install rule for install_h target
69
70$(ROOTHDRDIR)/%: inc/%
71	$(INS.file)
72
73install_h: $(ROOTHDRS)
74
75check: $(CHECKHDRS)
76
77$(MACH) $(MACH64) spec :	FRC
78	@cd $@; pwd; $(MAKE) $(TARGET)
79
80catalog: $(MSGDOMAIN) $(POFILE)
81	$(RM) $(MSGDOMAIN)/$(POFILE)
82	$(CP) $(POFILE) $(MSGDOMAIN)
83
84$(POFILE): $(POFILES)
85	$(RM) $@
86	$(CAT) $(POFILES) > $@
87	$(RM) $(POFILES)
88
89$(POFILES):
90	$(RM) messages.po
91	$(XGETTEXT) $(XGETFLAGS) common/*.[ch]
92	$(SED) -e '/^# msg/d' -e '/^domain/d' messages.po > $@
93	$(RM) messages.po
94
95FRC:
96