10Sstevel@tonic-gate# 20Sstevel@tonic-gate# CDDL HEADER START 30Sstevel@tonic-gate# 40Sstevel@tonic-gate# The contents of this file are subject to the terms of the 5*2522Sraf# Common Development and Distribution License (the "License"). 6*2522Sraf# You may not use this file except in compliance with the License. 70Sstevel@tonic-gate# 80Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate# See the License for the specific language governing permissions 110Sstevel@tonic-gate# and limitations under the License. 120Sstevel@tonic-gate# 130Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate# 190Sstevel@tonic-gate# CDDL HEADER END 200Sstevel@tonic-gate# 210Sstevel@tonic-gate# 22*2522Sraf# Copyright 2006 Sun Microsystems, Inc. All rights reserved. 230Sstevel@tonic-gate# Use is subject to license terms. 240Sstevel@tonic-gate# 250Sstevel@tonic-gate# ident "%Z%%M% %I% %E% SMI" 260Sstevel@tonic-gate# 27*2522Sraf 280Sstevel@tonic-gateLIBRARY= libdump.a 290Sstevel@tonic-gate 300Sstevel@tonic-gate# Has to be before include of Makefile.backup 310Sstevel@tonic-gate# This should be POFILE=libdump.po, but that causes make to 320Sstevel@tonic-gate# fall over due to some seriously weird interactions in the 330Sstevel@tonic-gate# various indirectly-included makefiles. So, since this works 340Sstevel@tonic-gate# and is otherwise harmless, we fake it. 350Sstevel@tonic-gatePROG= libdump 360Sstevel@tonic-gate 370Sstevel@tonic-gate# Include library definitions, then backup definitions, as in general 380Sstevel@tonic-gate# we want the flags and such from our tree. 390Sstevel@tonic-gate 400Sstevel@tonic-gateinclude ../../../lib/Makefile.lib 410Sstevel@tonic-gateinclude ../Makefile.backup 420Sstevel@tonic-gate 43*2522SrafSRCDIR = . 44*2522Sraf 450Sstevel@tonic-gate# Specifically request the construction of a static library. 460Sstevel@tonic-gate# This library is not installed in the proto area. 470Sstevel@tonic-gateLIBS= $(LIBRARY) 480Sstevel@tonic-gate 490Sstevel@tonic-gateHDRS= ../include/byteorder.h \ 500Sstevel@tonic-gate ../include/memutils.h ../include/myrcmd.h \ 510Sstevel@tonic-gate ../../../head/protocols/dumprestore.h \ 520Sstevel@tonic-gate ../include/rmt.h 530Sstevel@tonic-gate 540Sstevel@tonic-gateYFILE= getdate.y 550Sstevel@tonic-gateYSRC= getdate.c 560Sstevel@tonic-gate 570Sstevel@tonic-gateCLOBBERFILES= $(YSRC) $(GLIB) *.ln 580Sstevel@tonic-gate 590Sstevel@tonic-gateLOBJS= rmtlib.o myrcmd.o \ 600Sstevel@tonic-gate $(YSRC:%.c=%.o) \ 610Sstevel@tonic-gate byteorder.o memutils.o $(RPC_CLNT:%.c=%.o) $(RPC_XDR:%.c=%.o) 620Sstevel@tonic-gate 630Sstevel@tonic-gateOBJECTS= $(LOBJS) 640Sstevel@tonic-gatePOFILES= $(OBJECTS:.o=.po) 650Sstevel@tonic-gateGENERAL= ../include 660Sstevel@tonic-gateGLOBAL= ../../../head 670Sstevel@tonic-gateCPPFLAGS= -I$(GENERAL) -I$(GLOBAL) $(CPPFLAGS.master) 680Sstevel@tonic-gateLINTOUT= lint.out 690Sstevel@tonic-gateCLEANFILES= $(OBJECTS) $(LINTOUT) $(LINTLIB) $(DEBUGS) *.ln \ 700Sstevel@tonic-gate $(YSRC) $(LIBRARY) 710Sstevel@tonic-gateLINTFLAGS += -y 720Sstevel@tonic-gate 730Sstevel@tonic-gate# support for -g library 740Sstevel@tonic-gateGLIB= libdump_g.a 750Sstevel@tonic-gateDEBUGS= $(OBJECTS:%=.debug/%) 760Sstevel@tonic-gate$(GLIB):= AROBJS = $(DEBUGS) 770Sstevel@tonic-gate$(GLIB):= DIR = .debug 780Sstevel@tonic-gate$(GLIB):= CFLAGS= -g $(XESS) -DDEBUG -DYYDEBUG ${SBFLAGS} 790Sstevel@tonic-gate 800Sstevel@tonic-gate.KEEP_STATE: 810Sstevel@tonic-gate 820Sstevel@tonic-gateall: $(LIBS) 830Sstevel@tonic-gate 840Sstevel@tonic-gatedebug: $(LIBS) $(GLIB) 850Sstevel@tonic-gate 860Sstevel@tonic-gate.debug: 870Sstevel@tonic-gate -@mkdir -p $@ 880Sstevel@tonic-gate 890Sstevel@tonic-gate.debug/%.o: %.c 900Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 910Sstevel@tonic-gate $(POST_PROCESS_O) 920Sstevel@tonic-gate 930Sstevel@tonic-gate$(GLIB): .debug $$(DEBUGS) 940Sstevel@tonic-gate $(BUILD.AR) 950Sstevel@tonic-gate $(POST_PROCESS_A) 960Sstevel@tonic-gate 970Sstevel@tonic-gate$(OBJECTS): $(HDRS) 980Sstevel@tonic-gate 990Sstevel@tonic-gateinstall: all 1000Sstevel@tonic-gate 1010Sstevel@tonic-gate$(POFILE): $(POFILES) 1020Sstevel@tonic-gate $(RM) $@; cat $(POFILES) > $@ 1030Sstevel@tonic-gate 1040Sstevel@tonic-gate# rpcgen produces unused local variables that we can't easily suppress. 1050Sstevel@tonic-gate# It is also stupid about 32/64 bit integers. Since we don't support 1060Sstevel@tonic-gate# the RPC subsystem any more, just ignore complaints about it all. 1070Sstevel@tonic-gate# We have no control over yaccpar, and it has lots of 32/64 complaints. 1080Sstevel@tonic-gate# Assumes lint run with -s argument 1090Sstevel@tonic-gatelint: lint.out 1100Sstevel@tonic-gate sed -f lint.sed lint.out 1110Sstevel@tonic-gate 1120Sstevel@tonic-gatelint.out: $(LINTLIB) 1130Sstevel@tonic-gate 1140Sstevel@tonic-gatecheck: $(HDRS) 1150Sstevel@tonic-gate $(CSTYLE) $(CSTYLEFLAGS) `echo $(SRCS) | sed -e s/getdate.c//` $(HDRS) 1160Sstevel@tonic-gate $(HDRCHK) $(HDRCHKFLAGS) $(HDRS) 1170Sstevel@tonic-gate 1180Sstevel@tonic-gate# include library targets 1190Sstevel@tonic-gateinclude ../../../lib/Makefile.targ 1200Sstevel@tonic-gate 1210Sstevel@tonic-gate_msg: $(POFILE) 122