xref: /titanic_44/usr/src/cmd/avs/sdbc/Makefile (revision 7014882c6a3672fd0e5d60200af8643ae53c5928)
1fcf3ce44SJohn Forte# CDDL HEADER START
2fcf3ce44SJohn Forte#
3fcf3ce44SJohn Forte# The contents of this file are subject to the terms of the
4fcf3ce44SJohn Forte# Common Development and Distribution License (the "License").
5fcf3ce44SJohn Forte# You may not use this file except in compliance with the License.
6fcf3ce44SJohn Forte#
7fcf3ce44SJohn Forte# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8fcf3ce44SJohn Forte# or http://www.opensolaris.org/os/licensing.
9fcf3ce44SJohn Forte# See the License for the specific language governing permissions
10fcf3ce44SJohn Forte# and limitations under the License.
11fcf3ce44SJohn Forte#
12fcf3ce44SJohn Forte# When distributing Covered Code, include this CDDL HEADER in each
13fcf3ce44SJohn Forte# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
14fcf3ce44SJohn Forte# If applicable, add the following below this CDDL HEADER, with the
15fcf3ce44SJohn Forte# fields enclosed by brackets "[]" replaced with your own identifying
16fcf3ce44SJohn Forte# information: Portions Copyright [yyyy] [name of copyright owner]
17fcf3ce44SJohn Forte#
18fcf3ce44SJohn Forte# CDDL HEADER END
19fcf3ce44SJohn Forte#
20fcf3ce44SJohn Forte#
21a1e9eea0SSrikanth, Ramana# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
22fcf3ce44SJohn Forte# Use is subject to license terms.
23fcf3ce44SJohn Forte#
24fcf3ce44SJohn Forte#
25fcf3ce44SJohn Forte
26fcf3ce44SJohn Forte# must be before include of Makefile.cmd
27fcf3ce44SJohn ForteDYNPROG = scmadm \
28fcf3ce44SJohn Forte	sd_stats \
29fcf3ce44SJohn Forte	sd_diag
30fcf3ce44SJohn Forte
31fcf3ce44SJohn Forteinclude ../../Makefile.cmd
32fcf3ce44SJohn Forteinclude ../Makefile.com
33fcf3ce44SJohn Forte
34fcf3ce44SJohn ForteSUBDIRS=	etc
35fcf3ce44SJohn Forte
36fcf3ce44SJohn FortePROG = $(DYNPROG)
37fcf3ce44SJohn Forte
38fcf3ce44SJohn Fortescmadm		:= POBJS = scmadm.o sdbc_ioctl.o
39fcf3ce44SJohn Fortesd_stats	:= POBJS = sd_stats.o sd_trace.o sdbc_ioctl.o rdc_ioctl.o
40fcf3ce44SJohn Fortesd_diag		:= POBJS = sd_diag.o
41fcf3ce44SJohn Fortesdbc_dynmem	:= POBJS = sdbc_dynmem.o
42fcf3ce44SJohn Forte
43fcf3ce44SJohn ForteOBJS=	scmadm.o\
44fcf3ce44SJohn Forte	sdbc_ioctl.o\
45fcf3ce44SJohn Forte	sd_diag.o\
46fcf3ce44SJohn Forte	sd_stats.o\
47fcf3ce44SJohn Forte	sd_trace.o\
48fcf3ce44SJohn Forte	sdbc_dynmem.o
49fcf3ce44SJohn Forte
50fcf3ce44SJohn ForteXTRA_OBJS= \
51fcf3ce44SJohn Forte	rdc_ioctl.o
52fcf3ce44SJohn Forte
53fcf3ce44SJohn ForteSRCS=	$(OBJS:%.o=%.c)
54fcf3ce44SJohn Forte
55fcf3ce44SJohn FortePOFILE =	scmadm.po
56fcf3ce44SJohn Forte
57fcf3ce44SJohn Fortescmadm		:= LDLIBS += -lnsctl -lunistat -ldscfg
58fcf3ce44SJohn Fortesd_stats	:= LDLIBS += -lunistat -lcurses
59fcf3ce44SJohn Fortesd_diag		:= LDLIBS += -lnsctl
60fcf3ce44SJohn Fortesdbc_dynmem	:= LDLIBS += -lkstat
61fcf3ce44SJohn Forte
62*7014882cSRichard LoweCFLAGS +=	$(CCVERBOSE) -D_SCM_ -D_SD_8K_BLKSIZE -D_SYSCALL32
63fcf3ce44SJohn ForteCPPFLAGS +=	-DNSC_MULTI_TERABYTE
64fcf3ce44SJohn ForteLINTFLAGS +=	-Xa -n -s -x -m -u -Dlint -errhdr=%user
65fcf3ce44SJohn ForteLINTFLAGS +=	-D_SCM_ -D_SD_8K_BLKSIZE -D_SYSCALL32
66fcf3ce44SJohn ForteLINTFLAGS +=	-erroff=E_SEC_PRINTF_VAR_FMT
67fcf3ce44SJohn ForteLINTFLAGS +=	-erroff=E_SEC_SPRINTF_UNBOUNDED_COPY
68fcf3ce44SJohn ForteLINTFLAGS +=	-erroff=E_SEC_SCANF_UNBOUNDED_COPY
69fcf3ce44SJohn ForteLINTFLAGS +=	-erroff=E_SEC_FORBIDDEN_WARN_ASCFTIME
70fcf3ce44SJohn ForteLINTFLAGS +=	-DDEBUG
71*7014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-uninitialized
72a1e9eea0SSrikanth, RamanaROOTLINK = $(ROOTUSRSBIN)/scmadm
73fcf3ce44SJohn Forte
74fcf3ce44SJohn Forteall	:=	TARGET= all
75fcf3ce44SJohn Forteinstall	:=	TARGET= install
76fcf3ce44SJohn Forteclean	:=	TARGET= clean
77fcf3ce44SJohn Forteclobber	:=	TARGET= clobber
78fcf3ce44SJohn Fortelint	:=	TARGET= lint
79fcf3ce44SJohn Forte
80fcf3ce44SJohn Forte.KEEP_STATE:
81fcf3ce44SJohn Forte
82fcf3ce44SJohn Forte.PARALLEL: $(OBJS) $(XTRA_OBJS)
83fcf3ce44SJohn Forte
84fcf3ce44SJohn Forteall:	$(SUBDIRS) $(PROG) $(POFILE)
85fcf3ce44SJohn Forte
86a1e9eea0SSrikanth, Ramanainstall: $(SUBDIRS) all $(ROOTPROG) $(ROOTLINK)
87fcf3ce44SJohn Forte
88fcf3ce44SJohn Fortelint:	$(SUBDIRS) lint_SRCS
89fcf3ce44SJohn Forte
90fcf3ce44SJohn Forteclean:	$(SUBDIRS)
91fcf3ce44SJohn Forte	$(RM) *.o
92fcf3ce44SJohn Forte
93fcf3ce44SJohn Forterdc_ioctl.o: ../rdc/rdc_ioctl.c
94fcf3ce44SJohn Forte	$(COMPILE.c) ../rdc/rdc_ioctl.c
95fcf3ce44SJohn Forte
96fcf3ce44SJohn Forte$(PROG):	$$(POBJS)
97fcf3ce44SJohn Forte	$(LINK.c) $(POBJS) -o $@ $(LDLIBS)
98fcf3ce44SJohn Forte	$(POST_PROCESS)
99fcf3ce44SJohn Forte
100fcf3ce44SJohn Forte$(SUBDIRS):	FRC
101fcf3ce44SJohn Forte	@cd $@; pwd; $(MAKE) $(TARGET)
102fcf3ce44SJohn Forte
103a1e9eea0SSrikanth, Ramana$(ROOTLINK): $(ROOTUSRSBIN) $(ROOTBIN)/scmadm
104a1e9eea0SSrikanth, Ramana	-$(RM) $@; $(LN) $(ROOTBIN)/scmadm $@
105a1e9eea0SSrikanth, Ramana
106fcf3ce44SJohn Forteinclude ../../Makefile.targ
107fcf3ce44SJohn Forte
108fcf3ce44SJohn ForteFRC:
109