xref: /titanic_44/usr/src/cmd/fm/notify/smtp-notify/Makefile.com (revision 89b43686db1fe9681d80a7cf5662730cb9378cae)
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 (c) 2010, Oracle and/or its affiliates. All rights reserved.
24#
25
26.KEEP_STATE:
27.SUFFIXES:
28
29SRCS += smtp-notify.c
30OBJS = $(SRCS:%.c=%.o)
31LINTFILES = $(SRCS:%.c=%.ln)
32
33PROG = smtp-notify
34HELPER = process_msg_template.sh
35ROOTLIBFM = $(ROOT)/usr/lib/fm
36ROOTLIBNOTIFY = $(ROOT)/usr/lib/fm/notify
37ROOTPROG = $(ROOTLIBNOTIFY)/$(PROG)
38ROOTHELPER = $(ROOTLIBNOTIFY)/$(HELPER)
39
40ROOTMANIFESTDIR = $(ROOTSVCSYSTEM)/fm
41ROOTMANIFEST = $(ROOTMANIFESTDIR)/$(PROG).xml
42ROOTNOTIFYPARAMS = $(ROOTMANIFESTDIR)/notify-params.xml
43$(ROOTMANIFEST) := FILEMODE = 0444
44$(ROOTNOTIFYPARAMS) := FILEMODE = 0444
45
46$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
47CPPFLAGS += -I. -I../common -I../../../../../lib/fm/libfmnotify/common
48C99MODE	= $(C99_ENABLE)
49CFLAGS += $(CTF_FLAGS) $(CCVERBOSE) $(XSTRCONST)
50LDLIBS += -L$(ROOT)/usr/lib/fm -lnvpair -lfmevent -lfmd_msg -lfmnotify \
51-lumem
52LDFLAGS += -R/usr/lib/fm
53LINTFLAGS += -mnu
54
55.NO_PARALLEL:
56.PARALLEL: $(OBJS) $(LINTFILES)
57
58all: $(PROG) $(HELPER)
59
60$(PROG): $(OBJS)
61	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
62	$(CTFMERGE) -L VERSION -o $@ $(OBJS)
63	$(POST_PROCESS)
64
65$(HELPER): ../common/$(HELPER)
66	$(CP) ../common/$(HELPER) .
67
68%.o: ../common/%.c
69	$(COMPILE.c) $<
70	$(CTFCONVERT_O)
71
72%.o: %.c
73	$(COMPILE.c) $<
74	$(CTFCONVERT_O)
75
76clean:
77	$(RM) $(OBJS) $(HELPER) $(LINTFILES)
78
79clobber: clean
80	$(RM) $(PROG)
81
82%.ln: ../common/%.c
83	$(LINT.c) -c $<
84
85%.ln: %.c
86	$(LINT.c) -c $<
87
88lint: $(LINTFILES)
89	$(LINT) $(LINTFLAGS) $(LINTFILES)
90
91$(ROOTLIBNOTIFY):
92	$(INS.dir)
93
94$(ROOTLIBNOTIFY)/%: %
95	$(INS.file)
96
97$(ROOTMANIFESTDIR):
98	$(INS.dir)
99
100$(ROOTMANIFESTDIR)/%.xml: ../common/%.xml
101	$(INS.file)
102
103$(ROOTMANIFESTDIR)/notify-params.xml: ../../notify-params.xml
104	$(INS.file) ../../notify-params.xml
105
106install_h:
107
108install: all $(ROOTLIBNOTIFY) $(ROOTPROG) $(ROOTHELPER) $(ROOTMANIFESTDIR) \
109$(ROOTMANIFEST) $(ROOTNOTIFYPARAMS)
110