xref: /titanic_41/usr/src/cmd/fs.d/udfs/fsdb/Makefile (revision 59ac0c1669407488b67ae9e273667a340dccc611)
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#pragma ident	"%Z%%M%	%I%	%E% SMI"
23#
24# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
25# Use is subject to license terms.
26#
27
28FSTYPE=		udfs
29LIBPROG=	fsdb
30
31include		../../Makefile.fstype
32
33CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
34LDLIBS += -lmalloc -ll -ladm
35LDFLAGS += $(MAPFILE.NGB:%=-M%)
36YFLAGS="-d"
37
38LINTFLAGS += -erroff=E_STATIC_UNUSED
39LINTFLAGS64 += -erroff=E_STATIC_UNUSED
40
41SRCS=	fsdb.c ud_lib.c
42
43fsdb : fsdb_yacc.o fsdb_lex.o ud_lib.o fsdb.o $(MAPFILE.NGB)
44	$(LINK.c) -o $@ fsdb.o fsdb_yacc.o fsdb_lex.o \
45			ud_lib.o $(LDLIBS)
46	$(POST_PROCESS)
47
48fsdb.o : fsdb.c
49	$(COMPILE.c) -o $@ fsdb.c
50	$(POST_PROCESS_O)
51
52ud_lib.o : ../fstyp/ud_lib.c
53	$(RM) ud_lib.c
54	$(CP) ../fstyp/ud_lib.c ud_lib.c
55	$(RM) ud_lib.h
56	$(CP) ../fstyp/ud_lib.h ud_lib.h
57	$(COMPILE.c) -o $@ ud_lib.c
58	$(POST_PROCESS_O)
59
60y.tab.c : fsdb_yacc.y
61	$(YACC.y) fsdb_yacc.y
62
63fsdb_yacc.o : y.tab.c
64	$(COMPILE.c) -o $@ y.tab.c
65	$(POST_PROCESS_O)
66
67lex.yy.c : fsdb_lex.l
68	$(LEX) -e fsdb_lex.l
69
70fsdb_lex.o : lex.yy.c
71	$(COMPILE.c) -o $@ lex.yy.c
72	$(POST_PROCESS_O)
73
74clean :
75	$(RM) ud_lib.c ud_lib.h fsdb.o ud_lib.o fsdb_yacc.o fsdb_lex.o
76	$(RM) fsdb_yacc.c fsdb_lex.c y.tab.c y.tab.h lex.yy.c
77
78# for messaging catalog
79#
80POFILE= fsdb.po
81
82# for messaging catalog
83#
84catalog:        $(POFILE)
85
86CATSRCS=	$(SRCS) lex.yy.c y.tab.c
87
88$(POFILE):      $(CATSRCS)
89	$(RM) $@
90	$(COMPILE.cpp) $(CATSRCS)   > $(POFILE).i
91	$(XGETTEXT) $(XGETFLAGS)        $(POFILE).i
92	$(SED) "/^domain/d" messages.po >  $@
93	$(RM) $(POFILE).i messages.po
94
95lint: y.tab.c lex.yy.c
96	$(RM) ud_lib.h
97	$(CP) ../fstyp/ud_lib.h ud_lib.h
98	$(RM) ud_lib.c
99	$(CP) ../fstyp/ud_lib.c ud_lib.c
100	$(LINT.c) -mu $(SRCS)
101
102putback :
103	-cstyle -p fsdb.c
104	-keywords fsdb.c
105	-keywords Makefile
106
107