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 # lib/libprtdiag_psr/sparc/montecarlo/Makefile 26 27 LIBBASE = ../../../../../src/lib 28 UTSBASE = ../../../../uts 29 PLATFORM_OBJECTS= montecarlo.o 30 31 include ../Makefile.com 32 33 IFLAGS = -I$(USR_PLAT_DIR)/sun4u/include -I../../../libprtdiag/inc -I$(LIBBASE)/libdevinfo 34 IFLAGS += -I$(UTSBASE)/sun4u/sys 35 IFLAGS += -I$(UTSBASE)/sun4u/montecarlo/sys 36 LINTFLAGS += $(IFLAGS) 37 LDLIBS += -L$(LIBBASE)/libdevinfo -ldevinfo -L$(LIBBASE)/libcfgadm -lcfgadm \ 38 -lkstat 39 # 40 # links in /usr/platform 41 # 42 LINKED_PLATFORMS = SUNW,UltraSPARC-IIe-NetraCT-40 43 44 LINKED_DIRS = $(LINKED_PLATFORMS:%=$(USR_PLAT_DIR)/%) 45 LINKED_LIB_DIRS = $(LINKED_PLATFORMS:%=$(USR_PLAT_DIR)/%/lib) 46 LINKED_PRTDIAG_DIRS = \ 47 $(LINKED_PLATFORMS:%=$(USR_PLAT_DIR)/%/lib/libprtdiag_psr.so.1) 48 49 # 50 # SUNW,UltraSPARC-IIi-Netract and SUNW,UltraSPARC-IIe-NetraCT-40 platform 51 # should install into SUNW,UltraSPARC-IIi-Netract. 52 # SUNW,UltraSPARC-IIe-NetraCT-40 platform can link to 53 # /usr/platform/SUNW,UltraSPARC-IIi-Netract/lib/libprtdiag_psr.so 54 # 55 PLATFORM=SUNW,UltraSPARC-IIi-Netract 56 57 $(USR_PLAT_DIR)/$(PLATFORM)/lib/libprtdiag_psr.so.1 := FILEMODE= 0755 58 59 .KEEP_STATE: 60 61 PLATLIBS= $(PLATFORM:%=$(USR_PLAT_DIR)/%/lib/) 62 63 install: all $(PLATLIBS) $(USR_PSM_LIBS) \ 64 $(LINKED_PRTDIAG_DIRS) 65 66 # 67 # install rules for SUNW,UltraSPARC-IIi-Netract/lib/libprtdiag_psr.so 68 # 69 $(PLATLIBS): 70 $(INS.dir) 71 72 $(USR_PSM_LIB_DIR): 73 cd $(UTSBASE)/sun4u/montecarlo; $(MAKE) $(USR_PSM_LIB_DIR) 74 75 $(USR_PSM_LIB_DIR)/%: % $(USR_PSM_LIB_DIR) 76 $(INS.file) 77 78 $(LINKED_DIRS): $(USR_PLAT_DIR) 79 -$(INS.dir) 80 81 $(LINKED_LIB_DIRS): $(LINKED_DIRS) 82 -$(INS.dir) 83 84 $(LINKED_PRTDIAG_DIRS): $(LINKED_LIB_DIRS) 85 -$(INS.slink6) 86 87 88 # New additions to generate msg file 89 POFILE = libprtdiag_psr_montecarlo.po 90 POFILES = montecarlo.po 91 92 _msg: $(MSGDOMAIN) $(POFILE) 93 $(RM) $(MSGDOMAIN)/$(POFILE) 94 $(CP) $(POFILE) $(MSGDOMAIN) 95 96 $(POFILE): $(POFILES) 97 $(RM) $@ 98 $(CAT) $(POFILES) > $@ 99 100 $(POFILES): 101 $(RM) messages.po 102 $(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext common/montecarlo.c` 103 $(SED) -e '/^# msg/d' -e '/^domain/d' messages.po > $@ 104 $(RM) messages.po