Home | History | Annotate | Download | only in sparc
      1 #
      2 # CDDL HEADER START
      3 #
      4 # The contents of this file are subject to the terms of the
      5 # Common Development and Distribution License (the "License").
      6 # You may not use this file except in compliance with the License.
      7 #
      8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
      9 # or http://www.opensolaris.org/os/licensing.
     10 # See the License for the specific language governing permissions
     11 # and limitations under the License.
     12 #
     13 # When distributing Covered Code, include this CDDL HEADER in each
     14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
     15 # If applicable, add the following below this CDDL HEADER, with the
     16 # fields enclosed by brackets "[]" replaced with your own identifying
     17 # information: Portions Copyright [yyyy] [name of copyright owner]
     18 #
     19 # CDDL HEADER END
     20 #
     21 #
     22 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
     23 # Use is subject to license terms.
     24 #
     25 #	This Makefile defines all file modules and build rules for the
     26 # directory uts/sparc and its children. These are the source files which
     27 # are specific to the sparc processor.
     28 #
     29 #	The following two-level ordering must be maintained in this file.
     30 #	  Lines are sorted first in order of decreasing specificity based on
     31 #	  the first directory component.  That is, sun4u rules come before
     32 #	  sparc rules come before common rules.
     33 #
     34 #	  Lines whose initial directory components are equal are sorted
     35 #	  alphabetically by the remaining components.
     36 
     37 #
     38 #	Section 1a: C object build rules
     39 #
     40 $(OBJS_DIR)/%.o:		$(UTSBASE)/sparc/dtrace/%.c
     41 	$(COMPILE.c) -o $@ $<
     42 	$(CTFCONVERT_O)
     43 
     44 $(OBJS_DIR)/%.o:		$(UTSBASE)/sparc/dtrace/%.s
     45 	$(COMPILE.s) -o $@ $<
     46 
     47 $(OBJS_DIR)/%.o:		$(UTSBASE)/sparc/io/%.c
     48 	$(COMPILE.c) -o $@ $<
     49 	$(CTFCONVERT_O)
     50 
     51 $(OBJS_DIR)/%.o:		$(UTSBASE)/sparc/io/pciex/%.c
     52 	$(COMPILE.c) -o $@ $<
     53 	$(CTFCONVERT_O)
     54 
     55 $(OBJS_DIR)/%.o:		$(UTSBASE)/sparc/fpu/%.c
     56 	$(COMPILE.c) -o $@ $<
     57 	$(CTFCONVERT_O)
     58 
     59 $(OBJS_DIR)/%.o:		$(UTSBASE)/sparc/fs/proc/%.c
     60 	$(COMPILE.c) -o $@ $<
     61 	$(CTFCONVERT_O)
     62 
     63 $(OBJS_DIR)/%.o:		$(UTSBASE)/sparc/krtld/%.c
     64 	$(COMPILE.c) -o $@ $<
     65 	$(CTFCONVERT_O)
     66 
     67 $(OBJS_DIR)/%.o:		$(UTSBASE)/sparc/zfs/%.c
     68 	$(COMPILE.c) -o $@ $<
     69 	$(CTFCONVERT_O)
     70 
     71 #
     72 # _RELSEG indicates that the dynamic syms are put in a separate ELF
     73 #	section so they can be freed later.
     74 #
     75 $(OBJS_DIR)/kobj_bootflags.o	:= CPPFLAGS += -I$(SRC)/common
     76 $(OBJS_DIR)/kobj.o		:= CPPFLAGS += -DMODDIR_SUFFIX=\"sparcv9\"
     77 $(OBJS_DIR)/kobj.o		:= CPPFLAGS += -D_RELSEG
     78 
     79 $(OBJS_DIR)/%.o:		$(UTSBASE)/sparc/krtld/%.s
     80 	$(COMPILE.s) -o $@ $<
     81 
     82 $(OBJS_DIR)/%.o:		$(UTSBASE)/sparc/ml/%.s
     83 	$(COMPILE.s) -o $@ $<
     84 
     85 $(OBJS_DIR)/%.o:		$(UTSBASE)/sparc/nskern/%.s
     86 	$(COMPILE.s) -o $@ $<
     87 
     88 $(OBJS_DIR)/%.o:		$(UTSBASE)/sparc/os/%.c
     89 	$(COMPILE.c) -o $@ $<
     90 	$(CTFCONVERT_O)
     91 
     92 $(OBJS_DIR)/%.o:		$(UTSBASE)/sparc/syscall/%.c
     93 	$(COMPILE.c) -o $@ $<
     94 	$(CTFCONVERT_O)
     95 
     96 #
     97 #	Section 1b: Lint `object' build rules.
     98 #
     99 $(LINTS_DIR)/%.ln:		$(UTSBASE)/sparc/dtrace/%.c
    100 	@($(LHEAD) $(LINT.c) $< $(LTAIL))
    101 
    102 $(LINTS_DIR)/%.ln:		$(UTSBASE)/sparc/dtrace/%.s
    103 	@($(LHEAD) $(LINT.s) $< $(LTAIL))
    104 
    105 $(LINTS_DIR)/%.ln:		$(UTSBASE)/sparc/io/%.c
    106 	@($(LHEAD) $(LINT.c) $< $(LTAIL))
    107 
    108 $(LINTS_DIR)/%.ln:		$(UTSBASE)/sparc/io/pciex/%.c
    109 	@($(LHEAD) $(LINT.c) $< $(LTAIL))
    110 
    111 $(LINTS_DIR)/%.ln:		$(UTSBASE)/sparc/fpu/%.c
    112 	@($(LHEAD) $(LINT.c) $< $(LTAIL))
    113 
    114 $(LINTS_DIR)/%.ln:		$(UTSBASE)/sparc/zfs/%.c
    115 	@($(LHEAD) $(LINT.c) $< $(LTAIL))
    116 
    117 $(LINTS_DIR)/%.ln:		$(UTSBASE)/sparc/fs/proc/%.c
    118 	@($(LHEAD) $(LINT.c) $< $(LTAIL))
    119 
    120 $(LINTS_DIR)/%.ln:		$(UTSBASE)/sparc/krtld/%.c
    121 	@($(LHEAD) $(LINT.c) $< $(LTAIL))
    122 
    123 $(OBJS_DIR)/kobj_bootflags.ln	:= CPPFLAGS += -I$(SRC)/common
    124 $(OBJS_DIR)/kobj.ln		:= CPPFLAGS += -DMODDIR_SUFFIX=\"sparcv9\"
    125 $(OBJS_DIR)/kobj.ln		:= CPPFLAGS += -D_RELSEG
    126 
    127 $(LINTS_DIR)/%.ln:		$(UTSBASE)/sparc/krtld/%.s
    128 	@($(LHEAD) $(LINT.s) $< $(LTAIL))
    129 
    130 $(LINTS_DIR)/%.ln:		$(UTSBASE)/sparc/ml/%.s
    131 	@($(LHEAD) $(LINT.s) $< $(LTAIL))
    132 
    133 $(LINTS_DIR)/%.ln:		$(UTSBASE)/sparc/nskern/%.s
    134 	@($(LHEAD) $(LINT.s) $< $(LTAIL))
    135 
    136 $(LINTS_DIR)/%.ln:		$(UTSBASE)/sparc/os/%.c
    137 	@($(LHEAD) $(LINT.c) $< $(LTAIL))
    138 
    139 $(LINTS_DIR)/%.ln:		$(UTSBASE)/sparc/syscall/%.c
    140 	@($(LHEAD) $(LINT.c) $< $(LTAIL))
    141