17c478bd9Sstevel@tonic-gate# 27c478bd9Sstevel@tonic-gate# CDDL HEADER START 37c478bd9Sstevel@tonic-gate# 47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the 50e42dee6Sartem# Common Development and Distribution License (the "License"). 60e42dee6Sartem# You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate# 87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate# and limitations under the License. 127c478bd9Sstevel@tonic-gate# 137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate# 197c478bd9Sstevel@tonic-gate# CDDL HEADER END 207c478bd9Sstevel@tonic-gate# 217c478bd9Sstevel@tonic-gate# 2224da5b34Srie# Copyright 2007 Sun Microsystems, Inc. All rights reserved. 237c478bd9Sstevel@tonic-gate# Use is subject to license terms. 247c478bd9Sstevel@tonic-gate# 257c478bd9Sstevel@tonic-gate 267c478bd9Sstevel@tonic-gateFSTYPE= udfs 277c478bd9Sstevel@tonic-gateLIBPROG= fsdb 287c478bd9Sstevel@tonic-gate 297c478bd9Sstevel@tonic-gateinclude ../../Makefile.fstype 307c478bd9Sstevel@tonic-gate 31df4628cbSrie# fsdb has a name clash with main() and libl.so.1. However, fsdb must 32df4628cbSrie# still export a number of "yy*" (libl) interfaces. Reduce all other symbols 33df4628cbSrie# to local scope. 34df4628cbSrieMAPFILES += $(MAPFILE.INT) $(MAPFILE.LEX) $(MAPFILE.NGB) 35df4628cbSrieMAPOPTS = $(MAPFILES:%=-M%) 36df4628cbSrie 370e42dee6SartemCPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 387c478bd9Sstevel@tonic-gateLDLIBS += -lmalloc -ll -ladm 39df4628cbSrieLDFLAGS += $(MAPOPTS) 407c478bd9Sstevel@tonic-gateYFLAGS = "-d" 417c478bd9Sstevel@tonic-gate 420e42dee6SartemLINTFLAGS += -erroff=E_STATIC_UNUSED 430e42dee6SartemLINTFLAGS64 += -erroff=E_STATIC_UNUSED 440e42dee6Sartem 457014882cSRichard LoweCERRWARN += -_gcc=-Wno-implicit-function-declaration 467014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-label 477014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-variable 487014882cSRichard LoweCERRWARN += -_gcc=-Wno-uninitialized 497014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-value 507014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-function 517014882cSRichard Lowe 527c478bd9Sstevel@tonic-gateSRCS= fsdb.c ud_lib.c 537c478bd9Sstevel@tonic-gate 54df4628cbSriefsdb : fsdb_yacc.o fsdb_lex.o ud_lib.o fsdb.o $(MAPFILES) 557c478bd9Sstevel@tonic-gate $(LINK.c) -o $@ fsdb.o fsdb_yacc.o fsdb_lex.o \ 567c478bd9Sstevel@tonic-gate ud_lib.o $(LDLIBS) 577c478bd9Sstevel@tonic-gate $(POST_PROCESS) 587c478bd9Sstevel@tonic-gate 597c478bd9Sstevel@tonic-gatefsdb.o : fsdb.c 607c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ fsdb.c 617c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 627c478bd9Sstevel@tonic-gate 63*b6805bf7SGordon Rossud_lib.o : ud_lib.c ud_lib.h 647c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ ud_lib.c 657c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 667c478bd9Sstevel@tonic-gate 67*b6805bf7SGordon Rossud_lib.c : ../fstyp/ud_lib.c 68*b6805bf7SGordon Ross $(RM) $@ 69*b6805bf7SGordon Ross $(CP) ../fstyp/ud_lib.c $@ 70*b6805bf7SGordon Ross 71*b6805bf7SGordon Rossud_lib.h : ../fstyp/ud_lib.h 72*b6805bf7SGordon Ross $(RM) $@ 73*b6805bf7SGordon Ross $(CP) ../fstyp/ud_lib.h $@ 74*b6805bf7SGordon Ross 757c478bd9Sstevel@tonic-gatey.tab.c : fsdb_yacc.y 767c478bd9Sstevel@tonic-gate $(YACC.y) fsdb_yacc.y 777c478bd9Sstevel@tonic-gate 787c478bd9Sstevel@tonic-gatefsdb_yacc.o : y.tab.c 797c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ y.tab.c 807c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 817c478bd9Sstevel@tonic-gate 827c478bd9Sstevel@tonic-gatelex.yy.c : fsdb_lex.l 837c478bd9Sstevel@tonic-gate $(LEX) -e fsdb_lex.l 847c478bd9Sstevel@tonic-gate 857c478bd9Sstevel@tonic-gatefsdb_lex.o : lex.yy.c 867c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ lex.yy.c 877c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 887c478bd9Sstevel@tonic-gate 897c478bd9Sstevel@tonic-gateclean : 907c478bd9Sstevel@tonic-gate $(RM) ud_lib.c ud_lib.h fsdb.o ud_lib.o fsdb_yacc.o fsdb_lex.o 917c478bd9Sstevel@tonic-gate $(RM) fsdb_yacc.c fsdb_lex.c y.tab.c y.tab.h lex.yy.c 927c478bd9Sstevel@tonic-gate 937c478bd9Sstevel@tonic-gate# for messaging catalog 947c478bd9Sstevel@tonic-gate# 957c478bd9Sstevel@tonic-gatePOFILE= fsdb.po 967c478bd9Sstevel@tonic-gate 977c478bd9Sstevel@tonic-gate# for messaging catalog 987c478bd9Sstevel@tonic-gate# 997c478bd9Sstevel@tonic-gatecatalog: $(POFILE) 1007c478bd9Sstevel@tonic-gate 1017c478bd9Sstevel@tonic-gateCATSRCS= $(SRCS) lex.yy.c y.tab.c 1027c478bd9Sstevel@tonic-gate 1037c478bd9Sstevel@tonic-gate$(POFILE): $(CATSRCS) 1047c478bd9Sstevel@tonic-gate $(RM) $@ 1057c478bd9Sstevel@tonic-gate $(COMPILE.cpp) $(CATSRCS) > $(POFILE).i 1067c478bd9Sstevel@tonic-gate $(XGETTEXT) $(XGETFLAGS) $(POFILE).i 1077c478bd9Sstevel@tonic-gate $(SED) "/^domain/d" messages.po > $@ 1087c478bd9Sstevel@tonic-gate $(RM) $(POFILE).i messages.po 1097c478bd9Sstevel@tonic-gate 110*b6805bf7SGordon Rosslint: y.tab.c lex.yy.c ud_lib.c ud_lib.h 1117c478bd9Sstevel@tonic-gate $(LINT.c) -mu $(SRCS) 1127c478bd9Sstevel@tonic-gate 1137c478bd9Sstevel@tonic-gateputback : 1147c478bd9Sstevel@tonic-gate -cstyle -p fsdb.c 1157c478bd9Sstevel@tonic-gate -keywords fsdb.c 1167c478bd9Sstevel@tonic-gate -keywords Makefile 1177c478bd9Sstevel@tonic-gate 118