dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / usr / src / cmd / fs.d / udfs / fsdb / Makefile
blobd390eb3217253808bef75ee873f23544033e8244
2 # CDDL HEADER START
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.
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.
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]
19 # CDDL HEADER END
22 # Copyright 2007 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
25 # Copyright 2017, Joyent Inc.
28 FSTYPE= udfs
29 LIBPROG= fsdb
31 include ../../Makefile.fstype
33 # fsdb has a name clash with main() and libl.so.1. However, fsdb must
34 # still export a number of "yy*" (libl) interfaces. Reduce all other symbols
35 # to local scope.
36 MAPFILES += $(MAPFILE.INT) $(MAPFILE.LEX) $(MAPFILE.NGB)
37 MAPOPTS = $(MAPFILES:%=-Wl,-M%)
39 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
40 LDLIBS += -lmalloc -ll -ladm
41 LDFLAGS += $(MAPOPTS)
42 YFLAGS = "-d"
45 CERRWARN += -Wno-implicit-function-declaration
46 CERRWARN += -Wno-unused-label
47 CERRWARN += -Wno-unused-variable
48 CERRWARN += -Wno-uninitialized
49 CERRWARN += -Wno-unused-value
50 CERRWARN += -Wno-unused-function
52 SRCS= fsdb.c ud_lib.c
54 fsdb : fsdb_yacc.o fsdb_lex.o ud_lib.o fsdb.o $(MAPFILES)
55 $(LINK.c) -o $@ fsdb.o fsdb_yacc.o fsdb_lex.o \
56 ud_lib.o $(LDLIBS)
57 $(POST_PROCESS)
59 fsdb.o : fsdb.c
60 $(COMPILE.c) -o $@ fsdb.c
61 $(POST_PROCESS_O)
63 ud_lib.o : ud_lib.c ud_lib.h
64 $(COMPILE.c) -o $@ ud_lib.c
65 $(POST_PROCESS_O)
67 ud_lib.c : ../fstyp/ud_lib.c
68 $(RM) $@
69 $(CP) ../fstyp/ud_lib.c $@
71 ud_lib.h : ../fstyp/ud_lib.h
72 $(RM) $@
73 $(CP) ../fstyp/ud_lib.h $@
75 y.tab.c : fsdb_yacc.y
76 $(YACC.y) fsdb_yacc.y
78 fsdb_yacc.o : y.tab.c
79 $(COMPILE.c) -o $@ y.tab.c
80 $(POST_PROCESS_O)
82 lex.yy.c : fsdb_lex.l
83 $(LEX) $(LFLAGS) -e fsdb_lex.l
85 fsdb_lex.o : lex.yy.c
86 $(COMPILE.c) -o $@ lex.yy.c
87 $(POST_PROCESS_O)
89 clean :
90 $(RM) ud_lib.c ud_lib.h fsdb.o ud_lib.o fsdb_yacc.o fsdb_lex.o
91 $(RM) fsdb_yacc.c fsdb_lex.c y.tab.c y.tab.h lex.yy.c
93 # for messaging catalog
95 POFILE= fsdb.po
97 # for messaging catalog
99 catalog: $(POFILE)
101 CATSRCS= $(SRCS) lex.yy.c y.tab.c
103 $(POFILE): $(CATSRCS) ud_lib.h
104 $(RM) $@
105 $(COMPILE.cpp) $(CATSRCS) > $(POFILE).i
106 $(XGETTEXT) $(XGETFLAGS) $(POFILE).i
107 $(SED) "/^domain/d" messages.po > $@
108 $(RM) $(POFILE).i messages.po
110 putback :
111 -cstyle -p fsdb.c
112 -keywords fsdb.c
113 -keywords Makefile