xref: /titanic_44/usr/src/cmd/ldmad/Makefile (revision 82629e3015252bf18319ba3815c773df23e21436)
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#
23fc256490SJason Beloro# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
2449bfb42bSAlexandre Chartre# Use is subject to license terms.
2549bfb42bSAlexandre Chartre#
2649bfb42bSAlexandre Chartre
2749bfb42bSAlexandre ChartrePROG=		ldmad
2849bfb42bSAlexandre ChartreMANIFEST=	ldoms-agents.xml
2949bfb42bSAlexandre ChartreSVCMETHOD=	ldoms-agents
3049bfb42bSAlexandre Chartre
3149bfb42bSAlexandre Chartreinclude ../Makefile.cmd
3249bfb42bSAlexandre Chartre
33*82629e30SMike Christensen
34*82629e30SMike ChristensenLOCAL_SRCS=	ldmad.c			\
3549bfb42bSAlexandre Chartre		ldma_log.c		\
3649bfb42bSAlexandre Chartre		ldma_device.c		\
37fc256490SJason Beloro		ldma_system.c		\
38fc256490SJason Beloro		ldma_dio.c		\
39fc256490SJason Beloro		mdesc_lib.c
4049bfb42bSAlexandre Chartre
41*82629e30SMike ChristensenLOCAL_OBJS=	$(LOCAL_SRCS:%.c=%.o)
4249bfb42bSAlexandre Chartre
43*82629e30SMike ChristensenCOMMONBASE = ../../common
44*82629e30SMike Christensen
45*82629e30SMike ChristensenCOMMON_SRCS =	mdesc_findname.c	\
46*82629e30SMike Christensen		mdesc_findnodeprop.c	\
47*82629e30SMike Christensen		mdesc_fini.c		\
48*82629e30SMike Christensen		mdesc_getpropval.c	\
49*82629e30SMike Christensen		mdesc_getpropstr.c	\
50*82629e30SMike Christensen		mdesc_init_intern.c	\
51*82629e30SMike Christensen		mdesc_nodecount.c	\
52*82629e30SMike Christensen		mdesc_rootnode.c	\
53*82629e30SMike Christensen		mdesc_scandag.c
54*82629e30SMike Christensen
55*82629e30SMike ChristensenCOMMON_OBJS =	$(COMMON_SRCS:%.c=%.o)
56*82629e30SMike Christensen
57*82629e30SMike ChristensenOBJS = $(LOCAL_OBJS) $(COMMON_OBJS)
58*82629e30SMike ChristensenSRCS = $(LOCAL_SRCS) $(COMMON_SRCS:%.c=$(COMMONBASE)/mdesc/%.c)
5949bfb42bSAlexandre Chartre
6049bfb42bSAlexandre ChartreROOTCMDDIR=		$(ROOTLIB)/ldoms
6149bfb42bSAlexandre ChartreROOTMANIFESTDIR=	$(ROOTSVCPLATFORMSUN4V)
6249bfb42bSAlexandre Chartre$(ROOTMANIFEST)		:= FILEMODE= 444
6349bfb42bSAlexandre Chartre
64*82629e30SMike ChristensenLDLIBS +=	-lds -ldladm -ldevinfo -lpri
6549bfb42bSAlexandre ChartreINCS +=		-I$(ROOT)/usr/platform/sun4v/include/sys
66*82629e30SMike ChristensenINCS +=		-I$(SRC)/uts/sun4v
6749bfb42bSAlexandre ChartreCPPFLAGS += 	$(INCS)
6849bfb42bSAlexandre ChartreC99MODE =	$(C99_ENABLE)
6949bfb42bSAlexandre Chartre
70*82629e30SMike ChristensenLINTFLAGS += -erroff=E_BAD_PTR_CAST_ALIGN
71*82629e30SMike 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
90*82629e30SMike Christensen
91*82629e30SMike Christensen%.o: $(COMMONBASE)/mdesc/%.c
92*82629e30SMike Christensen	$(COMPILE.c) -o $@ $<
93*82629e30SMike Christensen	$(POST_PROCESS_O)
94*82629e30SMike Christensen
95