Makefile revision 11833:3b3fe296598b
1238438Sdteske#
2238438Sdteske# CDDL HEADER START
3238438Sdteske#
4238438Sdteske# The contents of this file are subject to the terms of the
5238438Sdteske# Common Development and Distribution License (the "License").
6238438Sdteske# You may not use this file except in compliance with the License.
7238438Sdteske#
8238438Sdteske# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9238438Sdteske# or http://www.opensolaris.org/os/licensing.
10238438Sdteske# See the License for the specific language governing permissions
11238438Sdteske# and limitations under the License.
12238438Sdteske#
13238438Sdteske# When distributing Covered Code, include this CDDL HEADER in each
14238438Sdteske# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15238438Sdteske# If applicable, add the following below this CDDL HEADER, with the
16238438Sdteske# fields enclosed by brackets "[]" replaced with your own identifying
17238438Sdteske# information: Portions Copyright [yyyy] [name of copyright owner]
18238438Sdteske#
19238438Sdteske# CDDL HEADER END
20238438Sdteske#
21238438Sdteske#
22238438Sdteske#
23238438Sdteske# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
24238438Sdteske# Use is subject to license terms.
25238438Sdteske#
26238438Sdteske
27238438SdteskePROG=		ldmad
28238438SdteskeMANIFEST=	ldoms-agents.xml
29238438SdteskeSVCMETHOD=	ldoms-agents
30238438Sdteske
31238438Sdteskeinclude ../Makefile.cmd
32238438Sdteske
33238438Sdteske
34238438SdteskeLOCAL_SRCS=	ldmad.c			\
35238438Sdteske		ldma_log.c		\
36238438Sdteske		ldma_device.c		\
37238438Sdteske		ldma_system.c		\
38238438Sdteske		ldma_dio.c		\
39238438Sdteske		mdesc_lib.c
40238438Sdteske
41238438SdteskeLOCAL_OBJS=	$(LOCAL_SRCS:%.c=%.o)
42238438Sdteske
43238438SdteskeCOMMONBASE = ../../common
44238438Sdteske
45238438SdteskeCOMMON_SRCS =	mdesc_findname.c	\
46238438Sdteske		mdesc_findnodeprop.c	\
47238438Sdteske		mdesc_fini.c		\
48238438Sdteske		mdesc_getpropval.c	\
49		mdesc_getpropstr.c	\
50		mdesc_init_intern.c	\
51		mdesc_nodecount.c	\
52		mdesc_rootnode.c	\
53		mdesc_scandag.c
54
55COMMON_OBJS =	$(COMMON_SRCS:%.c=%.o)
56
57OBJS = $(LOCAL_OBJS) $(COMMON_OBJS)
58SRCS = $(LOCAL_SRCS) $(COMMON_SRCS:%.c=$(COMMONBASE)/mdesc/%.c)
59
60ROOTCMDDIR=		$(ROOTLIB)/ldoms
61ROOTMANIFESTDIR=	$(ROOTSVCPLATFORMSUN4V)
62$(ROOTMANIFEST)		:= FILEMODE= 444
63
64LDLIBS +=	-lds -ldladm -ldevinfo -lpri
65INCS +=		-I$(ROOT)/usr/platform/sun4v/include/sys
66INCS +=		-I$(SRC)/uts/sun4v
67CPPFLAGS += 	$(INCS)
68C99MODE =	$(C99_ENABLE)
69
70LINTFLAGS += -erroff=E_BAD_PTR_CAST_ALIGN
71
72.KEEP_STATE:
73
74all: $(PROG) 
75
76$(PROG): $(OBJS)
77	$(CC) -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS)
78	$(POST_PROCESS)
79
80install: all .WAIT $(ROOTCMD) $(ROOTMANIFEST) $(ROOTSVCMETHOD)
81
82check: $(CHKMANIFEST)
83
84lint: lint_SRCS
85
86clean:
87	$(RM) $(PROG) $(OBJS) $(LINT_FILES)
88
89include ../Makefile.targ
90
91%.o: $(COMMONBASE)/mdesc/%.c
92	$(COMPILE.c) -o $@ $<
93	$(POST_PROCESS_O)
94
95