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 5f808c858Sraf# Common Development and Distribution License (the "License"). 6f808c858Sraf# 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# 22f808c858Sraf# Copyright 2006 Sun Microsystems, Inc. All rights reserved. 237c478bd9Sstevel@tonic-gate# Use is subject to license terms. 247c478bd9Sstevel@tonic-gate# 25f808c858Sraf 267c478bd9Sstevel@tonic-gateLIBRARY= libdump.a 277c478bd9Sstevel@tonic-gate 287c478bd9Sstevel@tonic-gate# Has to be before include of Makefile.backup 297c478bd9Sstevel@tonic-gate# This should be POFILE=libdump.po, but that causes make to 307c478bd9Sstevel@tonic-gate# fall over due to some seriously weird interactions in the 317c478bd9Sstevel@tonic-gate# various indirectly-included makefiles. So, since this works 327c478bd9Sstevel@tonic-gate# and is otherwise harmless, we fake it. 337c478bd9Sstevel@tonic-gatePROG= libdump 347c478bd9Sstevel@tonic-gate 357c478bd9Sstevel@tonic-gate# Include library definitions, then backup definitions, as in general 367c478bd9Sstevel@tonic-gate# we want the flags and such from our tree. 377c478bd9Sstevel@tonic-gate 387c478bd9Sstevel@tonic-gateinclude ../../../lib/Makefile.lib 397c478bd9Sstevel@tonic-gateinclude ../Makefile.backup 407c478bd9Sstevel@tonic-gate 41f808c858SrafSRCDIR = . 42f808c858Sraf 437c478bd9Sstevel@tonic-gate# Specifically request the construction of a static library. 447c478bd9Sstevel@tonic-gate# This library is not installed in the proto area. 457c478bd9Sstevel@tonic-gateLIBS= $(LIBRARY) 467c478bd9Sstevel@tonic-gate 477c478bd9Sstevel@tonic-gateHDRS= ../include/byteorder.h \ 487c478bd9Sstevel@tonic-gate ../include/memutils.h ../include/myrcmd.h \ 497c478bd9Sstevel@tonic-gate ../../../head/protocols/dumprestore.h \ 507c478bd9Sstevel@tonic-gate ../include/rmt.h 517c478bd9Sstevel@tonic-gate 527c478bd9Sstevel@tonic-gateYFILE= getdate.y 537c478bd9Sstevel@tonic-gateYSRC= getdate.c 547c478bd9Sstevel@tonic-gate 55b6805bf7SGordon RossCLOBBERFILES += $(LIBS) $(GLIB) 567c478bd9Sstevel@tonic-gate 577c478bd9Sstevel@tonic-gateLOBJS= rmtlib.o myrcmd.o \ 587c478bd9Sstevel@tonic-gate $(YSRC:%.c=%.o) \ 597c478bd9Sstevel@tonic-gate byteorder.o memutils.o $(RPC_CLNT:%.c=%.o) $(RPC_XDR:%.c=%.o) 607c478bd9Sstevel@tonic-gate 617c478bd9Sstevel@tonic-gateOBJECTS= $(LOBJS) 627c478bd9Sstevel@tonic-gatePOFILES= $(OBJECTS:.o=.po) 637c478bd9Sstevel@tonic-gateGENERAL= ../include 647c478bd9Sstevel@tonic-gateGLOBAL= ../../../head 657c478bd9Sstevel@tonic-gateCPPFLAGS= -I$(GENERAL) -I$(GLOBAL) $(CPPFLAGS.master) 667014882cSRichard LoweCERRWARN += -_gcc=-Wno-implicit-function-declaration 677014882cSRichard LoweCERRWARN += -_gcc=-Wno-parentheses 687014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-label 697014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-variable 70241c90a0SRichard LoweCLEANFILES= $(OBJECTS) $(DEBUGS) $(YSRC) $(LIBRARY) 717c478bd9Sstevel@tonic-gate 727c478bd9Sstevel@tonic-gate# support for -g library 737c478bd9Sstevel@tonic-gateGLIB= libdump_g.a 747c478bd9Sstevel@tonic-gateDEBUGS= $(OBJECTS:%=.debug/%) 757c478bd9Sstevel@tonic-gate$(GLIB):= AROBJS = $(DEBUGS) 767c478bd9Sstevel@tonic-gate$(GLIB):= DIR = .debug 77*d17be682SRichard Lowe$(GLIB):= CFLAGS= $(CCGDEBUG) -DDEBUG -DYYDEBUG $(SBFLAGS) 787c478bd9Sstevel@tonic-gate 797c478bd9Sstevel@tonic-gate.KEEP_STATE: 807c478bd9Sstevel@tonic-gate 817c478bd9Sstevel@tonic-gateall: $(LIBS) 827c478bd9Sstevel@tonic-gate 837c478bd9Sstevel@tonic-gatedebug: $(LIBS) $(GLIB) 847c478bd9Sstevel@tonic-gate 857c478bd9Sstevel@tonic-gate.debug: 867c478bd9Sstevel@tonic-gate -@mkdir -p $@ 877c478bd9Sstevel@tonic-gate 887c478bd9Sstevel@tonic-gate.debug/%.o: %.c 897c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 907c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 917c478bd9Sstevel@tonic-gate 927c478bd9Sstevel@tonic-gate$(GLIB): .debug $$(DEBUGS) 937c478bd9Sstevel@tonic-gate $(BUILD.AR) 947c478bd9Sstevel@tonic-gate $(POST_PROCESS_A) 957c478bd9Sstevel@tonic-gate 967c478bd9Sstevel@tonic-gate$(OBJECTS): $(HDRS) 977c478bd9Sstevel@tonic-gate 987c478bd9Sstevel@tonic-gateinstall: all 997c478bd9Sstevel@tonic-gate 1007c478bd9Sstevel@tonic-gate$(POFILE): $(POFILES) 1017c478bd9Sstevel@tonic-gate $(RM) $@; cat $(POFILES) > $@ 1027c478bd9Sstevel@tonic-gate 103241c90a0SRichard Lowelint: 1047c478bd9Sstevel@tonic-gate 1057c478bd9Sstevel@tonic-gatecheck: $(HDRS) 1067c478bd9Sstevel@tonic-gate $(CSTYLE) $(CSTYLEFLAGS) `echo $(SRCS) | sed -e s/getdate.c//` $(HDRS) 1077c478bd9Sstevel@tonic-gate $(HDRCHK) $(HDRCHKFLAGS) $(HDRS) 1087c478bd9Sstevel@tonic-gate 1097c478bd9Sstevel@tonic-gate# include library targets 1107c478bd9Sstevel@tonic-gateinclude ../../../lib/Makefile.targ 1117c478bd9Sstevel@tonic-gate 1127c478bd9Sstevel@tonic-gate_msg: $(POFILE) 113