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/sa/Makefile
26 #
27
28 MANIFEST = sar.xml
29 SVCMETHOD = svc-sar
30
31 include ../Makefile.cmd
32
33 ROOTMANIFESTDIR = $(ROOTSVCSYSTEM)
34
35 CERRWARN += -_gcc=-Wno-parentheses
36 CERRWARN += -_gcc=-Wno-uninitialized
37
38 GREP= grep
39
40 SADC= sadc
41 SADP= sadp
42 SAR= sar
43 TIMEX= timex
61 # Source files
62 SADC_OBJECTS= $(SADC).o
63 srcs= $(TIMEX) $(SAR) $(SADC)
64 SRCS= $(srcs:%=%.c)
65 SHSRCS= $(SHELLS:%=%.sh)
66
67 # Set of target install directories
68 LIBSAD= $(ROOT)/usr/lib/sa
69 CROND= $(ROOT)/var/spool/cron
70 CRONTABSD= $(CROND)/crontabs
71
72 # Set of target install files
73 SYSCRONTAB= $(CRONTABSD)/sys
74 ROOTPROG= $(BINPROG:%=$(ROOTBIN)/%)
75 ROOTUSBINPROG= $(SBINPROG:%=$(ROOTUSRSBIN)/%)
76 ROOTLIBPROG= $(LIBPROG:%=$(LIBSAD)/%)
77 ROOTLIBSHELL= $(LIBSHELL:%=$(LIBSAD)/%)
78 ROOTSYMLINKS= $(SBINPROG:%=$(ROOTBIN)/%)
79
80 # Performance monitoring should not be enabled by default. Hence, these
81 # entries are comments. Note the difficulty of inserting a literal #
82 # in a makefile.... Wonderful parser here....
83 COMMENT_CHAR:sh= echo \\043
84 ENTRY1= '$(COMMENT_CHAR) 0 * * * 0-6 /usr/lib/sa/sa1'
85 ENTRY2= '$(COMMENT_CHAR) 20,40 8-17 * * 1-5 /usr/lib/sa/sa1'
86 ENTRY3= '$(COMMENT_CHAR) 5 18 * * 1-5 /usr/lib/sa/sa2 -s 8:00 -e 18:01 -i 1200 -A'
87
88 CLOBBERFILES= $(PROGS) $(SHELLS)
89
90 # Conditionals
91 $(LIBSAD)/$(SADC) := FILEMODE = 0555
92
93 .KEEP_STATE:
94
95 all: $(ALL) $(TXTS)
96
97 $(SADC): $(SADC_OBJECTS)
98 $(LINK.c) -o $@ $(SADC_OBJECTS) $(LDLIBS)
99 $(POST_PROCESS)
100
101 # The edit of SYSCRONTAB must be done unconditionally because of the
102 # creation of this file by a different component (Adm) and the possible
103 # backdating.
104 install: all $(ROOTPROG) $(ROOTUSBINPROG) \
105 $(ROOTINITSHELL) $(ROOTLIBSHELL) $(ROOTSYMLINKS) \
106 $(ROOTMANIFEST) $(ROOTSVCMETHOD) $(ROOTLIBPROG)
|
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 # Copyright (c) 2013 Andrew Stormont. All rights reserved.
25 #
26 # cmd/sa/Makefile
27 #
28
29 MANIFEST = sar.xml
30 SVCMETHOD = svc-sar
31
32 include ../Makefile.cmd
33
34 ROOTMANIFESTDIR = $(ROOTSVCSYSTEM)
35
36 CERRWARN += -_gcc=-Wno-parentheses
37 CERRWARN += -_gcc=-Wno-uninitialized
38
39 GREP= grep
40
41 SADC= sadc
42 SADP= sadp
43 SAR= sar
44 TIMEX= timex
62 # Source files
63 SADC_OBJECTS= $(SADC).o
64 srcs= $(TIMEX) $(SAR) $(SADC)
65 SRCS= $(srcs:%=%.c)
66 SHSRCS= $(SHELLS:%=%.sh)
67
68 # Set of target install directories
69 LIBSAD= $(ROOT)/usr/lib/sa
70 CROND= $(ROOT)/var/spool/cron
71 CRONTABSD= $(CROND)/crontabs
72
73 # Set of target install files
74 SYSCRONTAB= $(CRONTABSD)/sys
75 ROOTPROG= $(BINPROG:%=$(ROOTBIN)/%)
76 ROOTUSBINPROG= $(SBINPROG:%=$(ROOTUSRSBIN)/%)
77 ROOTLIBPROG= $(LIBPROG:%=$(LIBSAD)/%)
78 ROOTLIBSHELL= $(LIBSHELL:%=$(LIBSAD)/%)
79 ROOTSYMLINKS= $(SBINPROG:%=$(ROOTBIN)/%)
80
81 # Performance monitoring should not be enabled by default. Hence, these
82 # entries are comments.
83 ENTRY1= '$(POUND_SIGN) 0 * * * 0-6 /usr/lib/sa/sa1'
84 ENTRY2= '$(POUND_SIGN) 20,40 8-17 * * 1-5 /usr/lib/sa/sa1'
85 ENTRY3= '$(POUND_SIGN) 5 18 * * 1-5 /usr/lib/sa/sa2 -s 8:00 -e 18:01 -i 1200 -A'
86
87 CLOBBERFILES= $(PROGS) $(SHELLS)
88
89 # Conditionals
90 $(LIBSAD)/$(SADC) := FILEMODE = 0555
91
92 .KEEP_STATE:
93
94 all: $(ALL) $(TXTS)
95
96 $(SADC): $(SADC_OBJECTS)
97 $(LINK.c) -o $@ $(SADC_OBJECTS) $(LDLIBS)
98 $(POST_PROCESS)
99
100 # The edit of SYSCRONTAB must be done unconditionally because of the
101 # creation of this file by a different component (Adm) and the possible
102 # backdating.
103 install: all $(ROOTPROG) $(ROOTUSBINPROG) \
104 $(ROOTINITSHELL) $(ROOTLIBSHELL) $(ROOTSYMLINKS) \
105 $(ROOTMANIFEST) $(ROOTSVCMETHOD) $(ROOTLIBPROG)
|