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 40eee96f10SToomas 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-variable 477014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-value 487014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-function 497014882cSRichard Lowe 50*33efde42SToomas Soome# because of labels from yacc 51*33efde42SToomas Soomefsdb_yacc.o fsdb_lex.o := CERRWARN += -_gcc=-Wno-unused-label 528509e9caSToomas Soome 535661bb76SJohn Levon# not linted 545661bb76SJohn LevonSMATCH=off 555661bb76SJohn Levon 56eee96f10SToomas SoomeSRCS= fsdb.c ../common/ud_lib.c 577c478bd9Sstevel@tonic-gate 58df4628cbSriefsdb : fsdb_yacc.o fsdb_lex.o ud_lib.o fsdb.o $(MAPFILES) 597c478bd9Sstevel@tonic-gate $(LINK.c) -o $@ fsdb.o fsdb_yacc.o fsdb_lex.o \ 607c478bd9Sstevel@tonic-gate ud_lib.o $(LDLIBS) 617c478bd9Sstevel@tonic-gate $(POST_PROCESS) 627c478bd9Sstevel@tonic-gate 637c478bd9Sstevel@tonic-gatefsdb.o : fsdb.c 647c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ fsdb.c 657c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 667c478bd9Sstevel@tonic-gate 67eee96f10SToomas Soomeud_lib.o : ../common/ud_lib.c ../common/ud_lib.h 68eee96f10SToomas Soome $(COMPILE.c) -o $@ ../common/ud_lib.c 697c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 707c478bd9Sstevel@tonic-gate 717c478bd9Sstevel@tonic-gatey.tab.c : fsdb_yacc.y 727c478bd9Sstevel@tonic-gate $(YACC.y) fsdb_yacc.y 737c478bd9Sstevel@tonic-gate 747c478bd9Sstevel@tonic-gatefsdb_yacc.o : y.tab.c 757c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ y.tab.c 767c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 777c478bd9Sstevel@tonic-gate 787c478bd9Sstevel@tonic-gatelex.yy.c : fsdb_lex.l 797c478bd9Sstevel@tonic-gate $(LEX) -e fsdb_lex.l 807c478bd9Sstevel@tonic-gate 817c478bd9Sstevel@tonic-gatefsdb_lex.o : lex.yy.c 827c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ lex.yy.c 837c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 847c478bd9Sstevel@tonic-gate 857c478bd9Sstevel@tonic-gateclean : 868509e9caSToomas Soome $(RM) fsdb.o ud_lib.o fsdb_yacc.o fsdb_lex.o 877c478bd9Sstevel@tonic-gate $(RM) fsdb_yacc.c fsdb_lex.c y.tab.c y.tab.h lex.yy.c 887c478bd9Sstevel@tonic-gate 897c478bd9Sstevel@tonic-gate# for messaging catalog 907c478bd9Sstevel@tonic-gate# 917c478bd9Sstevel@tonic-gatePOFILE= fsdb.po 927c478bd9Sstevel@tonic-gate 937c478bd9Sstevel@tonic-gate# for messaging catalog 947c478bd9Sstevel@tonic-gate# 957c478bd9Sstevel@tonic-gatecatalog: $(POFILE) 967c478bd9Sstevel@tonic-gate 977c478bd9Sstevel@tonic-gateCATSRCS= $(SRCS) lex.yy.c y.tab.c 987c478bd9Sstevel@tonic-gate 99eee96f10SToomas Soome$(POFILE): $(CATSRCS) ../common/ud_lib.h 1007c478bd9Sstevel@tonic-gate $(RM) $@ 1017c478bd9Sstevel@tonic-gate $(COMPILE.cpp) $(CATSRCS) > $(POFILE).i 1027c478bd9Sstevel@tonic-gate $(XGETTEXT) $(XGETFLAGS) $(POFILE).i 1037c478bd9Sstevel@tonic-gate $(SED) "/^domain/d" messages.po > $@ 1047c478bd9Sstevel@tonic-gate $(RM) $(POFILE).i messages.po 105