Makefile revision 4604:5989fb2cb1d5
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#
23# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27
28# cmd/agents/Makefile
29
30#########################################################
31#
32# Makefile for the Solstice Enterprise Agent
33#
34# Targets:
35#	all - compile everything
36#	install - create installation directories and copy files
37#	package - create packages in installation directory
38#	clean - remove all intermediate files
39#	clobber - make clean plus removing deliverable files
40#	lint - run lint on the source files
41#
42#########################################################
43
44# OPTIONAL_INCLUDE_FILE:sh = /bin/sh misc.sh ../Makefile.cmd
45# include $(OPTIONAL_INCLUDE_FILE)
46
47include $(SRC)/cmd/Makefile.cmd
48
49# Use $TARG_SYS for OS dependent variables
50#
51# TARG_SYS gets defined as SVR4 or SUNOS
52#
53TARG_SYS:sh =                           \
54 (                                      \
55   UNAME=` uname -r 2>/dev/null` ||.;   \
56   case $UNAME in                       \
57   '') echo SUNOS;;                     \
58   4.*) echo SUNOS;;                    \
59   5.*) echo SVR4;;                     \
60   A.09.*) echo HPUX9;;                 \
61   *)  echo SVR4;;                      \
62   esac                                 \
63 )
64
65ROOTDIR	: sh=echo ${ROOTDIR:-"`pwd`"}
66PKGLOC	: sh=echo ${PKGLOC:-'${ROOTDIR}/PACKAGES.`uname -p`'}
67
68$(CLOSED_BUILD)AGENTS= $(CLOSED)/cmd/agents/agents
69
70all	:=		TARGET = all
71clean	:=		TARGET = clean
72install	:=		TARGET = install
73lint	:=		TARGET = lint
74clobber :=		TARGET = clobber
75
76SUBDIRS = snmp $(AGENTS)
77
78#
79# all
80#
81
82all: $(SUBDIRS)
83
84$(SUBDIRS): FRC
85	@cd $@; pwd; $(MAKE) $(TARGET)
86
87FRC:
88
89DIRMODE=	0755
90OWNER=		root
91GROUP=		sys
92ROOTVAR=	$(ROOT)/var
93
94ROOTDIRS=	$(ROOTETC)/snmp \
95		$(ROOTETC)/snmp/conf \
96		$(ROOTLIB)/snmp \
97		$(ROOTBIN) \
98		$(ROOTVAR)/snmp \
99		$(ROOTVAR)/snmp/mib
100
101$(ROOTDIRS):
102	$(INS.dir)
103
104#
105# Need a "make install" target for integrating into Solaris 2.6.
106#
107
108install: $(ROOTDIRS) $(SUBDIRS)
109
110#
111# clean
112#
113
114clean: $(SUBDIRS)
115
116clobber: $(SUBDIRS)
117
118# Need a lint target for Solaris2.6 integration.
119
120lint:  $(SUBDIRS)
121
122include $(SRC)/cmd/Makefile.targ
123