xref: /illumos-gate/usr/src/cmd/fs.d/udfs/fsdb/Makefile (revision 0e42dee69ed771bf604dd1789fca9d77b5bbe302)
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 2006 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
35YFLAGS="-d"
36
37LINTFLAGS += -erroff=E_STATIC_UNUSED
38LINTFLAGS64 += -erroff=E_STATIC_UNUSED
39
40SRCS=	fsdb.c ud_lib.c
41
42fsdb : fsdb_yacc.o fsdb_lex.o ud_lib.o fsdb.o
43	$(LINK.c) -o $@ fsdb.o fsdb_yacc.o fsdb_lex.o \
44			ud_lib.o $(LDLIBS)
45	$(POST_PROCESS)
46
47fsdb.o : fsdb.c
48	$(COMPILE.c) -o $@ fsdb.c
49	$(POST_PROCESS_O)
50
51ud_lib.o : ../fstyp/ud_lib.c
52	$(RM) ud_lib.c
53	$(CP) ../fstyp/ud_lib.c ud_lib.c
54	$(RM) ud_lib.h
55	$(CP) ../fstyp/ud_lib.h ud_lib.h
56	$(COMPILE.c) -o $@ ud_lib.c
57	$(POST_PROCESS_O)
58
59y.tab.c : fsdb_yacc.y
60	$(YACC.y) fsdb_yacc.y
61
62fsdb_yacc.o : y.tab.c
63	$(COMPILE.c) -o $@ y.tab.c
64	$(POST_PROCESS_O)
65
66lex.yy.c : fsdb_lex.l
67	$(LEX) -e fsdb_lex.l
68
69fsdb_lex.o : lex.yy.c
70	$(COMPILE.c) -o $@ lex.yy.c
71	$(POST_PROCESS_O)
72
73clean :
74	$(RM) ud_lib.c ud_lib.h fsdb.o ud_lib.o fsdb_yacc.o fsdb_lex.o
75	$(RM) fsdb_yacc.c fsdb_lex.c y.tab.c y.tab.h lex.yy.c
76
77# for messaging catalog
78#
79POFILE= fsdb.po
80
81# for messaging catalog
82#
83catalog:        $(POFILE)
84
85CATSRCS=	$(SRCS) lex.yy.c y.tab.c
86
87$(POFILE):      $(CATSRCS)
88	$(RM) $@
89	$(COMPILE.cpp) $(CATSRCS)   > $(POFILE).i
90	$(XGETTEXT) $(XGETFLAGS)        $(POFILE).i
91	$(SED) "/^domain/d" messages.po >  $@
92	$(RM) $(POFILE).i messages.po
93
94lint: y.tab.c lex.yy.c
95	$(RM) ud_lib.h
96	$(CP) ../fstyp/ud_lib.h ud_lib.h
97	$(RM) ud_lib.c
98	$(CP) ../fstyp/ud_lib.c ud_lib.c
99	$(LINT.c) -mu $(SRCS)
100
101putback :
102	-cstyle -p fsdb.c
103	-keywords fsdb.c
104	-keywords Makefile
105
106