9027 Makefiles need to specify C99 mode consistently
[unleashed.git] / usr / src / cmd / fm / notify / smtp-notify / Makefile.com
blob2d27ca33872207b7d89673891ee3ebea424282f0
2 # CDDL HEADER START
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.
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.
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]
19 # CDDL HEADER END
23 # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
26 .KEEP_STATE:
27 .SUFFIXES:
29 SRCS += smtp-notify.c
30 OBJS = $(SRCS:%.c=%.o)
31 LINTFILES = $(SRCS:%.c=%.ln)
33 PROG = smtp-notify
34 HELPER = process_msg_template.sh
35 ROOTLIBFM = $(ROOT)/usr/lib/fm
36 ROOTLIBNOTIFY = $(ROOT)/usr/lib/fm/notify
37 ROOTPROG = $(ROOTLIBNOTIFY)/$(PROG)
38 ROOTHELPER = $(ROOTLIBNOTIFY)/$(HELPER)
40 ROOTMANIFESTDIR = $(ROOTSVCSYSTEM)/fm
41 ROOTMANIFEST = $(ROOTMANIFESTDIR)/$(PROG).xml
42 ROOTNOTIFYPARAMS = $(ROOTMANIFESTDIR)/notify-params.xml
43 $(ROOTMANIFEST) := FILEMODE = 0444
44 $(ROOTNOTIFYPARAMS) := FILEMODE = 0444
46 $(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
47 CPPFLAGS += -I. -I../common -I../../../../../lib/fm/libfmnotify/common
48 CSTD    = $(CSTD_GNU99)
49 CFLAGS += $(CTF_FLAGS) $(CCVERBOSE) $(XSTRCONST)
50 LDLIBS += -L$(ROOT)/usr/lib/fm -lnvpair -lfmevent -lfmd_msg -lfmnotify \
51 -lumem
52 LDFLAGS += -R/usr/lib/fm
53 LINTFLAGS += -mnu
55 CERRWARN += -_gcc=-Wno-parentheses
57 .NO_PARALLEL:
58 .PARALLEL: $(OBJS) $(LINTFILES)
60 all: $(PROG) $(HELPER)
62 $(PROG): $(OBJS)
63         $(LINK.c) $(OBJS) -o $@ $(LDLIBS)
64         $(CTFMERGE) -L VERSION -o $@ $(OBJS)
65         $(POST_PROCESS)
67 $(HELPER): ../common/$(HELPER)
68         $(CP) ../common/$(HELPER) .
70 %.o: ../common/%.c
71         $(COMPILE.c) $<
72         $(CTFCONVERT_O)
74 %.o: %.c
75         $(COMPILE.c) $<
76         $(CTFCONVERT_O)
78 clean:
79         $(RM) $(OBJS) $(HELPER) $(LINTFILES)
81 clobber: clean
82         $(RM) $(PROG)
84 %.ln: ../common/%.c
85         $(LINT.c) -c $<
87 %.ln: %.c
88         $(LINT.c) -c $<
90 lint: $(LINTFILES)
91         $(LINT) $(LINTFLAGS) $(LINTFILES)
93 $(ROOTLIBNOTIFY):
94         $(INS.dir)
96 $(ROOTLIBNOTIFY)/%: %
97         $(INS.file)
99 $(ROOTMANIFESTDIR):
100         $(INS.dir)
102 $(ROOTMANIFESTDIR)/%.xml: ../common/%.xml
103         $(INS.file)
105 $(ROOTMANIFESTDIR)/notify-params.xml: ../../notify-params.xml
106         $(INS.file) ../../notify-params.xml
108 install_h:
110 install: all $(ROOTLIBNOTIFY) $(ROOTPROG) $(ROOTHELPER) $(ROOTMANIFESTDIR) \
111 $(ROOTMANIFEST) $(ROOTNOTIFYPARAMS)