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 2009 Sun Microsystems, Inc. All rights reserved. 23# Use is subject to license terms. 24# 25 26include $(SRC)/Makefile.psm 27 28LIBRARY= libpiclenvd.a 29VERS= .1 30 31OBJECTS= piclenvd.o piclenvsetup.o 32 33# include library definitions 34include $(SRC)/lib/Makefile.lib 35 36ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Blade-1000 37 38include $(SRC)/cmd/picl/plugins/Makefile.com 39 40CPPFLAGS += -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS 41CPPFLAGS += -I$(SRC)/uts/sun4u/ -I$(SRC)/uts/common/ 42CPPFLAGS += -I$(SRC)/uts/sun4u/excalibur 43CPPFLAGS += -I$(SRC)/cmd/picl/plugins/lib/picld_pluginutil 44 45SRCS= $(OBJECTS:%.o=%.c) 46 47LIBS = $(DYNLIB) 48 49ROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR) 50 51CONF= envmodel.conf 52ROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%) 53$(ROOTCONF) := FILEMODE = 0644 54INFOS= envmodel.info 55 56LINTSRC = $(LINTLIB:%.ln=%) 57ROOTLINTDIR = $(ROOTLIBDIR) 58ROOTLINT = $(LINTSRC:%=$(ROOTLINTDIR)/%) 59 60CLEANFILES= $(LINTOUT) $(LINTLIB) 61 62CFLAGS += $(CCVERBOSE) 63DYNFLAGS += -R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins 64LDLIBS += -L$(SRC)/lib/libpicltree/$(MACH) 65LDLIBS += -L$(SRC)/cmd/picl/plugins/common/devtree 66LDLIBS += -L$(SRC)/cmd/picl/plugins/lib/picld_pluginutil/$(MACH) 67LDLIBS += -L$(ROOT)/usr/lib/picl/plugins -lpicldevtree -lpicltree 68LDLIBS += -lpicld_pluginutil 69LDLIBS += -ldevinfo -lc 70 71.KEEP_STATE: 72 73SUBDIRS= 74 75POFILE = piclenvd_excalibur.po 76POFILES = $(SRCS:%.c=%.po) 77 78all := TARGET= all 79install := TARGET= install 80clean := TARGET= clean 81clobber := TARGET= clobber 82lint := TARGET= lint 83_msg := TARGET= _msg 84 85all: $(LIBS) $(LIBLINKS) 86 87install: $(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS) $(ROOTCONF) 88 89$(CONF): $(INFOS) 90 $(RM) $@ 91 $(CPP) envmodel.info > $@ 92 93 94$(POFILE): $(POFILES) 95 $(CAT) $(POFILES) > $(POFILE) 96 97_msg: $(MSGDOMAIN) $(POFILE) 98 $(RM) $(MSGDOMAIN)/$(POFILE) 99 $(CP) $(POFILE) $(MSGDOMAIN)/$(POFILE) 100 101$(MSGDOMAIN): 102 $(INS.dir) 103 104 105$(LIBLINKS): FRC 106 $(RM) $@; $(SYMLINK) $(DYNLIB) $@ 107 108# include library targets 109include $(SRC)/lib/Makefile.targ 110include $(SRC)/cmd/picl/plugins/Makefile.targ 111 112$(ROOTLINTDIR)/%: ../% 113 $(INS.file) 114 115lint: 116 $(LINT.c) $(SRCS) 117 118$(SUBDIRS): FRC 119 @cd $@; pwd; $(MAKE) $(TARGET) 120 121FRC: 122