1# 2# CDDL HEADER START 3# 4# The contents of this file are subject to the terms of the 5# Common Development and Distribution License (the "License"). 6# You may not use this file except in compliance with the License. 7# 8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9# or http://www.opensolaris.org/os/licensing. 10# See the License for the specific language governing permissions 11# and limitations under the License. 12# 13# When distributing Covered Code, include this CDDL HEADER in each 14# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15# If applicable, add the following below this CDDL HEADER, with the 16# fields enclosed by brackets "[]" replaced with your own identifying 17# information: Portions Copyright [yyyy] [name of copyright owner] 18# 19# CDDL HEADER END 20# 21# 22# Copyright 2006 Sun Microsystems, Inc. All rights reserved. 23# Use is subject to license terms. 24# 25 26LIBRARY= libsmedia.a 27VERS=.1 28 29OBJECTS= smed_clnt.o smed_xdr.o l_generic.o l_misc.o 30 31DERIVED_FILES = smed.h smed_clnt.c smed_xdr.c 32 33# include library definitions 34include ../../../Makefile.lib 35 36SRCDIR = ../common 37 38# We can't lint the rpcgen-generated files. 39# (Well, we could, but we couldn't fix them.) 40lintcheck := SRCS = ../common/l_generic.c ../common/l_misc.c 41 42LIBS = $(DYNLIB) $(LINTLIB) 43 44# definitions for lint 45 46LINTSRC= $(LINTLIB:%.ln=%) 47$(LINTLIB):= SRCS = ../common/$(LINTSRC) 48 49CLEANFILES += $(DERIVED_FILES:%=../common/%) 50 51CPPFLAGS += -D_REENTRANT -I$(SRC)/cmd/smserverd/ 52CFLAGS += $(CCVERBOSE) 53CFLAGS64 += $(CCVERBOSE) 54 55CERRWARN += -_gcc=-Wno-unused-variable 56 57LDLIBS += -lnsl -lc 58 59.KEEP_STATE: 60 61all: $(LIBS) 62 63lint: lintcheck 64 65# include library targets 66include ../../../Makefile.targ 67 68objs/%.o pics/%.o: ../common/%.c 69 $(COMPILE.c) -o $@ $< 70 $(POST_PROCESS_O) 71 72# install rule for lint library target 73 74$(ROOTLINTDIR64)/%: ../common/% 75 $(INS.file) 76 77$(ROOTLINTDIR)/%: ../common/% 78 $(INS.file) 79 80# 81# Derived files 82# 83 84../common/smed.h: $(SRC)/cmd/smserverd/smed.x 85 $(RPCGEN) -C -h $(SRC)/cmd/smserverd/smed.x | \ 86 $(SED) -e 's!$(SRC)/cmd/smserverd/smed.h!smed.h!' > $@ 87 88../common/smed_clnt.c: $(SRC)/cmd/smserverd/smed.x ../common/smed.h 89 $(RPCGEN) -l $(SRC)/cmd/smserverd/smed.x | \ 90 $(SED) -e 's!$(SRC)/cmd/smserverd/smed.h!smed.h!' > $@ 91 92../common/smed_xdr.c: $(SRC)/cmd/smserverd/smed.x ../common/smed.h 93 $(RPCGEN) -c $(SRC)/cmd/smserverd/smed.x | \ 94 $(SED) -e 's!$(SRC)/cmd/smserverd/smed.h!smed.h!' > $@ 95 96