Makefile.inc revision 957
258N/A# -*- Makefile -*- rules common to all X.Org drivers
258N/A#
493N/A# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
258N/A#
258N/A# Permission is hereby granted, free of charge, to any person obtaining a
258N/A# copy of this software and associated documentation files (the "Software"),
258N/A# to deal in the Software without restriction, including without limitation
258N/A# the rights to use, copy, modify, merge, publish, distribute, sublicense,
258N/A# and/or sell copies of the Software, and to permit persons to whom the
258N/A# Software is furnished to do so, subject to the following conditions:
258N/A#
258N/A# The above copyright notice and this permission notice (including the next
258N/A# paragraph) shall be included in all copies or substantial portions of the
258N/A# Software.
258N/A#
258N/A# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
258N/A# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
258N/A# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
258N/A# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
258N/A# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
258N/A# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
258N/A# DEALINGS IN THE SOFTWARE.
258N/A#
258N/A#
258N/A
258N/APWD:sh=pwd
258N/ATOP=$(PWD)/../..
258N/A
258N/AMODTYPE=driver
258N/A
258N/A### Include common definitions
493N/Ainclude $(TOP)/common/Makefile.init
258N/A
258N/A# Determine from MODULE_NAME if this is a video or input driver
258N/ADRIVER_CLASS_V=$(MODULE_NAME:xf86-video-%=video)
258N/ADRIVER_CLASS=$(DRIVER_CLASS_V:xf86-input-%=input)
258N/ADRIVER_NAME=$(MODULE_NAME:xf86-$(DRIVER_CLASS)-%=%)
493N/A
493N/A# Build 64-bit on SPARC, 32-bit & 64-bit on x86, to match Xorg server builds
493N/ABUILD_TYPES_SET=yes
493N/ABUILD_TYPES_sparc=64
493N/ABUILD_TYPES_i386=32 64
493N/ABUILD_TYPES=$(BUILD_TYPES_$(MACH))
493N/A
258N/A# Additional command line options to GNU autoconf configure script
258N/AMODTYPE_CONFIG_OPTS = \
493N/A --docdir='$(X11_DOC_DIR)' \
258N/A --with-xorg-module-dir='$(X11_SERVERMODS_DIR)$(SERVERMOD_subdir)'
258N/A
258N/AMODTYPE_BUILD_32_FLAGS=ARCHBINSUBDIR="$(SUBDIR32)"
258N/AMODTYPE_BUILD_64_FLAGS=ARCHBINSUBDIR="$(SUBDIR64)"
258N/A
258N/A# Override module subdirs to be modules/xxx/amd64, not modules/amd64/xxx
258N/ADRIVER_DIR_input=$(X11_SERVERMODS_DIR)/input$(SERVERMOD_subdir)
DRIVER_DIR_video=$(X11_SERVERMODS_DIR)/drivers$(SERVERMOD_subdir)
DRIVER_DIR=$(DRIVER_DIR_$(DRIVER_CLASS))
MODTYPE_MAKEFLAGS= \
inputdir='$(DRIVER_DIR_input)' \
driversdir='$(DRIVER_DIR_video)' \
$(DRIVER_NAME)_drv_ladir='$(DRIVER_DIR)'
MODTYPE_ADD_CONFIGURE_TARGETS = fix-moduledirs
# Set comments in ELF binaries to help identify versions/builds
MODTYPE_ADD_BUILD_TARGETS=set-elf-comments
MODTYPE_CPPFLAGS= \
-I$(PROTODIR)/usr/include \
-I$(PROTODIR)/usr/include/pixman-1 \
-I$(PROTODIR)$(XORG_SDK_INCLUDES_DIR) \
-I$(PROTODIR)$(X11_INCLUDES_DIR)/drm \
-I$(PROTODIR)$(X11_INCLUDES_DIR)/X11/dri
MODTYPE_CFLAGS=$(PROG_CFLAGS)
ASM_IL_DIR = $(PROTODIR)$(XORG_SDK_INCLUDES_DIR)
MODTYPE_CFLAGS_suncc_i386_32 = $(ASM_IL_DIR)/solaris-ia32.il
MODTYPE_CFLAGS_suncc_i386_64 = $(ASM_IL_DIR)/solaris-amd64.il
MODTYPE_CFLAGS_suncc_sparc_32 = $(ASM_IL_DIR)/solaris-sparcv8plus.il
MODTYPE_CFLAGS_suncc_sparc_64 = $(ASM_IL_DIR)/solaris-sparcv8plus.il
MODTYPE_CFLAGS += $(MODTYPE_CFLAGS_$(MODULE_COMPILER)_$(MACH)_$(BUILD_TYPE))
# Replaces @symbol_visibilty@ in xorg-server.pc, since that fails when
# some drivers are compiled with a different compiler than the server
MODTYPE_CFLAGS_suncc_common = -xldscope=hidden
MODTYPE_CFLAGS_gcc_common = # -fvisibility=hidden - doesn't work with gcc 3.4.3
MODTYPE_CFLAGS += $(MODTYPE_CFLAGS_$(MODULE_COMPILER)_common)
MODTYPE_LDFLAGS_suncc=
MODTYPE_LDFLAGS_gcc=-R/usr/sfw/lib$(ARCHLIBSUBDIR)
MODTYPE_LDFLAGS=$(LDFLAGS) -Wl,-B,direct $(MODTYPE_LDFLAGS_$(MODULE_COMPILER))
MODTYPE_LD_OPTIONS=-z defs $(X11_SERVERLIBS_LDFLAGS) \
-M $(TOP)/xserver/xorg/$(BUILD_DIR)/mapfile-Xorg-externs -lc
# Need to fix libtool interference with our linker flags
DELIBTOOLIZE=yes
### Include common rules
include $(TOP)/common/Makefile.inc