Makefile.inc revision 922
1eba1be63201689b2d3e651d3a35f0bc2057e2c0nd# -*- Makefile -*- rules common to all X.Org drivers
1eba1be63201689b2d3e651d3a35f0bc2057e2c0nd#
1eba1be63201689b2d3e651d3a35f0bc2057e2c0nd# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
1eba1be63201689b2d3e651d3a35f0bc2057e2c0nd# Use is subject to license terms.
1eba1be63201689b2d3e651d3a35f0bc2057e2c0nd#
1eba1be63201689b2d3e651d3a35f0bc2057e2c0nd# Permission is hereby granted, free of charge, to any person obtaining a
1eba1be63201689b2d3e651d3a35f0bc2057e2c0nd# copy of this software and associated documentation files (the "Software"),
8b7e19de6d547ab1ad4256316fbf0d2497f724f8humbedooh# to deal in the Software without restriction, including without limitation
1eba1be63201689b2d3e651d3a35f0bc2057e2c0nd# the rights to use, copy, modify, merge, publish, distribute, sublicense,
1eba1be63201689b2d3e651d3a35f0bc2057e2c0nd# and/or sell copies of the Software, and to permit persons to whom the
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen# Software is furnished to do so, subject to the following conditions:
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen#
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen# The above copyright notice and this permission notice (including the next
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen# paragraph) shall be included in all copies or substantial portions of the
1eba1be63201689b2d3e651d3a35f0bc2057e2c0nd# Software.
1eba1be63201689b2d3e651d3a35f0bc2057e2c0nd#
d229f940abfb2490dee17979e9a5ff31b7012eb5rbowen# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
3f08db06526d6901aa08c110b5bc7dde6bc39905nd# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1eba1be63201689b2d3e651d3a35f0bc2057e2c0nd# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
1eba1be63201689b2d3e651d3a35f0bc2057e2c0nd# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1eba1be63201689b2d3e651d3a35f0bc2057e2c0nd# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
8b7e19de6d547ab1ad4256316fbf0d2497f724f8humbedooh# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd# DEALINGS IN THE SOFTWARE.
f086b4b402fa9a2fefc7dda85de2a3cc1cd0a654rjung#
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd#
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd
1eba1be63201689b2d3e651d3a35f0bc2057e2c0ndPWD:sh=pwd
1eba1be63201689b2d3e651d3a35f0bc2057e2c0ndTOP=$(PWD)/../..
1eba1be63201689b2d3e651d3a35f0bc2057e2c0nd
1eba1be63201689b2d3e651d3a35f0bc2057e2c0ndMODTYPE=driver
1eba1be63201689b2d3e651d3a35f0bc2057e2c0nd
8b7e19de6d547ab1ad4256316fbf0d2497f724f8humbedooh### Include common definitions
8b7e19de6d547ab1ad4256316fbf0d2497f724f8humbedoohinclude $(TOP)/common/Makefile.init
8b7e19de6d547ab1ad4256316fbf0d2497f724f8humbedooh
8b7e19de6d547ab1ad4256316fbf0d2497f724f8humbedooh# Build 64-bit on SPARC, 32-bit & 64-bit on x86, to match Xorg server builds
1eba1be63201689b2d3e651d3a35f0bc2057e2c0ndBUILD_TYPES_SET=yes
1eba1be63201689b2d3e651d3a35f0bc2057e2c0ndBUILD_TYPES_sparc=64
1eba1be63201689b2d3e651d3a35f0bc2057e2c0ndBUILD_TYPES_i386=32 64
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedoohBUILD_TYPES=$(BUILD_TYPES_$(MACH))
1eba1be63201689b2d3e651d3a35f0bc2057e2c0nd
1eba1be63201689b2d3e651d3a35f0bc2057e2c0nd# Additional command line options to GNU autoconf configure script
1eba1be63201689b2d3e651d3a35f0bc2057e2c0ndMODTYPE_CONFIG_OPTS = \
1eba1be63201689b2d3e651d3a35f0bc2057e2c0nd --docdir='$(X11_DOC_DIR)' \
1eba1be63201689b2d3e651d3a35f0bc2057e2c0nd --with-xorg-module-dir='$(X11_SERVERMODS_DIR)$(SERVERMOD_subdir)'
1eba1be63201689b2d3e651d3a35f0bc2057e2c0nd
1eba1be63201689b2d3e651d3a35f0bc2057e2c0ndMODTYPE_BUILD_32_FLAGS=ARCHBINSUBDIR="$(SUBDIR32)"
1eba1be63201689b2d3e651d3a35f0bc2057e2c0ndMODTYPE_BUILD_64_FLAGS=ARCHBINSUBDIR="$(SUBDIR64)"
1eba1be63201689b2d3e651d3a35f0bc2057e2c0nd
1eba1be63201689b2d3e651d3a35f0bc2057e2c0ndMODTYPE_BUILD_MAKEFLAGS= \
1eba1be63201689b2d3e651d3a35f0bc2057e2c0nd inputdir='$(X11_SERVERMODS_DIR)/input$(SERVERMOD_subdir)'
1eba1be63201689b2d3e651d3a35f0bc2057e2c0nd
1050464f9f91f75e7a1c5c3daf3fb7b8aa74592ahumbedooh# Set comments in ELF binaries to help identify versions/builds
1eba1be63201689b2d3e651d3a35f0bc2057e2c0ndMODTYPE_ADD_BUILD_TARGETS=set-elf-comments
1050464f9f91f75e7a1c5c3daf3fb7b8aa74592ahumbedooh
1050464f9f91f75e7a1c5c3daf3fb7b8aa74592ahumbedoohMODTYPE_CPPFLAGS= \
1eba1be63201689b2d3e651d3a35f0bc2057e2c0nd -I$(PROTODIR)/usr/include \
1eba1be63201689b2d3e651d3a35f0bc2057e2c0nd -I$(PROTODIR)/usr/include/pixman-1 \
1eba1be63201689b2d3e651d3a35f0bc2057e2c0nd -I$(PROTODIR)$(XORG_SDK_INCLUDES_DIR) \
1eba1be63201689b2d3e651d3a35f0bc2057e2c0nd -I$(PROTODIR)$(X11_INCLUDES_DIR)/drm \
1eba1be63201689b2d3e651d3a35f0bc2057e2c0nd -I$(PROTODIR)$(X11_INCLUDES_DIR)/X11/dri
1eba1be63201689b2d3e651d3a35f0bc2057e2c0nd
1eba1be63201689b2d3e651d3a35f0bc2057e2c0ndMODTYPE_CFLAGS=$(PROG_CFLAGS)
1eba1be63201689b2d3e651d3a35f0bc2057e2c0nd
1eba1be63201689b2d3e651d3a35f0bc2057e2c0ndASM_IL_DIR = $(PROTODIR)$(XORG_SDK_INCLUDES_DIR)
1eba1be63201689b2d3e651d3a35f0bc2057e2c0ndMODTYPE_CFLAGS_suncc_i386_32 = $(ASM_IL_DIR)/solaris-ia32.il
1050464f9f91f75e7a1c5c3daf3fb7b8aa74592ahumbedoohMODTYPE_CFLAGS_suncc_i386_64 = $(ASM_IL_DIR)/solaris-amd64.il
1050464f9f91f75e7a1c5c3daf3fb7b8aa74592ahumbedoohMODTYPE_CFLAGS_suncc_sparc_32 = $(ASM_IL_DIR)/solaris-sparcv8plus.il
1050464f9f91f75e7a1c5c3daf3fb7b8aa74592ahumbedoohMODTYPE_CFLAGS_suncc_sparc_64 = $(ASM_IL_DIR)/solaris-sparcv8plus.il
1050464f9f91f75e7a1c5c3daf3fb7b8aa74592ahumbedoohMODTYPE_CFLAGS += $(MODTYPE_CFLAGS_$(MODULE_COMPILER)_$(MACH)_$(BUILD_TYPE))
1eba1be63201689b2d3e651d3a35f0bc2057e2c0nd
1050464f9f91f75e7a1c5c3daf3fb7b8aa74592ahumbedooh# Replaces @symbol_visibilty@ in xorg-server.pc, since that fails when
1050464f9f91f75e7a1c5c3daf3fb7b8aa74592ahumbedooh# some drivers are compiled with a different compiler than the server
1eba1be63201689b2d3e651d3a35f0bc2057e2c0ndMODTYPE_CFLAGS_suncc_common = -xldscope=hidden
1eba1be63201689b2d3e651d3a35f0bc2057e2c0ndMODTYPE_CFLAGS_gcc_common = # -fvisibility=hidden - doesn't work with gcc 3.4.3
1eba1be63201689b2d3e651d3a35f0bc2057e2c0ndMODTYPE_CFLAGS += $(MODTYPE_CFLAGS_$(MODULE_COMPILER)_common)
1eba1be63201689b2d3e651d3a35f0bc2057e2c0nd
1eba1be63201689b2d3e651d3a35f0bc2057e2c0ndMODTYPE_LDFLAGS_suncc=
1eba1be63201689b2d3e651d3a35f0bc2057e2c0ndMODTYPE_LDFLAGS_gcc=-R/usr/sfw/lib$(ARCHLIBSUBDIR)
1eba1be63201689b2d3e651d3a35f0bc2057e2c0ndMODTYPE_LDFLAGS=$(LDFLAGS) -Wl,-B,direct $(MODTYPE_LDFLAGS_$(MODULE_COMPILER))
1eba1be63201689b2d3e651d3a35f0bc2057e2c0nd
1eba1be63201689b2d3e651d3a35f0bc2057e2c0ndMODTYPE_LD_OPTIONS=-z defs $(X11_SERVERLIBS_LDFLAGS) \
1eba1be63201689b2d3e651d3a35f0bc2057e2c0nd -M $(TOP)/xserver/xorg/$(BUILD_DIR)/mapfile-Xorg-externs -lc
1eba1be63201689b2d3e651d3a35f0bc2057e2c0nd
1eba1be63201689b2d3e651d3a35f0bc2057e2c0nd# Need to fix libtool interference with our linker flags
1050464f9f91f75e7a1c5c3daf3fb7b8aa74592ahumbedoohDELIBTOOLIZE=yes
1eba1be63201689b2d3e651d3a35f0bc2057e2c0nd
1050464f9f91f75e7a1c5c3daf3fb7b8aa74592ahumbedooh### Include common rules
1050464f9f91f75e7a1c5c3daf3fb7b8aa74592ahumbedoohinclude $(TOP)/common/Makefile.inc
1eba1be63201689b2d3e651d3a35f0bc2057e2c0nd