1*7c478bd9Sstevel@tonic-gate# 2*7c478bd9Sstevel@tonic-gate# CDDL HEADER START 3*7c478bd9Sstevel@tonic-gate# 4*7c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the 5*7c478bd9Sstevel@tonic-gate# Common Development and Distribution License, Version 1.0 only 6*7c478bd9Sstevel@tonic-gate# (the "License"). You may not use this file except in compliance 7*7c478bd9Sstevel@tonic-gate# with the License. 8*7c478bd9Sstevel@tonic-gate# 9*7c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*7c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 11*7c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions 12*7c478bd9Sstevel@tonic-gate# and limitations under the License. 13*7c478bd9Sstevel@tonic-gate# 14*7c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 15*7c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*7c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 17*7c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 18*7c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 19*7c478bd9Sstevel@tonic-gate# 20*7c478bd9Sstevel@tonic-gate# CDDL HEADER END 21*7c478bd9Sstevel@tonic-gate# 22*7c478bd9Sstevel@tonic-gate# 23*7c478bd9Sstevel@tonic-gate# Copyright 2004 Sun Microsystems, Inc. All rights reserved. 24*7c478bd9Sstevel@tonic-gate# Use is subject to license terms. 25*7c478bd9Sstevel@tonic-gate# 26*7c478bd9Sstevel@tonic-gate# ident "%Z%%M% %I% %E% SMI" 27*7c478bd9Sstevel@tonic-gate# 28*7c478bd9Sstevel@tonic-gate# cmd/backup/lib/Makefile 29*7c478bd9Sstevel@tonic-gate# 30*7c478bd9Sstevel@tonic-gateLIBRARY= libdump.a 31*7c478bd9Sstevel@tonic-gate 32*7c478bd9Sstevel@tonic-gate# Has to be before include of Makefile.backup 33*7c478bd9Sstevel@tonic-gate# This should be POFILE=libdump.po, but that causes make to 34*7c478bd9Sstevel@tonic-gate# fall over due to some seriously weird interactions in the 35*7c478bd9Sstevel@tonic-gate# various indirectly-included makefiles. So, since this works 36*7c478bd9Sstevel@tonic-gate# and is otherwise harmless, we fake it. 37*7c478bd9Sstevel@tonic-gatePROG= libdump 38*7c478bd9Sstevel@tonic-gate 39*7c478bd9Sstevel@tonic-gate# Include library definitions, then backup definitions, as in general 40*7c478bd9Sstevel@tonic-gate# we want the flags and such from our tree. 41*7c478bd9Sstevel@tonic-gate 42*7c478bd9Sstevel@tonic-gateinclude ../../../lib/Makefile.lib 43*7c478bd9Sstevel@tonic-gateinclude ../Makefile.backup 44*7c478bd9Sstevel@tonic-gate 45*7c478bd9Sstevel@tonic-gate# Specifically request the construction of a static library. 46*7c478bd9Sstevel@tonic-gate# This library is not installed in the proto area. 47*7c478bd9Sstevel@tonic-gateLIBS= $(LIBRARY) 48*7c478bd9Sstevel@tonic-gate 49*7c478bd9Sstevel@tonic-gateHDRS= ../include/byteorder.h \ 50*7c478bd9Sstevel@tonic-gate ../include/memutils.h ../include/myrcmd.h \ 51*7c478bd9Sstevel@tonic-gate ../../../head/protocols/dumprestore.h \ 52*7c478bd9Sstevel@tonic-gate ../include/rmt.h 53*7c478bd9Sstevel@tonic-gate 54*7c478bd9Sstevel@tonic-gateYFILE= getdate.y 55*7c478bd9Sstevel@tonic-gateYSRC= getdate.c 56*7c478bd9Sstevel@tonic-gate 57*7c478bd9Sstevel@tonic-gateCLOBBERFILES= $(YSRC) $(GLIB) *.ln 58*7c478bd9Sstevel@tonic-gate 59*7c478bd9Sstevel@tonic-gateLOBJS= rmtlib.o myrcmd.o \ 60*7c478bd9Sstevel@tonic-gate $(YSRC:%.c=%.o) \ 61*7c478bd9Sstevel@tonic-gate byteorder.o memutils.o $(RPC_CLNT:%.c=%.o) $(RPC_XDR:%.c=%.o) 62*7c478bd9Sstevel@tonic-gate 63*7c478bd9Sstevel@tonic-gateOBJECTS= $(LOBJS) 64*7c478bd9Sstevel@tonic-gatePOFILES= $(OBJECTS:.o=.po) 65*7c478bd9Sstevel@tonic-gateGENERAL= ../include 66*7c478bd9Sstevel@tonic-gateGLOBAL= ../../../head 67*7c478bd9Sstevel@tonic-gateCPPFLAGS= -I$(GENERAL) -I$(GLOBAL) $(CPPFLAGS.master) 68*7c478bd9Sstevel@tonic-gateLINTOUT= lint.out 69*7c478bd9Sstevel@tonic-gateCLEANFILES= $(OBJECTS) $(LINTOUT) $(LINTLIB) $(DEBUGS) *.ln \ 70*7c478bd9Sstevel@tonic-gate $(YSRC) $(LIBRARY) 71*7c478bd9Sstevel@tonic-gateLINTFLAGS += -y 72*7c478bd9Sstevel@tonic-gate 73*7c478bd9Sstevel@tonic-gate# support for -g library 74*7c478bd9Sstevel@tonic-gateGLIB= libdump_g.a 75*7c478bd9Sstevel@tonic-gateDEBUGS= $(OBJECTS:%=.debug/%) 76*7c478bd9Sstevel@tonic-gate$(GLIB):= AROBJS = $(DEBUGS) 77*7c478bd9Sstevel@tonic-gate$(GLIB):= DIR = .debug 78*7c478bd9Sstevel@tonic-gate$(GLIB):= CFLAGS= -g $(XESS) -DDEBUG -DYYDEBUG ${SBFLAGS} 79*7c478bd9Sstevel@tonic-gate 80*7c478bd9Sstevel@tonic-gate.KEEP_STATE: 81*7c478bd9Sstevel@tonic-gate 82*7c478bd9Sstevel@tonic-gateall: $(LIBS) 83*7c478bd9Sstevel@tonic-gate 84*7c478bd9Sstevel@tonic-gatedebug: $(LIBS) $(GLIB) 85*7c478bd9Sstevel@tonic-gate 86*7c478bd9Sstevel@tonic-gate.debug: 87*7c478bd9Sstevel@tonic-gate -@mkdir -p $@ 88*7c478bd9Sstevel@tonic-gate 89*7c478bd9Sstevel@tonic-gate.debug/%.o: %.c 90*7c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 91*7c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 92*7c478bd9Sstevel@tonic-gate 93*7c478bd9Sstevel@tonic-gate$(GLIB): .debug $$(DEBUGS) 94*7c478bd9Sstevel@tonic-gate $(BUILD.AR) 95*7c478bd9Sstevel@tonic-gate $(POST_PROCESS_A) 96*7c478bd9Sstevel@tonic-gate 97*7c478bd9Sstevel@tonic-gate$(OBJECTS): $(HDRS) 98*7c478bd9Sstevel@tonic-gate 99*7c478bd9Sstevel@tonic-gateinstall: all 100*7c478bd9Sstevel@tonic-gate 101*7c478bd9Sstevel@tonic-gate$(POFILE): $(POFILES) 102*7c478bd9Sstevel@tonic-gate $(RM) $@; cat $(POFILES) > $@ 103*7c478bd9Sstevel@tonic-gate 104*7c478bd9Sstevel@tonic-gate# rpcgen produces unused local variables that we can't easily suppress. 105*7c478bd9Sstevel@tonic-gate# It is also stupid about 32/64 bit integers. Since we don't support 106*7c478bd9Sstevel@tonic-gate# the RPC subsystem any more, just ignore complaints about it all. 107*7c478bd9Sstevel@tonic-gate# We have no control over yaccpar, and it has lots of 32/64 complaints. 108*7c478bd9Sstevel@tonic-gate# Assumes lint run with -s argument 109*7c478bd9Sstevel@tonic-gatelint: lint.out 110*7c478bd9Sstevel@tonic-gate sed -f lint.sed lint.out 111*7c478bd9Sstevel@tonic-gate 112*7c478bd9Sstevel@tonic-gatelint.out: $(LINTLIB) 113*7c478bd9Sstevel@tonic-gate 114*7c478bd9Sstevel@tonic-gatecheck: $(HDRS) 115*7c478bd9Sstevel@tonic-gate $(CSTYLE) $(CSTYLEFLAGS) `echo $(SRCS) | sed -e s/getdate.c//` $(HDRS) 116*7c478bd9Sstevel@tonic-gate $(HDRCHK) $(HDRCHKFLAGS) $(HDRS) 117*7c478bd9Sstevel@tonic-gate 118*7c478bd9Sstevel@tonic-gate# include library targets 119*7c478bd9Sstevel@tonic-gateinclude ../../../lib/Makefile.targ 120*7c478bd9Sstevel@tonic-gate 121*7c478bd9Sstevel@tonic-gate_msg: $(POFILE) 122