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 557c478bd9Sstevel@tonic-gateCLOBBERFILES= $(YSRC) $(GLIB) *.ln 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) 66*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-implicit-function-declaration 67*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-parentheses 68*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-label 69*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-variable 707c478bd9Sstevel@tonic-gateLINTOUT= lint.out 717c478bd9Sstevel@tonic-gateCLEANFILES= $(OBJECTS) $(LINTOUT) $(LINTLIB) $(DEBUGS) *.ln \ 727c478bd9Sstevel@tonic-gate $(YSRC) $(LIBRARY) 737c478bd9Sstevel@tonic-gateLINTFLAGS += -y 747c478bd9Sstevel@tonic-gate 757c478bd9Sstevel@tonic-gate# support for -g library 767c478bd9Sstevel@tonic-gateGLIB= libdump_g.a 777c478bd9Sstevel@tonic-gateDEBUGS= $(OBJECTS:%=.debug/%) 787c478bd9Sstevel@tonic-gate$(GLIB):= AROBJS = $(DEBUGS) 797c478bd9Sstevel@tonic-gate$(GLIB):= DIR = .debug 807c478bd9Sstevel@tonic-gate$(GLIB):= CFLAGS= -g $(XESS) -DDEBUG -DYYDEBUG ${SBFLAGS} 817c478bd9Sstevel@tonic-gate 827c478bd9Sstevel@tonic-gate.KEEP_STATE: 837c478bd9Sstevel@tonic-gate 847c478bd9Sstevel@tonic-gateall: $(LIBS) 857c478bd9Sstevel@tonic-gate 867c478bd9Sstevel@tonic-gatedebug: $(LIBS) $(GLIB) 877c478bd9Sstevel@tonic-gate 887c478bd9Sstevel@tonic-gate.debug: 897c478bd9Sstevel@tonic-gate -@mkdir -p $@ 907c478bd9Sstevel@tonic-gate 917c478bd9Sstevel@tonic-gate.debug/%.o: %.c 927c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 937c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 947c478bd9Sstevel@tonic-gate 957c478bd9Sstevel@tonic-gate$(GLIB): .debug $$(DEBUGS) 967c478bd9Sstevel@tonic-gate $(BUILD.AR) 977c478bd9Sstevel@tonic-gate $(POST_PROCESS_A) 987c478bd9Sstevel@tonic-gate 997c478bd9Sstevel@tonic-gate$(OBJECTS): $(HDRS) 1007c478bd9Sstevel@tonic-gate 1017c478bd9Sstevel@tonic-gateinstall: all 1027c478bd9Sstevel@tonic-gate 1037c478bd9Sstevel@tonic-gate$(POFILE): $(POFILES) 1047c478bd9Sstevel@tonic-gate $(RM) $@; cat $(POFILES) > $@ 1057c478bd9Sstevel@tonic-gate 1067c478bd9Sstevel@tonic-gate# rpcgen produces unused local variables that we can't easily suppress. 1077c478bd9Sstevel@tonic-gate# It is also stupid about 32/64 bit integers. Since we don't support 1087c478bd9Sstevel@tonic-gate# the RPC subsystem any more, just ignore complaints about it all. 1097c478bd9Sstevel@tonic-gate# We have no control over yaccpar, and it has lots of 32/64 complaints. 1107c478bd9Sstevel@tonic-gate# Assumes lint run with -s argument 1117c478bd9Sstevel@tonic-gatelint: lint.out 1127c478bd9Sstevel@tonic-gate sed -f lint.sed lint.out 1137c478bd9Sstevel@tonic-gate 1147c478bd9Sstevel@tonic-gatelint.out: $(LINTLIB) 1157c478bd9Sstevel@tonic-gate 1167c478bd9Sstevel@tonic-gatecheck: $(HDRS) 1177c478bd9Sstevel@tonic-gate $(CSTYLE) $(CSTYLEFLAGS) `echo $(SRCS) | sed -e s/getdate.c//` $(HDRS) 1187c478bd9Sstevel@tonic-gate $(HDRCHK) $(HDRCHKFLAGS) $(HDRS) 1197c478bd9Sstevel@tonic-gate 1207c478bd9Sstevel@tonic-gate# include library targets 1217c478bd9Sstevel@tonic-gateinclude ../../../lib/Makefile.targ 1227c478bd9Sstevel@tonic-gate 1237c478bd9Sstevel@tonic-gate_msg: $(POFILE) 124