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# 255661bb76SJohn Levon# Copyright (c) 2018, Joyent, Inc. 269e01f109SJason King# 277c478bd9Sstevel@tonic-gate 287c478bd9Sstevel@tonic-gateFSTYPE= udfs 297c478bd9Sstevel@tonic-gateLIBPROG= fsdb 307c478bd9Sstevel@tonic-gate 317c478bd9Sstevel@tonic-gateinclude ../../Makefile.fstype 327c478bd9Sstevel@tonic-gate 33df4628cbSrie# fsdb has a name clash with main() and libl.so.1. However, fsdb must 34df4628cbSrie# still export a number of "yy*" (libl) interfaces. Reduce all other symbols 35df4628cbSrie# to local scope. 36df4628cbSrieMAPFILES += $(MAPFILE.INT) $(MAPFILE.LEX) $(MAPFILE.NGB) 3785f4cb87SRichard LoweMAPOPTS = $(MAPFILES:%=-Wl,-M%) 38df4628cbSrie 390e42dee6SartemCPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 40*eee96f10SToomas SoomeCPPFLAGS += -I../common 417c478bd9Sstevel@tonic-gateLDLIBS += -lmalloc -ll -ladm 42df4628cbSrieLDFLAGS += $(MAPOPTS) 437c478bd9Sstevel@tonic-gateYFLAGS = "-d" 447c478bd9Sstevel@tonic-gate 457014882cSRichard LoweCERRWARN += -_gcc=-Wno-implicit-function-declaration 467014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-label 477014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-variable 487014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-value 497014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-function 507014882cSRichard Lowe 518509e9caSToomas Soome 525661bb76SJohn Levon# not linted 535661bb76SJohn LevonSMATCH=off 545661bb76SJohn Levon 55*eee96f10SToomas SoomeSRCS= fsdb.c ../common/ud_lib.c 567c478bd9Sstevel@tonic-gate 57df4628cbSriefsdb : fsdb_yacc.o fsdb_lex.o ud_lib.o fsdb.o $(MAPFILES) 587c478bd9Sstevel@tonic-gate $(LINK.c) -o $@ fsdb.o fsdb_yacc.o fsdb_lex.o \ 597c478bd9Sstevel@tonic-gate ud_lib.o $(LDLIBS) 607c478bd9Sstevel@tonic-gate $(POST_PROCESS) 617c478bd9Sstevel@tonic-gate 627c478bd9Sstevel@tonic-gatefsdb.o : fsdb.c 637c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ fsdb.c 647c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 657c478bd9Sstevel@tonic-gate 66*eee96f10SToomas Soomeud_lib.o : ../common/ud_lib.c ../common/ud_lib.h 67*eee96f10SToomas Soome $(COMPILE.c) -o $@ ../common/ud_lib.c 687c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 697c478bd9Sstevel@tonic-gate 707c478bd9Sstevel@tonic-gatey.tab.c : fsdb_yacc.y 717c478bd9Sstevel@tonic-gate $(YACC.y) fsdb_yacc.y 727c478bd9Sstevel@tonic-gate 737c478bd9Sstevel@tonic-gatefsdb_yacc.o : y.tab.c 747c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ y.tab.c 757c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 767c478bd9Sstevel@tonic-gate 777c478bd9Sstevel@tonic-gatelex.yy.c : fsdb_lex.l 787c478bd9Sstevel@tonic-gate $(LEX) -e fsdb_lex.l 797c478bd9Sstevel@tonic-gate 807c478bd9Sstevel@tonic-gatefsdb_lex.o : lex.yy.c 817c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ lex.yy.c 827c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 837c478bd9Sstevel@tonic-gate 847c478bd9Sstevel@tonic-gateclean : 858509e9caSToomas Soome $(RM) fsdb.o ud_lib.o fsdb_yacc.o fsdb_lex.o 867c478bd9Sstevel@tonic-gate $(RM) fsdb_yacc.c fsdb_lex.c y.tab.c y.tab.h lex.yy.c 877c478bd9Sstevel@tonic-gate 887c478bd9Sstevel@tonic-gate# for messaging catalog 897c478bd9Sstevel@tonic-gate# 907c478bd9Sstevel@tonic-gatePOFILE= fsdb.po 917c478bd9Sstevel@tonic-gate 927c478bd9Sstevel@tonic-gate# for messaging catalog 937c478bd9Sstevel@tonic-gate# 947c478bd9Sstevel@tonic-gatecatalog: $(POFILE) 957c478bd9Sstevel@tonic-gate 967c478bd9Sstevel@tonic-gateCATSRCS= $(SRCS) lex.yy.c y.tab.c 977c478bd9Sstevel@tonic-gate 98*eee96f10SToomas Soome$(POFILE): $(CATSRCS) ../common/ud_lib.h 997c478bd9Sstevel@tonic-gate $(RM) $@ 1007c478bd9Sstevel@tonic-gate $(COMPILE.cpp) $(CATSRCS) > $(POFILE).i 1017c478bd9Sstevel@tonic-gate $(XGETTEXT) $(XGETFLAGS) $(POFILE).i 1027c478bd9Sstevel@tonic-gate $(SED) "/^domain/d" messages.po > $@ 1037c478bd9Sstevel@tonic-gate $(RM) $(POFILE).i messages.po 104