xref: /titanic_51/usr/src/uts/sparc/sdbc/Makefile (revision 67dbe2be0c0f1e2eb428b89088bb5667e8f0b9f6)
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# uts/sparc/sdbc/Makefile
26#
27#       This makefile drives the production of the sdbc kernel module
28#
29#       sparc implementation architecture dependent
30#
31
32#
33#       Path to the base of the uts directory tree (usually /usr/src/uts).
34#
35#
36UTSBASE = ../..
37
38ARCHDIR:sh = cd ..; basename `pwd`
39
40UTSCOMMON = $(UTSBASE)/common
41AVSCOMMON = $(UTSCOMMON)/avs
42
43#
44#       Define the module and object file sets.
45#
46MODULE		= sdbc
47OBJECTS		= $(SDBC_OBJS:%=$(OBJS_DIR)/%)
48LINTS		= $(SDBC_OBJS:%.o=$(LINTS_DIR)/%.ln)
49ROOTMODULE      = $(USR_DRV_DIR)/$(MODULE)
50INC_PATH	+= -I$(ROOT)/usr/include
51INC_PATH	+= -I$(AVSCOMMON)
52INC_PATH	+= -I$(AVSCOMMON)/ns/sdbc
53CONF_SRCDIR	= $(UTSBASE)/common/avs/ns/sdbc
54
55#
56#       Include common rules.
57#
58include ../Makefile.$(ARCHDIR)
59include $(UTSBASE)/common/avs/Makefile.com
60
61CLOBBERFILES += obj*/*.c debug*/*.c obj*/sd_mkiob debug*/sd_mkiob
62
63#
64#	Define targets
65#
66ALL_TARGET	= $(BINARY) $(SRC_CONFILE)
67LINT_TARGET	= $(MODULE).lint
68INSTALL_TARGET	= $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
69
70#
71# lint pass one enforcement
72#
73CFLAGS += -v -D_SD_8K_BLKSIZE -D_SDBC_SINGLE_BRD
74LDFLAGS += -dy -N"drv/nsctl" -N"drv/ncall" -N"drv/nskern" -N"misc/spuni"
75LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV
76LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
77
78.KEEP_STATE:
79
80def:		$(DEF_DEPS)
81
82all:		$(ALL_DEPS)
83
84clean:		$(CLEAN_DEPS)
85
86clobber:	$(CLOBBER_DEPS)
87
88lint:		$(LINT_DEPS)
89
90modlintlib:	$(MODLINTLIB_DEPS)
91
92clean.lint:	$(CLEAN_LINT_DEPS)
93
94install:	$(INSTALL_DEPS)
95
96$(OBJS_DIR)/sd_mkiob:		$(UTSBASE)/common/avs/ns/sdbc/sd_mkiob.sh
97	$(CP) $(UTSBASE)/common/avs/ns/sdbc/sd_mkiob.sh $@
98	$(CHMOD) 755 $@
99
100$(OBJS_DIR)/sd_iob_impl0.c:	$(UTSBASE)/common/avs/ns/sdbc/sd_iob.h \
101				$(OBJS_DIR)/sd_mkiob
102	$(OBJS_DIR)/sd_mkiob 0 512 $(AVSCOMMON)/ns/sdbc/sd_iob.h > $@
103
104$(OBJS_DIR)/sd_iob_impl1.c:	$(UTSBASE)/common/avs/ns/sdbc/sd_iob.h \
105				$(OBJS_DIR)/sd_mkiob
106	$(OBJS_DIR)/sd_mkiob 512 1024 $(AVSCOMMON)/ns/sdbc/sd_iob.h > $@
107
108$(OBJS_DIR)/sd_iob_impl2.c:	$(UTSBASE)/common/avs/ns/sdbc/sd_iob.h \
109				$(OBJS_DIR)/sd_mkiob
110	$(OBJS_DIR)/sd_mkiob 1024 1536 $(AVSCOMMON)/ns/sdbc/sd_iob.h > $@
111
112$(OBJS_DIR)/sd_iob_impl3.c:	$(UTSBASE)/common/avs/ns/sdbc/sd_iob.h \
113				$(OBJS_DIR)/sd_mkiob
114	$(OBJS_DIR)/sd_mkiob 1536 2048 $(AVSCOMMON)/ns/sdbc/sd_iob.h > $@
115
116$(OBJS_DIR)/sd_iob_impl4.c:	$(UTSBASE)/common/avs/ns/sdbc/sd_iob.h \
117				$(OBJS_DIR)/sd_mkiob
118	$(OBJS_DIR)/sd_mkiob 2048 2560 $(AVSCOMMON)/ns/sdbc/sd_iob.h > $@
119
120$(OBJS_DIR)/sd_iob_impl5.c:	$(UTSBASE)/common/avs/ns/sdbc/sd_iob.h \
121				$(OBJS_DIR)/sd_mkiob
122	$(OBJS_DIR)/sd_mkiob 2560 3072 $(AVSCOMMON)/ns/sdbc/sd_iob.h > $@
123
124$(OBJS_DIR)/sd_iob_impl6.c:	$(UTSBASE)/common/avs/ns/sdbc/sd_iob.h \
125				$(OBJS_DIR)/sd_mkiob
126	$(OBJS_DIR)/sd_mkiob 3072 3584 $(AVSCOMMON)/ns/sdbc/sd_iob.h > $@
127
128$(OBJS_DIR)/sd_iob_impl7.c:	$(UTSBASE)/common/avs/ns/sdbc/sd_iob.h \
129				$(OBJS_DIR)/sd_mkiob
130	$(OBJS_DIR)/sd_mkiob 3584 9999 $(AVSCOMMON)/ns/sdbc/sd_iob.h > $@
131
132$(OBJS_DIR)/sd_iob_impl0.o:	$(OBJS_DIR)/sd_iob_impl0.c
133	$(COMPILE.c) -o $@ $(OBJS_DIR)/sd_iob_impl0.c
134	$(POST_PROCESS_O)
135
136$(OBJS_DIR)/sd_iob_impl1.o:	$(OBJS_DIR)/sd_iob_impl1.c
137	$(COMPILE.c) -o $@ $(OBJS_DIR)/sd_iob_impl1.c
138	$(POST_PROCESS_O)
139
140$(OBJS_DIR)/sd_iob_impl2.o:	$(OBJS_DIR)/sd_iob_impl2.c
141	$(COMPILE.c) -o $@ $(OBJS_DIR)/sd_iob_impl2.c
142	$(POST_PROCESS_O)
143
144$(OBJS_DIR)/sd_iob_impl3.o:	$(OBJS_DIR)/sd_iob_impl3.c
145	$(COMPILE.c) -o $@ $(OBJS_DIR)/sd_iob_impl3.c
146	$(POST_PROCESS_O)
147
148$(OBJS_DIR)/sd_iob_impl4.o:	$(OBJS_DIR)/sd_iob_impl4.c
149	$(COMPILE.c) -o $@ $(OBJS_DIR)/sd_iob_impl4.c
150	$(POST_PROCESS_O)
151
152$(OBJS_DIR)/sd_iob_impl5.o:	$(OBJS_DIR)/sd_iob_impl5.c
153	$(COMPILE.c) -o $@ $(OBJS_DIR)/sd_iob_impl5.c
154	$(POST_PROCESS_O)
155
156$(OBJS_DIR)/sd_iob_impl6.o:	$(OBJS_DIR)/sd_iob_impl6.c
157	$(COMPILE.c) -o $@ $(OBJS_DIR)/sd_iob_impl6.c
158	$(POST_PROCESS_O)
159
160$(OBJS_DIR)/sd_iob_impl7.o:	$(OBJS_DIR)/sd_iob_impl7.c
161	$(COMPILE.c) -o $@ $(OBJS_DIR)/sd_iob_impl7.c
162	$(POST_PROCESS_O)
163
164
165#
166#	Include common targets.
167#
168include ../Makefile.targ
169