xref: /titanic_41/usr/src/cmd/ldmad/Makefile (revision 7014882c6a3672fd0e5d60200af8643ae53c5928)
149bfb42bSAlexandre Chartre#
249bfb42bSAlexandre Chartre# CDDL HEADER START
349bfb42bSAlexandre Chartre#
449bfb42bSAlexandre Chartre# The contents of this file are subject to the terms of the
549bfb42bSAlexandre Chartre# Common Development and Distribution License (the "License").
649bfb42bSAlexandre Chartre# You may not use this file except in compliance with the License.
749bfb42bSAlexandre Chartre#
849bfb42bSAlexandre Chartre# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
949bfb42bSAlexandre Chartre# or http://www.opensolaris.org/os/licensing.
1049bfb42bSAlexandre Chartre# See the License for the specific language governing permissions
1149bfb42bSAlexandre Chartre# and limitations under the License.
1249bfb42bSAlexandre Chartre#
1349bfb42bSAlexandre Chartre# When distributing Covered Code, include this CDDL HEADER in each
1449bfb42bSAlexandre Chartre# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1549bfb42bSAlexandre Chartre# If applicable, add the following below this CDDL HEADER, with the
1649bfb42bSAlexandre Chartre# fields enclosed by brackets "[]" replaced with your own identifying
1749bfb42bSAlexandre Chartre# information: Portions Copyright [yyyy] [name of copyright owner]
1849bfb42bSAlexandre Chartre#
1949bfb42bSAlexandre Chartre# CDDL HEADER END
2049bfb42bSAlexandre Chartre#
2149bfb42bSAlexandre Chartre#
2249bfb42bSAlexandre Chartre#
23b63861bbSAlexandre Chartre# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
2449bfb42bSAlexandre Chartre#
2549bfb42bSAlexandre Chartre
2649bfb42bSAlexandre ChartrePROG=		ldmad
2749bfb42bSAlexandre ChartreMANIFEST=	ldoms-agents.xml
2849bfb42bSAlexandre ChartreSVCMETHOD=	ldoms-agents
2949bfb42bSAlexandre Chartre
3049bfb42bSAlexandre Chartreinclude ../Makefile.cmd
3149bfb42bSAlexandre Chartre
3282629e30SMike Christensen
3382629e30SMike ChristensenLOCAL_SRCS=	ldmad.c			\
3449bfb42bSAlexandre Chartre		ldma_log.c		\
3549bfb42bSAlexandre Chartre		ldma_device.c		\
36fc256490SJason Beloro		ldma_system.c		\
37fc256490SJason Beloro		ldma_dio.c		\
38fc256490SJason Beloro		mdesc_lib.c
3949bfb42bSAlexandre Chartre
4082629e30SMike ChristensenLOCAL_OBJS=	$(LOCAL_SRCS:%.c=%.o)
4149bfb42bSAlexandre Chartre
4282629e30SMike ChristensenCOMMONBASE = ../../common
4382629e30SMike Christensen
4482629e30SMike ChristensenCOMMON_SRCS =	mdesc_findname.c	\
4582629e30SMike Christensen		mdesc_findnodeprop.c	\
4682629e30SMike Christensen		mdesc_fini.c		\
4782629e30SMike Christensen		mdesc_getpropval.c	\
4882629e30SMike Christensen		mdesc_getpropstr.c	\
4982629e30SMike Christensen		mdesc_init_intern.c	\
5082629e30SMike Christensen		mdesc_nodecount.c	\
5182629e30SMike Christensen		mdesc_rootnode.c	\
5282629e30SMike Christensen		mdesc_scandag.c
5382629e30SMike Christensen
5482629e30SMike ChristensenCOMMON_OBJS =	$(COMMON_SRCS:%.c=%.o)
5582629e30SMike Christensen
5682629e30SMike ChristensenOBJS = $(LOCAL_OBJS) $(COMMON_OBJS)
5782629e30SMike ChristensenSRCS = $(LOCAL_SRCS) $(COMMON_SRCS:%.c=$(COMMONBASE)/mdesc/%.c)
5849bfb42bSAlexandre Chartre
5949bfb42bSAlexandre ChartreROOTCMDDIR=		$(ROOTLIB)/ldoms
6049bfb42bSAlexandre ChartreROOTMANIFESTDIR=	$(ROOTSVCPLATFORMSUN4V)
6149bfb42bSAlexandre Chartre$(ROOTMANIFEST)		:= FILEMODE= 444
6249bfb42bSAlexandre Chartre
6382629e30SMike ChristensenLDLIBS +=	-lds -ldladm -ldevinfo -lpri
6449bfb42bSAlexandre ChartreINCS +=		-I$(ROOT)/usr/platform/sun4v/include/sys
6582629e30SMike ChristensenINCS +=		-I$(SRC)/uts/sun4v
66b63861bbSAlexandre ChartreCPPFLAGS += 	-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(INCS)
6749bfb42bSAlexandre ChartreC99MODE =	$(C99_ENABLE)
68*7014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-uninitialized
6949bfb42bSAlexandre Chartre
7082629e30SMike ChristensenLINTFLAGS += -erroff=E_BAD_PTR_CAST_ALIGN
7182629e30SMike Christensen
7249bfb42bSAlexandre Chartre.KEEP_STATE:
7349bfb42bSAlexandre Chartre
7449bfb42bSAlexandre Chartreall: $(PROG)
7549bfb42bSAlexandre Chartre
7649bfb42bSAlexandre Chartre$(PROG): $(OBJS)
7749bfb42bSAlexandre Chartre	$(CC) -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS)
7849bfb42bSAlexandre Chartre	$(POST_PROCESS)
7949bfb42bSAlexandre Chartre
8049bfb42bSAlexandre Chartreinstall: all .WAIT $(ROOTCMD) $(ROOTMANIFEST) $(ROOTSVCMETHOD)
8149bfb42bSAlexandre Chartre
8249bfb42bSAlexandre Chartrecheck: $(CHKMANIFEST)
8349bfb42bSAlexandre Chartre
8449bfb42bSAlexandre Chartrelint: lint_SRCS
8549bfb42bSAlexandre Chartre
8649bfb42bSAlexandre Chartreclean:
8749bfb42bSAlexandre Chartre	$(RM) $(PROG) $(OBJS) $(LINT_FILES)
8849bfb42bSAlexandre Chartre
8949bfb42bSAlexandre Chartreinclude ../Makefile.targ
9082629e30SMike Christensen
9182629e30SMike Christensen%.o: $(COMMONBASE)/mdesc/%.c
9282629e30SMike Christensen	$(COMPILE.c) -o $@ $<
9382629e30SMike Christensen	$(POST_PROCESS_O)
9482629e30SMike Christensen
95