Makefile revision b6805bf78d2bbbeeaea8909a05623587b42d58b3
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix#
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix# CDDL HEADER START
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix#
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix# The contents of this file are subject to the terms of the
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix# Common Development and Distribution License (the "License").
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix# You may not use this file except in compliance with the License.
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix#
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix# or http://www.opensolaris.org/os/licensing.
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix# See the License for the specific language governing permissions
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix# and limitations under the License.
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix#
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix# When distributing Covered Code, include this CDDL HEADER in each
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix# If applicable, add the following below this CDDL HEADER, with the
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix# fields enclosed by brackets "[]" replaced with your own identifying
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix# information: Portions Copyright [yyyy] [name of copyright owner]
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix#
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix# CDDL HEADER END
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix#
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix#
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix# Use is subject to license terms.
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix#
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix
78f31011c08503bf0d95da30e5f6326d4dd10f8acilixLIBRARY= libdump.a
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix# Has to be before include of Makefile.backup
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix# This should be POFILE=libdump.po, but that causes make to
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix# fall over due to some seriously weird interactions in the
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix# various indirectly-included makefiles. So, since this works
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix# and is otherwise harmless, we fake it.
78f31011c08503bf0d95da30e5f6326d4dd10f8acilixPROG= libdump
732fb09f9c502000068a77667c3356cbbd5d39d5cilix
732fb09f9c502000068a77667c3356cbbd5d39d5cilix# Include library definitions, then backup definitions, as in general
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix# we want the flags and such from our tree.
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix
78f31011c08503bf0d95da30e5f6326d4dd10f8acilixinclude ../../../lib/Makefile.lib
78f31011c08503bf0d95da30e5f6326d4dd10f8acilixinclude ../Makefile.backup
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix
78f31011c08503bf0d95da30e5f6326d4dd10f8acilixSRCDIR = .
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix# Specifically request the construction of a static library.
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix# This library is not installed in the proto area.
b8502defa91647a317b285046a49546612f66e6dKrisLIBS= $(LIBRARY)
b8502defa91647a317b285046a49546612f66e6dKris
b8502defa91647a317b285046a49546612f66e6dKrisHDRS= ../include/byteorder.h \
b8502defa91647a317b285046a49546612f66e6dKris ../include/memutils.h ../include/myrcmd.h \
b8502defa91647a317b285046a49546612f66e6dKris ../../../head/protocols/dumprestore.h \
b8502defa91647a317b285046a49546612f66e6dKris ../include/rmt.h
b8502defa91647a317b285046a49546612f66e6dKris
b8502defa91647a317b285046a49546612f66e6dKrisYFILE= getdate.y
b8502defa91647a317b285046a49546612f66e6dKrisYSRC= getdate.c
b8502defa91647a317b285046a49546612f66e6dKris
b8502defa91647a317b285046a49546612f66e6dKrisCLOBBERFILES += $(LIBS) $(GLIB)
b8502defa91647a317b285046a49546612f66e6dKris
b8502defa91647a317b285046a49546612f66e6dKrisLOBJS= rmtlib.o myrcmd.o \
b8502defa91647a317b285046a49546612f66e6dKris $(YSRC:%.c=%.o) \
b8502defa91647a317b285046a49546612f66e6dKris byteorder.o memutils.o $(RPC_CLNT:%.c=%.o) $(RPC_XDR:%.c=%.o)
b8502defa91647a317b285046a49546612f66e6dKris
78f31011c08503bf0d95da30e5f6326d4dd10f8acilixOBJECTS= $(LOBJS)
78f31011c08503bf0d95da30e5f6326d4dd10f8acilixPOFILES= $(OBJECTS:.o=.po)
78f31011c08503bf0d95da30e5f6326d4dd10f8acilixGENERAL= ../include
78f31011c08503bf0d95da30e5f6326d4dd10f8acilixGLOBAL= ../../../head
78f31011c08503bf0d95da30e5f6326d4dd10f8acilixCPPFLAGS= -I$(GENERAL) -I$(GLOBAL) $(CPPFLAGS.master)
78f31011c08503bf0d95da30e5f6326d4dd10f8acilixCERRWARN += -_gcc=-Wno-implicit-function-declaration
78f31011c08503bf0d95da30e5f6326d4dd10f8acilixCERRWARN += -_gcc=-Wno-parentheses
78f31011c08503bf0d95da30e5f6326d4dd10f8acilixCERRWARN += -_gcc=-Wno-unused-label
78f31011c08503bf0d95da30e5f6326d4dd10f8acilixCERRWARN += -_gcc=-Wno-unused-variable
78f31011c08503bf0d95da30e5f6326d4dd10f8acilixLINTOUT= lint.out
78f31011c08503bf0d95da30e5f6326d4dd10f8acilixCLEANFILES= $(OBJECTS) $(LINTOUT) $(LINTLIB) $(DEBUGS) *.ln \
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix $(YSRC) $(LIBRARY)
78f31011c08503bf0d95da30e5f6326d4dd10f8acilixLINTFLAGS += -y
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix# support for -g library
78f31011c08503bf0d95da30e5f6326d4dd10f8acilixGLIB= libdump_g.a
78f31011c08503bf0d95da30e5f6326d4dd10f8acilixDEBUGS= $(OBJECTS:%=.debug/%)
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix$(GLIB):= AROBJS = $(DEBUGS)
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix$(GLIB):= DIR = .debug
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix$(GLIB):= CFLAGS= -g $(XESS) -DDEBUG -DYYDEBUG ${SBFLAGS}
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix.KEEP_STATE:
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix
78f31011c08503bf0d95da30e5f6326d4dd10f8acilixall: $(LIBS)
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix
78f31011c08503bf0d95da30e5f6326d4dd10f8acilixdebug: $(LIBS) $(GLIB)
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix.debug:
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix -@mkdir -p $@
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix.debug/%.o: %.c
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix $(COMPILE.c) -o $@ $<
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix $(POST_PROCESS_O)
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix$(GLIB): .debug $$(DEBUGS)
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix $(BUILD.AR)
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix $(POST_PROCESS_A)
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix$(OBJECTS): $(HDRS)
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix
78f31011c08503bf0d95da30e5f6326d4dd10f8acilixinstall: all
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix$(POFILE): $(POFILES)
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix $(RM) $@; cat $(POFILES) > $@
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix# rpcgen produces unused local variables that we can't easily suppress.
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix# It is also stupid about 32/64 bit integers. Since we don't support
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix# the RPC subsystem any more, just ignore complaints about it all.
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix# We have no control over yaccpar, and it has lots of 32/64 complaints.
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix# Assumes lint run with -s argument
78f31011c08503bf0d95da30e5f6326d4dd10f8acilixlint: lint.out
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix sed -f lint.sed lint.out
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix
78f31011c08503bf0d95da30e5f6326d4dd10f8acilixlint.out: $(LINTLIB)
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix
78f31011c08503bf0d95da30e5f6326d4dd10f8acilixcheck: $(HDRS)
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix $(CSTYLE) $(CSTYLEFLAGS) `echo $(SRCS) | sed -e s/getdate.c//` $(HDRS)
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix $(HDRCHK) $(HDRCHKFLAGS) $(HDRS)
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix# include library targets
78f31011c08503bf0d95da30e5f6326d4dd10f8acilixinclude ../../../lib/Makefile.targ
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix_msg: $(POFILE)
78f31011c08503bf0d95da30e5f6326d4dd10f8acilix