Makefile revision 7c478bd95313f5f23a4c958a745db2134aa03244
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington#
7e5b2100ea65658a7ec3795919b4ecd29a6f118aMark Andrews# CDDL HEADER START
7e5b2100ea65658a7ec3795919b4ecd29a6f118aMark Andrews#
eae67738cba5ca069e9d1d4e7b836a2f7b00a374Mark Andrews# The contents of this file are subject to the terms of the
eae67738cba5ca069e9d1d4e7b836a2f7b00a374Mark Andrews# Common Development and Distribution License, Version 1.0 only
821d2613356f81e5bb5c107288d6d5cf35c2a1e8Mark Andrews# (the "License"). You may not use this file except in compliance
46e873c835bf7d9ec3e1097e0aceb8db5b1ae93aMark Andrews# with the License.
a3b428812703d22a605a9f882e71ed65f0ffdc65Mark Andrews#
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# or http://www.opensolaris.org/os/licensing.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# See the License for the specific language governing permissions
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# and limitations under the License.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington#
01bf5871f8861eb805dd8ca79bdb9b0b9e4e6a5eMark Andrews# When distributing Covered Code, include this CDDL HEADER in each
c718d15a9a95054ee3c71540c02335426071fc6dMark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews# If applicable, add the following below this CDDL HEADER, with the
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# fields enclosed by brackets "[]" replaced with your own identifying
c718d15a9a95054ee3c71540c02335426071fc6dMark Andrews# information: Portions Copyright [yyyy] [name of copyright owner]
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# CDDL HEADER END
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
c718d15a9a95054ee3c71540c02335426071fc6dMark Andrews#
c718d15a9a95054ee3c71540c02335426071fc6dMark Andrews# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# Use is subject to license terms.
821d2613356f81e5bb5c107288d6d5cf35c2a1e8Mark Andrews#
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# ident "%Z%%M% %I% %E% SMI"
821d2613356f81e5bb5c107288d6d5cf35c2a1e8Mark Andrews#
821d2613356f81e5bb5c107288d6d5cf35c2a1e8Mark Andrews
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonLIBRARY= libpiclevent.a
821d2613356f81e5bb5c107288d6d5cf35c2a1e8Mark AndrewsVERS= .1
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
a3b428812703d22a605a9f882e71ed65f0ffdc65Mark AndrewsOBJECTS= piclevent.o
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
c718d15a9a95054ee3c71540c02335426071fc6dMark Andrews# include library definitions
c6d4f781529d2f28693546b25b2967d44ec89e60Mark Andrewsinclude $(SRC)/lib/Makefile.lib
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
c718d15a9a95054ee3c71540c02335426071fc6dMark Andrewsinclude $(SRC)/cmd/picl/plugins/Makefile.com
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
c069a20053d41ae299eb9457e50ea44ae9f73ed2Mark AndrewsMODULES = picl_slm.so
ed178efa9ab8f813538fce4ff603b81ded9f1799Mark AndrewsMOD_SRCS = picl_slm.c
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsMOD_OBJS = picl_slm.o
605bd686e437162b5ab65ac4e7c1be0bba1886ddMark AndrewsMOD_LDLIBS = -L$(ROOT)/usr/lib -lsysevent -lnvpair -lc
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
ede29aeb412c5448ab9a2028763ae08e7887ca74Mark Andrews# sysevent SLM dirs
1eb1e1e838d2ea00b166c918bf50764a95826be8Mark AndrewsSYSEVENT = sysevent
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsMODDIR = modules
821d2613356f81e5bb5c107288d6d5cf35c2a1e8Mark AndrewsROOTLIBSYSEVENTDIR = $(ROOTLIB)/$(SYSEVENT)
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonROOTLIBSYSEVENTMODDIR = $(ROOTLIBSYSEVENTDIR)/$(MODDIR)
821d2613356f81e5bb5c107288d6d5cf35c2a1e8Mark AndrewsROOTLIBSYSEVENTMODULES = $(MODULES:%=$(ROOTLIBSYSEVENTMODDIR)/%)
821d2613356f81e5bb5c107288d6d5cf35c2a1e8Mark AndrewsROOTETCSYSEVENTDIR = $(ROOTETC)/$(SYSEVENT)
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
821d2613356f81e5bb5c107288d6d5cf35c2a1e8Mark AndrewsSRCS= $(OBJECTS:%.o=%.c)
821d2613356f81e5bb5c107288d6d5cf35c2a1e8Mark Andrews
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonLIBS = $(DYNLIB)
821d2613356f81e5bb5c107288d6d5cf35c2a1e8Mark Andrews
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonROOTLIBDIR = $(USR_LIB_PLUGINDIR)
26a77b80bb7ee886c6fa704348d5e80a011d8811Mark AndrewsROOTETC = $(ROOT)/etc
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsROOTLIB = $(ROOT)/usr/lib
7e5b2100ea65658a7ec3795919b4ecd29a6f118aMark Andrews
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsCLEANFILES= $(LINTOUT) $(LINTLIB) $(MOD_OBJS)
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsCLOBBERFILES += $(LIBLINKS)
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsCLOBBERFILES += $(MODULES)
62ee2c9f460d2e2e45dcf1abc8b4b4a4a43f5618Mark Andrews
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsCPPFLAGS += -I$(SRC)/lib/libsysevent -I$(SRC)/uts/sun
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark AndrewsCFLAGS += $(CCVERBOSE) $(C_PICFLAGS)
068a66979695c77359e7a9181bb3f831c965b21cMark AndrewsCPPFLAGS += -D_REENTRANT
821d2613356f81e5bb5c107288d6d5cf35c2a1e8Mark AndrewsLDLIBS += -L$(SRC)/lib/libsysevent -L$(SRC)/lib/libpicltree/$(MACH)
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonLDLIBS += -lc -lpicltree -lnvpair
821d2613356f81e5bb5c107288d6d5cf35c2a1e8Mark Andrews
821d2613356f81e5bb5c107288d6d5cf35c2a1e8Mark AndrewsLINTFLAGS += -L$(SRC)/lib/libpicltree/$(MACH) -lpicltree
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
821d2613356f81e5bb5c107288d6d5cf35c2a1e8Mark Andrews
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson$(ROOTLIBSYSEVENTDIR) := OWNER= root
821d2613356f81e5bb5c107288d6d5cf35c2a1e8Mark Andrews$(ROOTLIBSYSEVENTDIR) := GROUP= bin
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
c25080dc50542213058c240226c9f342186e6285Mark Andrews$(ROOTLIBSYSEVENTMODDIR) := OWNER= root
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews$(ROOTLIBSYSEVENTMODDIR) := GROUP= bin
46e873c835bf7d9ec3e1097e0aceb8db5b1ae93aMark Andrews
46e873c835bf7d9ec3e1097e0aceb8db5b1ae93aMark Andrews$(ROOTLIBSYSEVENTMODULES) := OWNER= root
642e0716c8b4ab82ebc8e60f94c9e897ee89f19aMark Andrews$(ROOTLIBSYSEVENTMODULES) := GROUP= bin
605bd686e437162b5ab65ac4e7c1be0bba1886ddMark Andrews
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews
413988c8166976498250c0ebb2e3a645d0366bd3Mark Andrews.KEEP_STATE:
605bd686e437162b5ab65ac4e7c1be0bba1886ddMark Andrews
6b5c57e52ac8c3e0af1547be3140ebbfb41a85b3Mark AndrewsSUBDIRS=
6b5c57e52ac8c3e0af1547be3140ebbfb41a85b3Mark Andrews
413988c8166976498250c0ebb2e3a645d0366bd3Mark AndrewsPOFILE= piclevent.po
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrewsall := TARGET= all
6b5c57e52ac8c3e0af1547be3140ebbfb41a85b3Mark Andrewsinstall := TARGET= install
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrewsclean := TARGET= clean
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrewsclobber := TARGET= clobber
6b5c57e52ac8c3e0af1547be3140ebbfb41a85b3Mark Andrewslint := TARGET= lint
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews_msg := TARGET= _msg
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrewsall: $(LIBS) $(LIBLINKS) $(MODULES)
642e0716c8b4ab82ebc8e60f94c9e897ee89f19aMark Andrews
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrewsinstall: $(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS) \
6b5c57e52ac8c3e0af1547be3140ebbfb41a85b3Mark Andrews $(ROOTETCSYSEVENTDIR) \
6b5c57e52ac8c3e0af1547be3140ebbfb41a85b3Mark Andrews $(ROOTLIBSYSEVENTDIR) \
6b5c57e52ac8c3e0af1547be3140ebbfb41a85b3Mark Andrews $(ROOTLIBSYSEVENTMODDIR) \
6b5c57e52ac8c3e0af1547be3140ebbfb41a85b3Mark Andrews $(ROOTLIBSYSEVENTMODULES)
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews_msg: $(MSGDOMAIN) $(POFILE)
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews $(RM) $(MSGDOMAIN)/$(POFILE)
6b5c57e52ac8c3e0af1547be3140ebbfb41a85b3Mark Andrews $(CP) $(POFILE) $(MSGDOMAIN)
413988c8166976498250c0ebb2e3a645d0366bd3Mark Andrews
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews$(MSGDOMAIN):
6b5c57e52ac8c3e0af1547be3140ebbfb41a85b3Mark Andrews $(INS.dir)
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews$(LIBLINKS): FRC
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews $(RM) $@; $(SYMLINK) $(DYNLIB) $@
6b5c57e52ac8c3e0af1547be3140ebbfb41a85b3Mark Andrews
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews# include library targets
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrewsinclude $(SRC)/cmd/picl/plugins/Makefile.targ
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrewsinclude $(SRC)/lib/Makefile.targ
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
6b5c57e52ac8c3e0af1547be3140ebbfb41a85b3Mark Andrewslint :
ed178efa9ab8f813538fce4ff603b81ded9f1799Mark Andrews $(LINT.c) $(SRCS)
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews%.so: %.o
46e873c835bf7d9ec3e1097e0aceb8db5b1ae93aMark Andrews $(LINK.c) -o $@ $(GSHARED) -h $@ $< $(MOD_LDLIBS)
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews%.o: %.c
46e873c835bf7d9ec3e1097e0aceb8db5b1ae93aMark Andrews $(COMPILE.c) -o $@ $<
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
ed178efa9ab8f813538fce4ff603b81ded9f1799Mark Andrews$(SUBDIRS): FRC
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews @cd $@; pwd; $(MAKE) $(TARGET)
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews
46e873c835bf7d9ec3e1097e0aceb8db5b1ae93aMark Andrews$(ROOTLIBSYSEVENTDIR):
46e873c835bf7d9ec3e1097e0aceb8db5b1ae93aMark Andrews $(INS.dir)
6b5c57e52ac8c3e0af1547be3140ebbfb41a85b3Mark Andrews
6b5c57e52ac8c3e0af1547be3140ebbfb41a85b3Mark Andrews$(ROOTETCSYSEVENTDIR):
605bd686e437162b5ab65ac4e7c1be0bba1886ddMark Andrews $(INS.dir)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews$(ROOTLIBSYSEVENTDIR)/%: %
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews $(INS.file)
62ee2c9f460d2e2e45dcf1abc8b4b4a4a43f5618Mark Andrews
1eb1e1e838d2ea00b166c918bf50764a95826be8Mark Andrews$(ROOTLIBSYSEVENTMODDIR):
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews $(INS.dir)
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews
ea206aebcafe1ed5d470dd99daab9a1cedc81c7cMark Andrews$(ROOTLIBSYSEVENTMODDIR)/%.so: %.so
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson $(INS.file)
ea206aebcafe1ed5d470dd99daab9a1cedc81c7cMark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark AndrewsFRC:
ca12f7f4cf72e2368ee946f3eb4915ab73576cdcMark Andrews