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 # cmd/pools/poold/Makefile 26 27 PROG = poold 28 OBJS = poold.o 29 SRCS = $(OBJS:%.o=%.c) 30 31 MANIFEST= poold.xml 32 SVCMETHOD= svc-poold 33 34 include $(SRC)/cmd/Makefile.cmd 35 36 JAVA_SUBDIRS = com/sun/solaris/service/exception \ 37 com/sun/solaris/service/kstat \ 38 com/sun/solaris/service/locality \ 39 com/sun/solaris/service/logging \ 40 com/sun/solaris/service/pools \ 41 com/sun/solaris/service/timer \ 42 com/sun/solaris/domain/pools 43 44 SUBDIRS = libjkstat \ 45 libjlgrp \ 46 libjpool \ 47 libjsyslog 48 49 ROOTMANIFESTDIR= $(ROOTSVCSYSTEM) 50 51 all := TARGET = all 52 install := TARGET = install 53 clean := TARGET = clean 54 clobber := TARGET = clobber 55 lint := TARGET = lint 56 msg := TARGET = msg 57 58 $(ROOTMANIFEST):= FILEMODE= 444 59 JARFILE = JPool.jar 60 61 # JAVA_SUBDIRS and PACKAGEDOCS must be synchronized to ensure 62 # javadoc documentation is generated for all packages. 63 64 PACKAGEDOCS = com.sun.solaris.service.exception \ 65 com.sun.solaris.service.kstat \ 66 com.sun.solaris.service.locality \ 67 com.sun.solaris.service.logging \ 68 com.sun.solaris.service.pools \ 69 com.sun.solaris.service.timer \ 70 com.sun.solaris.domain.pools 71 DOCDIR = doc 72 ROOTUSRLIBDRP = $(ROOTLIB)/pool 73 INCS = -I../common \ 74 -I$(JAVA_ROOT)/include \ 75 -I$(JAVA_ROOT)/include/solaris 76 LDLIBS += -lpool -L$(JAVA_ROOT)/jre/lib/$(MACH)/client -ljvm 77 LDFLAGS += -R$(JAVA_ROOT)/jre/lib/$(MACH)/client 78 LINTFLAGS += -erroff=E_NAME_USED_NOT_DEF2 79 LINTLIBS += -L$(ROOTLIB) -lpool 80 81 CPPFLAGS += $(INCS) 82 ROOTCMDDIR = $(ROOT)/usr/lib/pool 83 84 CLOBBERFILES += $(JARFILE) 85 86 # 87 # Definitions for message catalogue 88 # 89 POFILES = $(OBJS:.o=.po) 90 91 # 92 # Definitions for Java installs 93 # 94 95 JFILES = poold.properties $(JARFILE) 96 ROOTJAVA = $(JFILES:%=$(ROOTUSRLIBDRP)/%) 97 98 $(ROOTJAVA) := FILEMODE = 444 99 100 all: $(PROG) $(JAVA_SUBDIRS) $(JARFILE) \ 101 .WAIT $(SUBDIRS) 102 103 clean : $(JAVA_SUBDIRS) $(SUBDIRS) 104 -$(RM) $(OBJS) $(POFILES) 105 106 lint: $(SUBDIRS) 107 108 msg: $(POFILES) 109 110 install: $(ROOTCMD) $(JAVA_SUBDIRS) $(JARFILE) \ 111 .WAIT $(SUBDIRS) $(ROOTJAVA) $(ROOTMANIFEST) \ 112 $(ROOTSVCMETHOD) 113 114 check: $(CHKMANIFEST) 115 116 $(JAVA_SUBDIRS): FRC 117 @cd $@; pwd; $(MAKE) $(TARGET) 118 if [ "$(TARGET)" != "clean" ] && [ "$(TARGET)" != "clobber" ]; \ 119 then \ 120 if [ ! -f $(JARFILE) ]; \ 121 then \ 122 $(JAR) -cf $(JARFILE) $@/*class; \ 123 else \ 124 $(JAR) -uf $(JARFILE) $@/*class; \ 125 fi \ 126 fi 127 128 $(SUBDIRS): FRC 129 @cd $@; pwd; $(MAKE) $(TARGET) 130 131 doc: all 132 $(JAVADOC) -private -classpath $(JARFILE): -sourcepath . \ 133 -source 1.4 -d $(DOCDIR) $(PACKAGEDOCS) 134 135 $(PROG): $(OBJS) 136 $(LINK.c) -o $(PROG) $(OBJS) $(LDLIBS) 137 $(POST_PROCESS) 138 139 $(ROOTUSRLIBDRP)/%: % 140 $(INS.file) 141 142 FRC: 143 144 lint: 145 $(LINT.c) $(PROG).c $(LINTLIBS) 146 147 include $(SRC)/cmd/Makefile.targ 148