open-src/lib/hwc/sun-src/Makefile
author Alan Coopersmith <Alan.Coopersmith@Sun.COM>
Thu, 18 Feb 2010 16:03:08 -0800
changeset 907 3c35d611cdaa
parent 595 b2f409b183da
child 919 425233ae7236
permissions -rw-r--r--
6927784 Remove SCCS ident tags from X gate
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
498
0cce41833817 6736350 move hwc from xc to open-src
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents:
diff changeset
     1
###############################################################################
0cce41833817 6736350 move hwc from xc to open-src
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents:
diff changeset
     2
#
0cce41833817 6736350 move hwc from xc to open-src
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents:
diff changeset
     3
# hwc 1.x Makefile
0cce41833817 6736350 move hwc from xc to open-src
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents:
diff changeset
     4
#
0cce41833817 6736350 move hwc from xc to open-src
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents:
diff changeset
     5
# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
0cce41833817 6736350 move hwc from xc to open-src
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents:
diff changeset
     6
# Use subject to license terms.
0cce41833817 6736350 move hwc from xc to open-src
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents:
diff changeset
     7
#
0cce41833817 6736350 move hwc from xc to open-src
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents:
diff changeset
     8
# Permission is hereby granted, free of charge, to any person obtaining a
0cce41833817 6736350 move hwc from xc to open-src
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents:
diff changeset
     9
# copy of this software and associated documentation files (the
0cce41833817 6736350 move hwc from xc to open-src
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents:
diff changeset
    10
# "Software"), to deal in the Software without restriction, including
0cce41833817 6736350 move hwc from xc to open-src
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents:
diff changeset
    11
# without limitation the rights to use, copy, modify, merge, publish,
0cce41833817 6736350 move hwc from xc to open-src
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents:
diff changeset
    12
# distribute, and/or sell copies of the Software, and to permit persons
0cce41833817 6736350 move hwc from xc to open-src
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents:
diff changeset
    13
# to whom the Software is furnished to do so, provided that the above
0cce41833817 6736350 move hwc from xc to open-src
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents:
diff changeset
    14
# copyright notice(s) and this permission notice appear in all copies of
0cce41833817 6736350 move hwc from xc to open-src
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents:
diff changeset
    15
# the Software and that both the above copyright notice(s) and this
0cce41833817 6736350 move hwc from xc to open-src
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents:
diff changeset
    16
# permission notice appear in supporting documentation.
0cce41833817 6736350 move hwc from xc to open-src
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents:
diff changeset
    17
#
0cce41833817 6736350 move hwc from xc to open-src
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents:
diff changeset
    18
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
0cce41833817 6736350 move hwc from xc to open-src
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents:
diff changeset
    19
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
0cce41833817 6736350 move hwc from xc to open-src
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents:
diff changeset
    20
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
0cce41833817 6736350 move hwc from xc to open-src
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents:
diff changeset
    21
# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
0cce41833817 6736350 move hwc from xc to open-src
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents:
diff changeset
    22
# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
0cce41833817 6736350 move hwc from xc to open-src
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents:
diff changeset
    23
# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
0cce41833817 6736350 move hwc from xc to open-src
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents:
diff changeset
    24
# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
0cce41833817 6736350 move hwc from xc to open-src
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents:
diff changeset
    25
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
0cce41833817 6736350 move hwc from xc to open-src
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents:
diff changeset
    26
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
0cce41833817 6736350 move hwc from xc to open-src
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents:
diff changeset
    27
#
0cce41833817 6736350 move hwc from xc to open-src
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents:
diff changeset
    28
# Except as contained in this notice, the name of a copyright holder
0cce41833817 6736350 move hwc from xc to open-src
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents:
diff changeset
    29
# shall not be used in advertising or otherwise to promote the sale, use
0cce41833817 6736350 move hwc from xc to open-src
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents:
diff changeset
    30
# or other dealings in this Software without prior written authorization
0cce41833817 6736350 move hwc from xc to open-src
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents:
diff changeset
    31
# of the copyright holder.
0cce41833817 6736350 move hwc from xc to open-src
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents:
diff changeset
    32
#
0cce41833817 6736350 move hwc from xc to open-src
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents:
diff changeset
    33
#
0cce41833817 6736350 move hwc from xc to open-src
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents:
diff changeset
    34
0cce41833817 6736350 move hwc from xc to open-src
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents:
diff changeset
    35
0cce41833817 6736350 move hwc from xc to open-src
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents:
diff changeset
    36
MACH:sh=uname -p
0cce41833817 6736350 move hwc from xc to open-src
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents:
diff changeset
    37
0cce41833817 6736350 move hwc from xc to open-src
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents:
diff changeset
    38
CPPFLAGS = -I. -D_KERNEL -D_SUNDDI -D_SYSCALL32
0cce41833817 6736350 move hwc from xc to open-src
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents:
diff changeset
    39
595
b2f409b183da 6781731 hwc build issues
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 498
diff changeset
    40
BUILD_i386_FLAGS =
b2f409b183da 6781731 hwc build issues
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 498
diff changeset
    41
BUILD_sparc_FLAGS = -D_SYSCALL32_IMPL \
498
0cce41833817 6736350 move hwc from xc to open-src
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents:
diff changeset
    42
		    -xchip=ultra -Wc,-xcode=abs32
0cce41833817 6736350 move hwc from xc to open-src
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents:
diff changeset
    43
0cce41833817 6736350 move hwc from xc to open-src
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents:
diff changeset
    44
CFLAGS = $(CPPFLAGS) $(BUILD_$(MACH)_FLAGS) $(ARCH_FLAGS) \
0cce41833817 6736350 move hwc from xc to open-src
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents:
diff changeset
    45
	-xO3 -xspace -W0,-Lt -v -c
0cce41833817 6736350 move hwc from xc to open-src
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents:
diff changeset
    46
0cce41833817 6736350 move hwc from xc to open-src
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents:
diff changeset
    47
LD_OPTIONS=
0cce41833817 6736350 move hwc from xc to open-src
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents:
diff changeset
    48
595
b2f409b183da 6781731 hwc build issues
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 498
diff changeset
    49
OBJECTS = hwc.o
b2f409b183da 6781731 hwc build issues
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 498
diff changeset
    50
b2f409b183da 6781731 hwc build issues
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 498
diff changeset
    51
# "env -" is used to strip LD_* variables from the environment, since our
b2f409b183da 6781731 hwc build issues
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 498
diff changeset
    52
# normal flags like -z text & -z defs are incompatible with building the
b2f409b183da 6781731 hwc build issues
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 498
diff changeset
    53
# kernel module with -r.
b2f409b183da 6781731 hwc build issues
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 498
diff changeset
    54
hwc: $(OBJECTS)
b2f409b183da 6781731 hwc build issues
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 498
diff changeset
    55
	env - /usr/ccs/bin/ld -r -o $@ $(OBJECTS)
b2f409b183da 6781731 hwc build issues
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 498
diff changeset
    56
b2f409b183da 6781731 hwc build issues
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 498
diff changeset
    57
hwc.o: hwc.c hwcio.h
498
0cce41833817 6736350 move hwc from xc to open-src
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents:
diff changeset
    58
0cce41833817 6736350 move hwc from xc to open-src
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents:
diff changeset
    59
install:
595
b2f409b183da 6781731 hwc build issues
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 498
diff changeset
    60
	mkdir -p $(DESTDIR)/kernel/strmod$(ARCHLIBSUBDIR)
b2f409b183da 6781731 hwc build issues
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 498
diff changeset
    61
	$(INSTALL) -m 755 hwc $(DESTDIR)/kernel/strmod$(ARCHLIBSUBDIR)