xref: /onnv-gate/usr/src/lib/libparted/Makefile (revision 13004:a45d99fb2e9b)
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#
23# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
24#
25
26include		../Makefile.lib
27
28SUBDIRS =	$(MACH)
29
30all :=          TARGET= all
31clean :=        TARGET= clean
32clobber :=      TARGET= clobber
33delete :=       TARGET= delete
34install :=      TARGET= install
35_msg :=		TARGET= _msg
36package :=      TARGET= package
37
38LIBRARY= 	libparted.a
39TEXT_DOMAIN=	SUNW_OST_OSLIB
40XGETFLAGS=	-a
41POFILE=		$(LIBRARY:.a=.po)
42POFILES=	generic.po
43
44SED=	sed
45GREP=	grep
46
47# definitions for install_h target
48HDRDIR=		common/include/parted
49HDRS=		constraint.h \
50		crc32.h \
51		debug.h \
52		device.h \
53		disk.h \
54		endian.h \
55		exception.h \
56		filesys.h \
57		geom.h \
58		natmath.h \
59		parted.h \
60		solaris.h \
61		timer.h \
62		unit.h
63ROOTHDRDIR=     $(ROOT)/usr/include/parted
64ROOTHDRS=       $(HDRS:%=$(ROOTHDRDIR)/%)
65
66.KEEP_STATE:
67
68all clean clobber delete install package: $(SUBDIRS)
69
70all install: THIRDPARTYLICENSE
71
72CLOBBERFILES += THIRDPARTYLICENSE
73
74THIRDPARTYLICENSE: $(SRC)/common/GPLDISCLAIMER COPYING
75	$(RM) $@
76	$(CAT) $(SRC)/common/GPLDISCLAIMER COPYING > $@
77
78install_h: $(ROOTHDRDIR) $(ROOTHDRS)
79
80$(ROOTHDRDIR):
81	$(INS.dir)
82
83#
84# This open source is exempt from check
85#
86check:
87
88$(SUBDIRS):      FRC
89	@cd $@; pwd; $(MAKE) $(TARGET)
90
91_msg:	$(MSGDOMAIN) $(POFILE)
92	$(RM) $(MSGDOMAIN)/$(POFILE)
93	$(CP) $(POFILE) $(MSGDOMAIN)
94
95$(POFILE):	$(POFILES)
96	$(RM) $@
97	$(CAT) $(POFILES) > $@
98
99$(POFILES):
100	$(RM) messages.po
101	$(XGETTEXT) $(XGETFLAGS) *.[ch]* */*.[ch]*
102	$(SED) -e '/^# msg/d' -e '/^domain/d' messages.po > $@
103	$(RM) messages.po
104
105$(MSGDOMAIN):
106	$(INS.dir)
107
108FRC:
109
110include	../Makefile.targ
111