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