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