Makefile revision 1196
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich# Makefile for X Consolidation Open Source bits
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich#
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich# Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich#
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich# Permission is hereby granted, free of charge, to any person obtaining a
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich# copy of this software and associated documentation files (the "Software"),
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich# to deal in the Software without restriction, including without limitation
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich# the rights to use, copy, modify, merge, publish, distribute, sublicense,
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich# and/or sell copies of the Software, and to permit persons to whom the
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich# Software is furnished to do so, subject to the following conditions:
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich#
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich# The above copyright notice and this permission notice (including the next
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich# paragraph) shall be included in all copies or substantial portions of the
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich# Software.
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich#
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich# DEALINGS IN THE SOFTWARE.
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich#
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich#
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich###############################################################################
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich#
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich# Need to install to proto area by default for inter-package dependencies to
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich# work right.
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovichdefault_target: install
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich# Modules have to be built in a specific order for dependencies to be
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich# handled properly
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich# Some specific notes:
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich# - app/rgb depends on the rgb.h header installed by the Xorg xserver,
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich# so has to be built after xserver/xorg
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich# - util/util-macros must be first, since any module that does autoreconf
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich# requires it
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich# - data/xbitmaps must be before app, as some applications depend on the
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich# bitmaps installed, but the rest of data depends on applications like
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich# xcursorgen for processing, so must come later
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich# - font depends on utils like mkfontdir from app
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich# High level dependencies
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovichproto: util/util-macros util/lndir util/build-tools
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovichutil/lndir: proto/x11proto
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovichlib: proto font/util util
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovichutil: proto font/util
ecb0e3c0ca1489bc78b763cdfb6163c8c1043e2eAllen Rabinovichapp: lib data/xbitmaps font/util
ecb0e3c0ca1489bc78b763cdfb6163c8c1043e2eAllen Rabinovichxserver/xorg xserver/xvnc: proto doc/xorg-sgml-doctools lib font/util
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovichdriver: xserver/xorg
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovichapp/rgb: xserver/xorg
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovichdoc/xorg-docs: doc/xorg-sgml-doctools
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovichdata: app
176bb1f5c1bead550f24ffc878201352795c73adAllen RabinovichFONTAPPS = app/bdftopcf app/mkfontscale app/mkfontdir
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovichfont: $(FONTAPPS) font/util
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich$(FONTAPPS): lib
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich
176bb1f5c1bead550f24ffc878201352795c73adAllen RabinovichOS_SUBDIRS_common = \
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich util/util-macros \
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich util/build-tools \
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich proto/x11proto \
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich util/lndir \
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich proto \
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich data/xbitmaps \
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich font/util \
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich util \
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich doc/xorg-sgml-doctools \
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich doc/xorg-docs \
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich lib \
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich app \
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich $(FONTAPPS) \
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich xserver/xorg \
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich xserver/xvnc \
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich xserver/xserver-common \
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich driver \
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich app/rgb \
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich data \
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich font
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich
176bb1f5c1bead550f24ffc878201352795c73adAllen RabinovichOS_SUBDIRS_sparc = $(OS_SUBDIRS_common)
176bb1f5c1bead550f24ffc878201352795c73adAllen RabinovichOS_SUBDIRS_i386 = $(OS_SUBDIRS_common)
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich# Subdirs we used to build, but now just need to clean up
176bb1f5c1bead550f24ffc878201352795c73adAllen RabinovichOBSOLETE_SUBDIRS = \
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich doc/docbook-utils
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich
176bb1f5c1bead550f24ffc878201352795c73adAllen RabinovichPWD:sh=pwd
176bb1f5c1bead550f24ffc878201352795c73adAllen RabinovichTOP=$(PWD)/..
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich### Include common definitions
176bb1f5c1bead550f24ffc878201352795c73adAllen RabinovichDIRNAME=""
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovichinclude $(TOP)/open-src/common/Makefile.subdirs
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich
176bb1f5c1bead550f24ffc878201352795c73adAllen RabinovichPROTOTOP=$(TOP)/proto
176bb1f5c1bead550f24ffc878201352795c73adAllen RabinovichPROTODIR=$(PROTOTOP)/root_$(MACH)
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovichcheck: check_rtime
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich# check_rtime script from onbld to check binaries are built with the right
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich# linker flags
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovichcheck_rtime:
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich check_rtime -e ../exception_lists/check_rtime -d $(PROTODIR) $(PROTODIR)
176bb1f5c1bead550f24ffc878201352795c73adAllen Rabinovich