open-src/app/Makefile.inc
author Alan Coopersmith <Alan.Coopersmith@Sun.COM>
Mon, 24 Mar 2008 16:05:09 -0700
changeset 378 37921779d3c0
parent 355 a3a81e9c227d
child 469 18722b3626c4
permissions -rw-r--r--
6679315 resync FOX & Nevada X gates
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
98
c21b46ed1efd 6489660 Xorg server 7.2 [PSARC 2007/051]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
     1
# -*- Makefile -*- rules common to most X.Org application modules
c21b46ed1efd 6489660 Xorg server 7.2 [PSARC 2007/051]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
     2
#
378
37921779d3c0 6679315 resync FOX & Nevada X gates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 355
diff changeset
     3
# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
70
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     4
# Use subject to license terms.
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     5
#
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     6
# Permission is hereby granted, free of charge, to any person obtaining a
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     7
# copy of this software and associated documentation files (the
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     8
# "Software"), to deal in the Software without restriction, including
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     9
# without limitation the rights to use, copy, modify, merge, publish,
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    10
# distribute, and/or sell copies of the Software, and to permit persons
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    11
# to whom the Software is furnished to do so, provided that the above
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    12
# copyright notice(s) and this permission notice appear in all copies of
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    13
# the Software and that both the above copyright notice(s) and this
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    14
# permission notice appear in supporting documentation.
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    15
# 
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    16
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    17
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    18
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    19
# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    20
# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    21
# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    22
# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    23
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    24
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    25
# 
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    26
# Except as contained in this notice, the name of a copyright holder
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    27
# shall not be used in advertising or otherwise to promote the sale, use
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    28
# or other dealings in this Software without prior written authorization
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    29
# of the copyright holder.
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    30
#
355
a3a81e9c227d 6672824 Copyright/license notices from X.Org software should be included in SVR4 package copyrights
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 293
diff changeset
    31
# @(#)Makefile.inc	1.8	08/03/07
70
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    32
#
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    33
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    34
PWD:sh=pwd
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    35
TOP=$(PWD)/../..
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    36
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    37
# Source tarball
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    38
SOURCE_TARBALL_NAME=$(APP_NAME)-$(APP_VERS).tar.bz2
156
1dec9ce4addc 6551329 X open-src makefiles spawn too many shell commands
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 98
diff changeset
    39
SOURCE_TARBALL_DIR=app
70
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    40
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    41
# Directory created by unpacking source
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    42
SOURCE_DIR=$(BUILD_DIR)/$(APP_NAME)-$(APP_VERS)
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    43
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    44
include $(TOP)/common/Makefile.inc
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    45
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    46
# Where to install files
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    47
APP_prefix=$(X11_DIR)
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    48
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    49
# Command line options to GNU autoconf configure script
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    50
CONFIG_OPTS = --prefix=$(APP_prefix) --mandir='$${prefix}/share/man' \
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    51
	$(APP_CONFIG_OPTS)
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    52
293
e848b36488ae 6653913 Replace xmag, xcalc with the opensrc version from X.Org [build fix]
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents: 255
diff changeset
    53
LIB_LD_OPTIONS = $(LIB_REQUIRED_LDFLAGS) \
e848b36488ae 6653913 Replace xmag, xcalc with the opensrc version from X.Org [build fix]
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents: 255
diff changeset
    54
	-L$(PROTODIR)$(X11_DIR)/lib$(LIBSUBDIR) $(LIB_ADD_LD_OPTIONS)
e848b36488ae 6653913 Replace xmag, xcalc with the opensrc version from X.Org [build fix]
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents: 255
diff changeset
    55
70
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    56
# Environment variable options to GNU autoconf configure script
98
c21b46ed1efd 6489660 Xorg server 7.2 [PSARC 2007/051]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
    57
CONFIG_ENV = CC=$(CC) CFLAGS="$(PROG_CFLAGS)" LD="$(LD) $(LDFLAGS)" \
378
37921779d3c0 6679315 resync FOX & Nevada X gates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 355
diff changeset
    58
	CPPFLAGS="-I $(PROTODIR)$(X11_INCLUDES_DIR) -I $(PROTODIR)/usr/include -I $(PROTODIR)/usr/include/freetype2 $(APP_ADD_CPPFLAGS)" \
37921779d3c0 6679315 resync FOX & Nevada X gates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 355
diff changeset
    59
	LDFLAGS="$(PROG_LDFLAGS) -L$(PROTODIR)/usr/lib -L$(PROTODIR)$(X11_DIR)/lib$(ARCHLIBSUBDIR) $(APP_ADD_LDFLAGS)" \
98
c21b46ed1efd 6489660 Xorg server 7.2 [PSARC 2007/051]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
    60
	PKG_CONFIG_PATH=$(PROTODIR)/usr/lib/$(ARCHLIBSUBDIR)/pkgconfig:$(TOP)/common/pc-files/$(BUILD_DIR) \
c21b46ed1efd 6489660 Xorg server 7.2 [PSARC 2007/051]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 70
diff changeset
    61
	$(APP_CONFIG_ENV)
70
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    62
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    63
# Run configure script
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    64
$(SOURCE_DIR)/Makefile: $(UNPACK_TARGET)
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    65
	(cd $(SOURCE_DIR) ; chmod a+x configure ; \
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    66
	 $(CONFIG_ENV) ./configure $(CONFIG_OPTS) )
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    67
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    68
# Binary built in tree
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    69
APP_BIN=$(SOURCE_DIR)/src/$(APP_NAME)
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    70
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    71
build_gen: $(APP_BIN)
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    72
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    73
$(APP_BIN): $(SOURCE_DIR)/Makefile
293
e848b36488ae 6653913 Replace xmag, xcalc with the opensrc version from X.Org [build fix]
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents: 255
diff changeset
    74
	(cd $(SOURCE_DIR) ; $(LIBPATHS) LD_OPTIONS="$(LIB_LD_OPTIONS)" $(MAKE) $(MFLAGS) )
70
af1bea13b32b 6477401 Xorg modularization: SUNWxorg-client*
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    75
355
a3a81e9c227d 6672824 Copyright/license notices from X.Org software should be included in SVR4 package copyrights
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 293
diff changeset
    76
install_gen:: $(APP_BIN)
293
e848b36488ae 6653913 Replace xmag, xcalc with the opensrc version from X.Org [build fix]
Niveditha Rau <Niveditha.Rau@Sun.COM>
parents: 255
diff changeset
    77
	(cd $(SOURCE_DIR) ; $(LIBPATHS) LD_OPTIONS="$(LIB_LD_OPTIONS)" $(MAKE) $(MFLAGS) -e DESTDIR=$(PROTODIR) install)