diff options
author | Rob Johnston <rob.johnston@joyent.com> | 2019-02-28 02:37:58 +0000 |
---|---|---|
committer | Rob Johnston <rob.johnston@joyent.com> | 2019-02-28 02:37:58 +0000 |
commit | 345c04aad21914e48bc26fcdcd61c8289740b412 (patch) | |
tree | eb8d4fa63627799db52604c6aabbe689924fd89a | |
parent | 1037c798aa754e2a01dd6d62949caf6dc3b5dbc2 (diff) | |
download | illumos-joyent-345c04aad21914e48bc26fcdcd61c8289740b412.tar.gz |
Tweaks to Makefile.plugin.* to handle shared module source scenarios
Conversion of nic plugin
Conversion of ses plugin
16 files changed, 145 insertions, 42 deletions
diff --git a/usr/src/lib/fm/topo/modules/Makefile.plugin.32 b/usr/src/lib/fm/topo/modules/Makefile.plugin.32 index a7d6fdca71..c5d46967fb 100644 --- a/usr/src/lib/fm/topo/modules/Makefile.plugin.32 +++ b/usr/src/lib/fm/topo/modules/Makefile.plugin.32 @@ -35,7 +35,11 @@ $(PROG): $(OBJS) $(APIMAP) $(COMPILE.c) $< $(CTFCONVERT_O) -%.o: ../common/$(SHAREDMODULE)/%.c +%.o: ../../$(SHAREDMODULE)/%.c + $(COMPILE.c) $< + $(CTFCONVERT_O) + +%.o: ../../$(SHAREDMODULE)/common/%.c $(COMPILE.c) $< $(CTFCONVERT_O) diff --git a/usr/src/lib/fm/topo/modules/Makefile.plugin.64 b/usr/src/lib/fm/topo/modules/Makefile.plugin.64 index 2013ff3981..2e26d275f2 100644 --- a/usr/src/lib/fm/topo/modules/Makefile.plugin.64 +++ b/usr/src/lib/fm/topo/modules/Makefile.plugin.64 @@ -36,7 +36,11 @@ $(PROG): $(OBJS) $(APIMAP) $(COMPILE64.c) $< $(CTFCONVERT_O) -%.o: ../common/$(SHAREDMODULE)/%.c +%.o: ../../$(SHAREDMODULE)/%.c + $(COMPILE64.c) $< + $(CTFCONVERT_O) + +%.o: ../../$(SHAREDMODULE)/common/%.c $(COMPILE64.c) $< $(CTFCONVERT_O) diff --git a/usr/src/lib/fm/topo/modules/common/ipmi/amd64/Makefile b/usr/src/lib/fm/topo/modules/common/ipmi/amd64/Makefile index c9bf834018..94b887cf80 100644 --- a/usr/src/lib/fm/topo/modules/common/ipmi/amd64/Makefile +++ b/usr/src/lib/fm/topo/modules/common/ipmi/amd64/Makefile @@ -15,4 +15,4 @@ include ../Makefile.com include $(SRC)/lib/fm/topo/modules/Makefile.plugin.64 -LDLIBS += -lipmi -lnsl +LDLIBS64 += -lipmi -lnsl diff --git a/usr/src/lib/fm/topo/modules/common/ipmi/sparcv9/Makefile b/usr/src/lib/fm/topo/modules/common/ipmi/sparcv9/Makefile index c9bf834018..94b887cf80 100644 --- a/usr/src/lib/fm/topo/modules/common/ipmi/sparcv9/Makefile +++ b/usr/src/lib/fm/topo/modules/common/ipmi/sparcv9/Makefile @@ -15,4 +15,4 @@ include ../Makefile.com include $(SRC)/lib/fm/topo/modules/Makefile.plugin.64 -LDLIBS += -lipmi -lnsl +LDLIBS64 += -lipmi -lnsl diff --git a/usr/src/lib/fm/topo/modules/common/nic/Makefile b/usr/src/lib/fm/topo/modules/common/nic/Makefile index 084b49dcd1..ab3dd4cf20 100644 --- a/usr/src/lib/fm/topo/modules/common/nic/Makefile +++ b/usr/src/lib/fm/topo/modules/common/nic/Makefile @@ -10,17 +10,23 @@ # # -# Copyright (c) 2017, Joyent, Inc. +# Copyright (c) 2019, Joyent, Inc. # +include $(SRC)/Makefile.master -MODULE = nic -CLASS = common -SHAREDMODULE = shared +SUBDIRS = $(MACH) +$(BUILD64)SUBDIRS += $(MACH64) -MODULESRCS = topo_nic.c -SHAREDSRCS = topo_port.c topo_transceiver.c +all := TARGET = all +clean := TARGET = clean +clobber := TARGET = clobber +install := TARGET = install -include ../../Makefile.plugin +.KEEP_STATE: -CPPFLAGS += -I../shared -LDLIBS += -ldevinfo -ldladm -lsff +all clean clobber install: $(SUBDIRS) + +$(SUBDIRS): FRC + @cd $@; pwd; $(MAKE) $(TARGET) + +FRC: diff --git a/usr/src/lib/fm/topo/modules/common/nic/Makefile.com b/usr/src/lib/fm/topo/modules/common/nic/Makefile.com new file mode 100644 index 0000000000..b159b4f4ea --- /dev/null +++ b/usr/src/lib/fm/topo/modules/common/nic/Makefile.com @@ -0,0 +1,21 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright (c) 2019, Joyent, Inc. +# + +MODULE = nic +CLASS = common +SHAREDMODULE = shared + +MODULESRCS = topo_nic.c +SHAREDSRCS = topo_port.c topo_transceiver.c diff --git a/usr/src/lib/fm/topo/modules/common/nic/amd64/Makefile b/usr/src/lib/fm/topo/modules/common/nic/amd64/Makefile new file mode 100644 index 0000000000..9c26857992 --- /dev/null +++ b/usr/src/lib/fm/topo/modules/common/nic/amd64/Makefile @@ -0,0 +1,19 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright (c) 2019, Joyent, Inc. +# +include ../Makefile.com +include $(SRC)/lib/fm/topo/modules/Makefile.plugin.64 + +CPPFLAGS += -I../../shared +LDLIBS64 += -ldevinfo -ldladm -lsff diff --git a/usr/src/lib/fm/topo/modules/common/nic/topo_nic.c b/usr/src/lib/fm/topo/modules/common/nic/common/topo_nic.c index 51c37142c5..51c37142c5 100644 --- a/usr/src/lib/fm/topo/modules/common/nic/topo_nic.c +++ b/usr/src/lib/fm/topo/modules/common/nic/common/topo_nic.c diff --git a/usr/src/lib/fm/topo/modules/common/nic/topo_nic.h b/usr/src/lib/fm/topo/modules/common/nic/common/topo_nic.h index ba661542c4..ba661542c4 100644 --- a/usr/src/lib/fm/topo/modules/common/nic/topo_nic.h +++ b/usr/src/lib/fm/topo/modules/common/nic/common/topo_nic.h diff --git a/usr/src/lib/fm/topo/modules/common/nic/i386/Makefile b/usr/src/lib/fm/topo/modules/common/nic/i386/Makefile new file mode 100644 index 0000000000..26525658c9 --- /dev/null +++ b/usr/src/lib/fm/topo/modules/common/nic/i386/Makefile @@ -0,0 +1,19 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright (c) 2019, Joyent, Inc. +# +include ../Makefile.com +include $(SRC)/lib/fm/topo/modules/Makefile.plugin.32 + +CPPFLAGS += -I../../shared +LDLIBS += -ldevinfo -ldladm -lsff diff --git a/usr/src/lib/fm/topo/modules/common/nic/sparc/Makefile b/usr/src/lib/fm/topo/modules/common/nic/sparc/Makefile new file mode 100644 index 0000000000..26525658c9 --- /dev/null +++ b/usr/src/lib/fm/topo/modules/common/nic/sparc/Makefile @@ -0,0 +1,19 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright (c) 2019, Joyent, Inc. +# +include ../Makefile.com +include $(SRC)/lib/fm/topo/modules/Makefile.plugin.32 + +CPPFLAGS += -I../../shared +LDLIBS += -ldevinfo -ldladm -lsff diff --git a/usr/src/lib/fm/topo/modules/common/nic/sparcv9/Makefile b/usr/src/lib/fm/topo/modules/common/nic/sparcv9/Makefile new file mode 100644 index 0000000000..9c26857992 --- /dev/null +++ b/usr/src/lib/fm/topo/modules/common/nic/sparcv9/Makefile @@ -0,0 +1,19 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright (c) 2019, Joyent, Inc. +# +include ../Makefile.com +include $(SRC)/lib/fm/topo/modules/Makefile.plugin.64 + +CPPFLAGS += -I../../shared +LDLIBS64 += -ldevinfo -ldladm -lsff diff --git a/usr/src/lib/fm/topo/modules/common/ses/Makefile b/usr/src/lib/fm/topo/modules/common/ses/Makefile index acd772c92f..ab3dd4cf20 100644 --- a/usr/src/lib/fm/topo/modules/common/ses/Makefile +++ b/usr/src/lib/fm/topo/modules/common/ses/Makefile @@ -1,40 +1,32 @@ # -# CDDL HEADER START +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. # -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. # + # -# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. -# Copyright (c) 2018, Joyent, Inc. +# Copyright (c) 2019, Joyent, Inc. # +include $(SRC)/Makefile.master -MODULE = ses -CLASS = common -SHAREDMODULE = disk +SUBDIRS = $(MACH) +$(BUILD64)SUBDIRS += $(MACH64) -MODULESRCS = ses.c ses_facility.c -SHAREDSRCS = disk_common.c +all := TARGET = all +clean := TARGET = clean +clobber := TARGET = clobber +install := TARGET = install -include ../../Makefile.plugin +.KEEP_STATE: -CPPFLAGS += -I../disk +all clean clobber install: $(SUBDIRS) -LDLIBS += -L$(ROOTLIBDIR)/scsi -R/usr/lib/scsi -lses -LDLIBS += -ldevinfo -ldevid -ldiskstatus -lcontract -lsysevent -ldiskmgt +$(SUBDIRS): FRC + @cd $@; pwd; $(MAKE) $(TARGET) -CLOBBERFILES += disk_common.ln +FRC: diff --git a/usr/src/lib/fm/topo/modules/common/ses/ses.c b/usr/src/lib/fm/topo/modules/common/ses/common/ses.c index 081ed619ec..081ed619ec 100644 --- a/usr/src/lib/fm/topo/modules/common/ses/ses.c +++ b/usr/src/lib/fm/topo/modules/common/ses/common/ses.c diff --git a/usr/src/lib/fm/topo/modules/common/ses/ses.h b/usr/src/lib/fm/topo/modules/common/ses/common/ses.h index 21e8c517d6..21e8c517d6 100644 --- a/usr/src/lib/fm/topo/modules/common/ses/ses.h +++ b/usr/src/lib/fm/topo/modules/common/ses/common/ses.h diff --git a/usr/src/lib/fm/topo/modules/common/ses/ses_facility.c b/usr/src/lib/fm/topo/modules/common/ses/common/ses_facility.c index 2c4a1314e3..2c4a1314e3 100644 --- a/usr/src/lib/fm/topo/modules/common/ses/ses_facility.c +++ b/usr/src/lib/fm/topo/modules/common/ses/common/ses_facility.c |