dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / usr / src / cmd / picl / plugins / common / piclevent / Makefile
blob286af5cf952a7bf79d50bfe21f1913c58527a221
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
22 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
26 LIBRARY= libpiclevent.a
27 VERS= .1
29 OBJECTS= piclevent.o
31 # include library definitions
32 include $(SRC)/lib/Makefile.lib
34 include $(SRC)/cmd/picl/plugins/Makefile.com
36 MODULES = picl_slm.so
37 MOD_SRCS = picl_slm.c
38 MOD_OBJS = picl_slm.o
39 MOD_LDLIBS = -L$(ROOT)/usr/lib -lsysevent -lnvpair -lc
41 # sysevent SLM dirs
42 SYSEVENT = sysevent
43 MODDIR = modules
44 ROOTLIBSYSEVENTDIR = $(ROOTLIB)/$(SYSEVENT)
45 ROOTLIBSYSEVENTMODDIR = $(ROOTLIBSYSEVENTDIR)/$(MODDIR)
46 ROOTLIBSYSEVENTMODULES = $(MODULES:%=$(ROOTLIBSYSEVENTMODDIR)/%)
47 ROOTETCSYSEVENTDIR = $(ROOTETC)/$(SYSEVENT)
49 SRCS= $(OBJECTS:%.o=%.c)
51 LIBS = $(DYNLIB)
53 ROOTLIBDIR = $(USR_LIB_PLUGINDIR)
54 ROOTETC = $(ROOT)/etc
55 ROOTLIB = $(ROOT)/usr/lib
57 CLOBBERFILES += $(LIBLINKS)
58 CLOBBERFILES += $(MODULES)
60 CPPFLAGS += -I$(SRC)/lib/libsysevent -I$(SRC)/uts/sun
62 CFLAGS += $(C_PICFLAGS)
63 LDLIBS += -L$(SRC)/lib/libsysevent -L$(SRC)/lib/libpicltree/$(MACH)
64 LDLIBS += -lc -lpicltree -lnvpair
67 .KEEP_STATE:
69 SUBDIRS=
71 POFILE= piclevent.po
73 all := TARGET= all
74 install := TARGET= install
75 clean := TARGET= clean
76 clobber := TARGET= clobber
77 _msg := TARGET= _msg
79 all: $(LIBS) $(LIBLINKS) $(MODULES)
81 install: $(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS) \
82 $(ROOTETCSYSEVENTDIR) \
83 $(ROOTLIBSYSEVENTDIR) \
84 $(ROOTLIBSYSEVENTMODDIR) \
85 $(ROOTLIBSYSEVENTMODULES)
87 _msg: $(MSGDOMAIN) $(POFILE)
88 $(RM) $(MSGDOMAIN)/$(POFILE)
89 $(CP) $(POFILE) $(MSGDOMAIN)
92 $(MSGDOMAIN):
93 $(INS.dir)
95 $(LIBLINKS): FRC
96 $(RM) $@; $(SYMLINK) $(DYNLIB) $@
98 # include library targets
99 include $(SRC)/cmd/picl/plugins/Makefile.targ
100 include $(SRC)/lib/Makefile.targ
102 %.so: %.o
103 $(LINK.c) -o $@ $(GSHARED) -h $@ $< $(MOD_LDLIBS)
105 %.o: %.c
106 $(COMPILE.c) -o $@ $<
108 $(SUBDIRS): FRC
109 @cd $@; pwd; $(MAKE) $(TARGET)
111 $(ROOTLIBSYSEVENTDIR):
112 $(INS.dir)
114 $(ROOTETCSYSEVENTDIR):
115 $(INS.dir)
117 $(ROOTLIBSYSEVENTDIR)/%: %
118 $(INS.file)
120 $(ROOTLIBSYSEVENTMODDIR):
121 $(INS.dir)
123 $(ROOTLIBSYSEVENTMODDIR)/%.so: %.so
124 $(INS.file)
126 FRC: