Makefiles need to specify C99 mode consistently
[unleashed.git] / usr / src / cmd / fm / notify / smtp-notify / Makefile.com
blob26ee8b342b27b7f94c904c1f05794dc43f455704
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)
32 PROG = smtp-notify
33 HELPER = process_msg_template.sh
34 ROOTLIBFM = $(ROOT)/usr/lib/fm
35 ROOTLIBNOTIFY = $(ROOT)/usr/lib/fm/notify
36 ROOTPROG = $(ROOTLIBNOTIFY)/$(PROG)
37 ROOTHELPER = $(ROOTLIBNOTIFY)/$(HELPER)
39 ROOTMANIFESTDIR = $(ROOTSVCSYSTEM)/fm
40 ROOTMANIFEST = $(ROOTMANIFESTDIR)/$(PROG).xml
41 ROOTNOTIFYPARAMS = $(ROOTMANIFESTDIR)/notify-params.xml
42 $(ROOTMANIFEST) := FILEMODE = 0444
43 $(ROOTNOTIFYPARAMS) := FILEMODE = 0444
45 $(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
46 CPPFLAGS += -I. -I../common -I../../../../../lib/fm/libfmnotify/common
47 CSTD    = $(CSTD_GNU99)
48 CFLAGS += $(CTF_FLAGS)
49 LDLIBS += -L$(ROOT)/usr/lib/fm -lnvpair -lfmevent -lfmd_msg -lfmnotify \
50 -lumem
51 LDFLAGS += -R/usr/lib/fm
53 CERRWARN += -Wno-parentheses
55 .NO_PARALLEL:
56 .PARALLEL: $(OBJS)
58 all: $(PROG) $(HELPER)
60 $(PROG): $(OBJS)
61         $(LINK.c) $(OBJS) -o $@ $(LDLIBS)
62         $(CTFMERGE) -L VERSION -o $@ $(OBJS)
63         $(POST_PROCESS)
65 $(HELPER): ../common/$(HELPER)
66         $(CP) ../common/$(HELPER) .
68 %.o: ../common/%.c
69         $(COMPILE.c) $<
70         $(CTFCONVERT_O)
72 %.o: %.c
73         $(COMPILE.c) $<
74         $(CTFCONVERT_O)
76 clean:
77         $(RM) $(OBJS) $(HELPER)
79 clobber: clean
80         $(RM) $(PROG)
82 $(ROOTLIBNOTIFY):
83         $(INS.dir)
85 $(ROOTLIBNOTIFY)/%: %
86         $(INS.file)
88 $(ROOTMANIFESTDIR):
89         $(INS.dir)
91 $(ROOTMANIFESTDIR)/%.xml: ../common/%.xml
92         $(INS.file)
94 $(ROOTMANIFESTDIR)/notify-params.xml: ../../notify-params.xml
95         $(INS) -m $(FILEMODE) ../../notify-params.xml $@
97 install_h:
99 install: all $(ROOTLIBNOTIFY) $(ROOTPROG) $(ROOTHELPER) $(ROOTMANIFESTDIR) \
100 $(ROOTMANIFEST) $(ROOTNOTIFYPARAMS)