Makefile revision 24fe0b3bf671e123467ce1df0b67cadd3614c8e4
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 (the "License").
821d2613356f81e5bb5c107288d6d5cf35c2a1e8Mark Andrews# You may not use this file except in compliance with the License.
46e873c835bf7d9ec3e1097e0aceb8db5b1ae93aMark Andrews#
a3b428812703d22a605a9f882e71ed65f0ffdc65Mark Andrews# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews# or http://www.opensolaris.org/os/licensing.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# See the License for the specific language governing permissions
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# and limitations under the License.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews#
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# When distributing Covered Code, include this CDDL HEADER in each
01bf5871f8861eb805dd8ca79bdb9b0b9e4e6a5eMark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
c718d15a9a95054ee3c71540c02335426071fc6dMark Andrews# If applicable, add the following below this CDDL HEADER, with the
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews# fields enclosed by brackets "[]" replaced with your own identifying
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# information: Portions Copyright [yyyy] [name of copyright owner]
c718d15a9a95054ee3c71540c02335426071fc6dMark Andrews#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# CDDL HEADER END
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
c718d15a9a95054ee3c71540c02335426071fc6dMark Andrews# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
c718d15a9a95054ee3c71540c02335426071fc6dMark Andrews# Use is subject to license terms.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
821d2613356f81e5bb5c107288d6d5cf35c2a1e8Mark Andrews# cmd/picl/plugins/sun4u/enchilada/envd/Makefile
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson#
821d2613356f81e5bb5c107288d6d5cf35c2a1e8Mark Andrewsinclude $(SRC)/Makefile.psm
821d2613356f81e5bb5c107288d6d5cf35c2a1e8Mark Andrews
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonLIBRARY= libpiclenvd.a
821d2613356f81e5bb5c107288d6d5cf35c2a1e8Mark AndrewsVERS= .1
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
a3b428812703d22a605a9f882e71ed65f0ffdc65Mark AndrewsOBJECTS= piclenvd.o piclenvsetup.o
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
c718d15a9a95054ee3c71540c02335426071fc6dMark Andrews# include library definitions
c6d4f781529d2f28693546b25b2967d44ec89e60Mark Andrewsinclude $(SRC)/lib/Makefile.lib
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
c718d15a9a95054ee3c71540c02335426071fc6dMark AndrewsROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Blade-2500
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
c069a20053d41ae299eb9457e50ea44ae9f73ed2Mark Andrewsinclude $(SRC)/cmd/picl/plugins/Makefile.com
ed178efa9ab8f813538fce4ff603b81ded9f1799Mark Andrews
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsCPPFLAGS += -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS
605bd686e437162b5ab65ac4e7c1be0bba1886ddMark AndrewsCPPFLAGS += -I$(SRC)/uts/sun4u/ -I$(SRC)/uts/common/
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsCPPFLAGS += -I$(SRC)/uts/sun4u/enchilada
ede29aeb412c5448ab9a2028763ae08e7887ca74Mark AndrewsCPPFLAGS += -I$(SRC)/cmd/picl/plugins/lib/picld_pluginutil
1eb1e1e838d2ea00b166c918bf50764a95826be8Mark Andrews
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsSRCS= $(OBJECTS:%.o=%.c)
821d2613356f81e5bb5c107288d6d5cf35c2a1e8Mark Andrews
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonLIBS = $(DYNLIB)
821d2613356f81e5bb5c107288d6d5cf35c2a1e8Mark Andrews
821d2613356f81e5bb5c107288d6d5cf35c2a1e8Mark AndrewsROOTLIBDIR = $(ROOT_PLAT_PLUGINDIR)
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
821d2613356f81e5bb5c107288d6d5cf35c2a1e8Mark AndrewsCONF= envmodel.conf
821d2613356f81e5bb5c107288d6d5cf35c2a1e8Mark AndrewsROOTCONF= $(CONF:%=$(ROOTLIBDIR)/%)
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson$(ROOTCONF) := FILEMODE = 0644
821d2613356f81e5bb5c107288d6d5cf35c2a1e8Mark AndrewsINFOS= envmodel.info
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
26a77b80bb7ee886c6fa704348d5e80a011d8811Mark AndrewsLINTSRC = $(LINTLIB:%.ln=%)
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsROOTLINTDIR = $(ROOTLIBDIR)
7e5b2100ea65658a7ec3795919b4ecd29a6f118aMark AndrewsROOTLINT = $(LINTSRC:%=$(ROOTLINTDIR)/%)
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsCLEANFILES= $(LINTOUT) $(LINTLIB)
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
62ee2c9f460d2e2e45dcf1abc8b4b4a4a43f5618Mark AndrewsCFLAGS += $(CCVERBOSE)
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsDYNFLAGS += -R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsLDLIBS += -L$(SRC)/lib/libpicltree/$(MACH)
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark AndrewsLDLIBS += -L$(SRC)/cmd/picl/plugins/common/devtree
068a66979695c77359e7a9181bb3f831c965b21cMark AndrewsLDLIBS += -L$(SRC)/cmd/picl/plugins/lib/picld_pluginutil/$(MACH)
821d2613356f81e5bb5c107288d6d5cf35c2a1e8Mark AndrewsLDLIBS += -L$(ROOT)/usr/lib/picl/plugins -lpicldevtree -lpicltree
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonLDLIBS += -lpicld_pluginutil
821d2613356f81e5bb5c107288d6d5cf35c2a1e8Mark AndrewsLDLIBS += -ldevinfo -lc
821d2613356f81e5bb5c107288d6d5cf35c2a1e8Mark Andrews
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson.KEEP_STATE:
821d2613356f81e5bb5c107288d6d5cf35c2a1e8Mark Andrews
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonSUBDIRS=
821d2613356f81e5bb5c107288d6d5cf35c2a1e8Mark Andrews
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonPOFILE = piclenvd_enchilada.po
c25080dc50542213058c240226c9f342186e6285Mark AndrewsPOFILES = $(SRCS:%.c=%.po)
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews
46e873c835bf7d9ec3e1097e0aceb8db5b1ae93aMark Andrewsall := TARGET= all
46e873c835bf7d9ec3e1097e0aceb8db5b1ae93aMark Andrewsinstall := TARGET= install
dd9ad704c3800e3ab07ede8595871eac79984871Mark Andrewsclean := TARGET= clean
605bd686e437162b5ab65ac4e7c1be0bba1886ddMark Andrewsclobber := TARGET= clobber
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrewslint := TARGET= lint
413988c8166976498250c0ebb2e3a645d0366bd3Mark Andrews_msg := TARGET= _msg
605bd686e437162b5ab65ac4e7c1be0bba1886ddMark Andrews
6b5c57e52ac8c3e0af1547be3140ebbfb41a85b3Mark Andrewsall: $(LIBS) $(CONF) $(LIBLINKS)
6b5c57e52ac8c3e0af1547be3140ebbfb41a85b3Mark Andrews
413988c8166976498250c0ebb2e3a645d0366bd3Mark Andrewsinstall: $(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS) $(ROOTCONF)
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews$(CONF): $(INFOS)
6b5c57e52ac8c3e0af1547be3140ebbfb41a85b3Mark Andrews $(RM) $@
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews $(CPP) envmodel.info > $@
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews
6b5c57e52ac8c3e0af1547be3140ebbfb41a85b3Mark Andrews
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews$(POFILE): $(POFILES)
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews $(CAT) $(POFILES) > $(POFILE)
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews
642e0716c8b4ab82ebc8e60f94c9e897ee89f19aMark Andrews_msg: $(MSGDOMAIN) $(POFILE)
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews $(RM) $(MSGDOMAIN)/$(POFILE)
6b5c57e52ac8c3e0af1547be3140ebbfb41a85b3Mark Andrews $(CP) $(POFILE) $(MSGDOMAIN)/$(POFILE)
6b5c57e52ac8c3e0af1547be3140ebbfb41a85b3Mark Andrews
6b5c57e52ac8c3e0af1547be3140ebbfb41a85b3Mark Andrews$(MSGDOMAIN):
6b5c57e52ac8c3e0af1547be3140ebbfb41a85b3Mark Andrews $(INS.dir)
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews$(LIBLINKS): FRC
6b5c57e52ac8c3e0af1547be3140ebbfb41a85b3Mark Andrews $(RM) $@; $(SYMLINK) $(DYNLIB) $@
413988c8166976498250c0ebb2e3a645d0366bd3Mark Andrews
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews# include library targets
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrewsinclude $(SRC)/lib/Makefile.targ
6b5c57e52ac8c3e0af1547be3140ebbfb41a85b3Mark Andrewsinclude $(SRC)/cmd/picl/plugins/Makefile.targ
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews$(ROOTLINTDIR)/%: ../%
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews $(INS.file)
6b5c57e52ac8c3e0af1547be3140ebbfb41a85b3Mark Andrews
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrewslint:
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews $(LINT.c) $(SRCS)
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews$(SUBDIRS): FRC
6b5c57e52ac8c3e0af1547be3140ebbfb41a85b3Mark Andrews @cd $@; pwd; $(MAKE) $(TARGET)
ed178efa9ab8f813538fce4ff603b81ded9f1799Mark Andrews
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsFRC:
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews