open-src/util/Makefile.inc
author Alan Coopersmith <Alan.Coopersmith@Sun.COM>
Wed, 26 Nov 2008 16:23:15 -0800
changeset 591 a2c6b61a92aa
parent 493 f43507b5737d
child 907 3c35d611cdaa
permissions -rw-r--r--
6777135 X builds should record version info in ELF comments
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     1
# -*- Makefile -*- rules common to most X.Org utility modules
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     2
#
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     3
# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     4
# Use subject to license terms.
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     5
#
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     6
# Permission is hereby granted, free of charge, to any person obtaining a
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     7
# copy of this software and associated documentation files (the
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     8
# "Software"), to deal in the Software without restriction, including
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     9
# without limitation the rights to use, copy, modify, merge, publish,
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    10
# distribute, and/or sell copies of the Software, and to permit persons
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    11
# to whom the Software is furnished to do so, provided that the above
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    12
# copyright notice(s) and this permission notice appear in all copies of
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    13
# the Software and that both the above copyright notice(s) and this
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    14
# permission notice appear in supporting documentation.
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    15
# 
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    16
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    17
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    18
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    19
# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    20
# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    21
# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    22
# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    23
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    24
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    25
# 
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    26
# Except as contained in this notice, the name of a copyright holder
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    27
# shall not be used in advertising or otherwise to promote the sale, use
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    28
# or other dealings in this Software without prior written authorization
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    29
# of the copyright holder.
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    30
#
591
a2c6b61a92aa 6777135 X builds should record version info in ELF comments
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 493
diff changeset
    31
# @(#)Makefile.inc	1.2	08/11/26
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    32
#
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    33
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    34
PWD:sh=pwd
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    35
TOP=$(PWD)/../..
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    36
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    37
MODTYPE=util
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    38
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    39
### Include common definitions
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    40
include $(TOP)/common/Makefile.init
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    41
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    42
# Most util modules have no man pages, but show path in those that do
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    43
MODTYPE_SUNTOUCH_MAN_FLAGS= -p $(MODULE_PREFIX)/bin/
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    44
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    45
# No common dependencies
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    46
MODTYPE_CONFIGURE_DEPS=
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    47
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    48
# Use the flags we normally use to build & link applications with
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    49
MODTYPE_CFLAGS=$(PROG_CFLAGS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    50
MODTYPE_LDFLAGS=$(PROG_LDFLAGS)
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    51
MODTYPE_LD_OPTIONS=
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    52
591
a2c6b61a92aa 6777135 X builds should record version info in ELF comments
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 493
diff changeset
    53
# Set comments in ELF binaries to help identify versions/builds
a2c6b61a92aa 6777135 X builds should record version info in ELF comments
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 493
diff changeset
    54
MODTYPE_ADD_BUILD_TARGETS=set-elf-comments
a2c6b61a92aa 6777135 X builds should record version info in ELF comments
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 493
diff changeset
    55
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    56
### Include common rulesets
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    57
include $(TOP)/common/Makefile.inc
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    58
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    59
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    60