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