17c478bd9Sstevel@tonic-gate# 27c478bd9Sstevel@tonic-gate# CDDL HEADER START 37c478bd9Sstevel@tonic-gate# 47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the 524fe0b3bSjmcp# Common Development and Distribution License (the "License"). 624fe0b3bSjmcp# You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate# 87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate# and limitations under the License. 127c478bd9Sstevel@tonic-gate# 137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate# 197c478bd9Sstevel@tonic-gate# CDDL HEADER END 207c478bd9Sstevel@tonic-gate# 217c478bd9Sstevel@tonic-gate# 2224fe0b3bSjmcp# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 237c478bd9Sstevel@tonic-gate# Use is subject to license terms. 247c478bd9Sstevel@tonic-gate# 257c478bd9Sstevel@tonic-gate# cmd/pools/poold/Makefile 267c478bd9Sstevel@tonic-gate 277c478bd9Sstevel@tonic-gatePROG = poold 287c478bd9Sstevel@tonic-gateOBJS = poold.o 297c478bd9Sstevel@tonic-gateSRCS = $(OBJS:%.o=%.c) 307c478bd9Sstevel@tonic-gate 3126d8ba22SgarypenMANIFEST= poold.xml 3226d8ba22SgarypenSVCMETHOD= svc-poold 3326d8ba22Sgarypen 347c478bd9Sstevel@tonic-gateinclude $(SRC)/cmd/Makefile.cmd 35*f936286cSAlexander Pyhalov$(BLD_JAVA_8)include $(SRC)/cmd/Makefile.cmd.64 367c478bd9Sstevel@tonic-gate 377c478bd9Sstevel@tonic-gateJAVA_SUBDIRS = com/sun/solaris/service/exception \ 387c478bd9Sstevel@tonic-gate com/sun/solaris/service/kstat \ 397c478bd9Sstevel@tonic-gate com/sun/solaris/service/locality \ 407c478bd9Sstevel@tonic-gate com/sun/solaris/service/logging \ 417c478bd9Sstevel@tonic-gate com/sun/solaris/service/pools \ 427c478bd9Sstevel@tonic-gate com/sun/solaris/service/timer \ 437c478bd9Sstevel@tonic-gate com/sun/solaris/domain/pools 447c478bd9Sstevel@tonic-gate 457c478bd9Sstevel@tonic-gateSUBDIRS = libjkstat \ 467c478bd9Sstevel@tonic-gate libjlgrp \ 477c478bd9Sstevel@tonic-gate libjpool \ 487c478bd9Sstevel@tonic-gate libjsyslog 497c478bd9Sstevel@tonic-gate 5026d8ba22SgarypenROOTMANIFESTDIR= $(ROOTSVCSYSTEM) 5126d8ba22Sgarypen 527c478bd9Sstevel@tonic-gateall := TARGET = all 537c478bd9Sstevel@tonic-gateinstall := TARGET = install 547c478bd9Sstevel@tonic-gateclean := TARGET = clean 557c478bd9Sstevel@tonic-gateclobber := TARGET = clobber 567c478bd9Sstevel@tonic-gatelint := TARGET = lint 577c478bd9Sstevel@tonic-gatemsg := TARGET = msg 587c478bd9Sstevel@tonic-gate 5926d8ba22Sgarypen$(ROOTMANIFEST):= FILEMODE= 444 607c478bd9Sstevel@tonic-gateJARFILE = JPool.jar 617c478bd9Sstevel@tonic-gate 62*f936286cSAlexander PyhalovJAVA_LIB_PATH = $(JAVA_ROOT)/jre/lib/$(MACH)/client 63*f936286cSAlexander PyhalovLIBPOOL_PATH = $(ROOTLIB) 64*f936286cSAlexander Pyhalov$(BLD_JAVA_8)JAVA_LIB_PATH = $(JAVA_ROOT)/jre/lib/$(MACH64)/server 65*f936286cSAlexander Pyhalov$(BLD_JAVA_8)LIBPOOL_PATH = $(ROOTLIB64) 66*f936286cSAlexander Pyhalov 677c478bd9Sstevel@tonic-gate# JAVA_SUBDIRS and PACKAGEDOCS must be synchronized to ensure 687c478bd9Sstevel@tonic-gate# javadoc documentation is generated for all packages. 697c478bd9Sstevel@tonic-gate 707c478bd9Sstevel@tonic-gatePACKAGEDOCS = com.sun.solaris.service.exception \ 717c478bd9Sstevel@tonic-gate com.sun.solaris.service.kstat \ 727c478bd9Sstevel@tonic-gate com.sun.solaris.service.locality \ 737c478bd9Sstevel@tonic-gate com.sun.solaris.service.logging \ 747c478bd9Sstevel@tonic-gate com.sun.solaris.service.pools \ 757c478bd9Sstevel@tonic-gate com.sun.solaris.service.timer \ 767c478bd9Sstevel@tonic-gate com.sun.solaris.domain.pools 777c478bd9Sstevel@tonic-gateDOCDIR = doc 787c478bd9Sstevel@tonic-gateROOTUSRLIBDRP = $(ROOTLIB)/pool 797c478bd9Sstevel@tonic-gateINCS = -I../common \ 807c478bd9Sstevel@tonic-gate -I$(JAVA_ROOT)/include \ 817c478bd9Sstevel@tonic-gate -I$(JAVA_ROOT)/include/solaris 82*f936286cSAlexander PyhalovLDLIBS += -lpool -L$(JAVA_LIB_PATH) -ljvm 83e53cbaa9SRichard PALO# runpath should point to runtime JAVA_HOME 84*f936286cSAlexander PyhalovLDFLAGS += -R$(JAVA_LIB_PATH) 85*f936286cSAlexander Pyhalov 867c478bd9Sstevel@tonic-gateLINTFLAGS += -erroff=E_NAME_USED_NOT_DEF2 87*f936286cSAlexander Pyhalov$(BLD_JAVA_8)LINTFLAGS64 += -erroff=E_NAME_USED_NOT_DEF2 88*f936286cSAlexander PyhalovLINTLIBS += -L$(LIBPOOL_PATH) -lpool 897c478bd9Sstevel@tonic-gate 907c478bd9Sstevel@tonic-gateCPPFLAGS += $(INCS) 917c478bd9Sstevel@tonic-gateROOTCMDDIR = $(ROOT)/usr/lib/pool 927c478bd9Sstevel@tonic-gate 937c478bd9Sstevel@tonic-gateCLOBBERFILES += $(JARFILE) 947c478bd9Sstevel@tonic-gate 957c478bd9Sstevel@tonic-gate# 967c478bd9Sstevel@tonic-gate# Definitions for message catalogue 977c478bd9Sstevel@tonic-gate# 987c478bd9Sstevel@tonic-gatePOFILES = $(OBJS:.o=.po) 997c478bd9Sstevel@tonic-gate 1007c478bd9Sstevel@tonic-gate# 1017c478bd9Sstevel@tonic-gate# Definitions for Java installs 1027c478bd9Sstevel@tonic-gate# 1037c478bd9Sstevel@tonic-gate 1047c478bd9Sstevel@tonic-gateJFILES = poold.properties $(JARFILE) 1057c478bd9Sstevel@tonic-gateROOTJAVA = $(JFILES:%=$(ROOTUSRLIBDRP)/%) 1067c478bd9Sstevel@tonic-gate 1077c478bd9Sstevel@tonic-gate$(ROOTJAVA) := FILEMODE = 444 1087c478bd9Sstevel@tonic-gate 1097c478bd9Sstevel@tonic-gateall: $(PROG) $(JAVA_SUBDIRS) $(JARFILE) \ 1107c478bd9Sstevel@tonic-gate .WAIT $(SUBDIRS) 1117c478bd9Sstevel@tonic-gate 112b6805bf7SGordon Rossclean : $(JAVA_SUBDIRS) $(SUBDIRS) clean_local 113b6805bf7SGordon Rossclean_local: 114b6805bf7SGordon Ross $(RM) $(OBJS) 115b6805bf7SGordon Ross 116b6805bf7SGordon Rossclobber : $(JAVA_SUBDIRS) $(SUBDIRS) clobber_local 117b6805bf7SGordon Rossclobber_local: clean_local 118b6805bf7SGordon Ross $(RM) $(CLOBBERFILES) 1197c478bd9Sstevel@tonic-gate 1207c478bd9Sstevel@tonic-gatelint: $(SUBDIRS) 1217c478bd9Sstevel@tonic-gate 1227c478bd9Sstevel@tonic-gatemsg: $(POFILES) 1237c478bd9Sstevel@tonic-gate 1247c478bd9Sstevel@tonic-gateinstall: $(ROOTCMD) $(JAVA_SUBDIRS) $(JARFILE) \ 12526d8ba22Sgarypen .WAIT $(SUBDIRS) $(ROOTJAVA) $(ROOTMANIFEST) \ 12626d8ba22Sgarypen $(ROOTSVCMETHOD) 12726d8ba22Sgarypen 12826d8ba22Sgarypencheck: $(CHKMANIFEST) 1297c478bd9Sstevel@tonic-gate 1307c478bd9Sstevel@tonic-gate$(JAVA_SUBDIRS): FRC 1317c478bd9Sstevel@tonic-gate @cd $@; pwd; $(MAKE) $(TARGET) 1327c478bd9Sstevel@tonic-gate if [ "$(TARGET)" != "clean" ] && [ "$(TARGET)" != "clobber" ]; \ 1337c478bd9Sstevel@tonic-gate then \ 1347c478bd9Sstevel@tonic-gate if [ ! -f $(JARFILE) ]; \ 1357c478bd9Sstevel@tonic-gate then \ 1367c478bd9Sstevel@tonic-gate $(JAR) -cf $(JARFILE) $@/*class; \ 1377c478bd9Sstevel@tonic-gate else \ 1387c478bd9Sstevel@tonic-gate $(JAR) -uf $(JARFILE) $@/*class; \ 1397c478bd9Sstevel@tonic-gate fi \ 1407c478bd9Sstevel@tonic-gate fi 1417c478bd9Sstevel@tonic-gate 1427c478bd9Sstevel@tonic-gate$(SUBDIRS): FRC 1437c478bd9Sstevel@tonic-gate @cd $@; pwd; $(MAKE) $(TARGET) 1447c478bd9Sstevel@tonic-gate 1457c478bd9Sstevel@tonic-gatedoc: all 1467c478bd9Sstevel@tonic-gate $(JAVADOC) -private -classpath $(JARFILE): -sourcepath . \ 1477c478bd9Sstevel@tonic-gate -source 1.4 -d $(DOCDIR) $(PACKAGEDOCS) 1487c478bd9Sstevel@tonic-gate 1497c478bd9Sstevel@tonic-gate$(PROG): $(OBJS) 1507c478bd9Sstevel@tonic-gate $(LINK.c) -o $(PROG) $(OBJS) $(LDLIBS) 1517c478bd9Sstevel@tonic-gate $(POST_PROCESS) 1527c478bd9Sstevel@tonic-gate 1537c478bd9Sstevel@tonic-gate$(ROOTUSRLIBDRP)/%: % 1547c478bd9Sstevel@tonic-gate $(INS.file) 1557c478bd9Sstevel@tonic-gate 1567c478bd9Sstevel@tonic-gateFRC: 1577c478bd9Sstevel@tonic-gate 1587c478bd9Sstevel@tonic-gatelint: 1597c478bd9Sstevel@tonic-gate $(LINT.c) $(PROG).c $(LINTLIBS) 1607c478bd9Sstevel@tonic-gate 1617c478bd9Sstevel@tonic-gateinclude $(SRC)/cmd/Makefile.targ 162