Makefile.inc revision 1095
486N/A# -*- Makefile -*- rules common to all X.Org drivers 486N/A# Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. 911N/A# Permission is hereby granted, free of charge, to any person obtaining a 851N/A# copy of this software and associated documentation files (the "Software"), 486N/A# to deal in the Software without restriction, including without limitation 486N/A# the rights to use, copy, modify, merge, publish, distribute, sublicense, 486N/A# and/or sell copies of the Software, and to permit persons to whom the 486N/A# Software is furnished to do so, subject to the following conditions: 486N/A# The above copyright notice and this permission notice (including the next 486N/A# paragraph) shall be included in all copies or substantial portions of the 486N/A# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 486N/A# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 486N/A# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 486N/A# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 486N/A# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 486N/A# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 486N/A# DEALINGS IN THE SOFTWARE. 486N/A### Include common definitions 486N/Ainclude $(TOP)/open-src/common/Makefile.init 486N/A# Determine from MODULE_NAME if this is a video or input driver 486N/ADRIVER_CLASS_V=$(MODULE_NAME:xf86-video-%=video) 493N/ADRIVER_CLASS=$(DRIVER_CLASS_V:xf86-input-%=input) 486N/ADRIVER_NAME=$(MODULE_NAME:xf86-$(DRIVER_CLASS)-%=%) 493N/A# Hierarchical parent for pkg names in this area 486N/AMODTYPE_PKGHIER=x11/server/xorg/driver 911N/A# Default pkg names for drivers - map xf86- to xorg- in names 911N/AMODULE_PKGTAIL_DEFAULT = $(MODULE_PKGTAIL_SET:yes=$(POUND_SIGN)) 486N/A$(MODULE_PKGTAIL_DEFAULT) MODULE_PKGTAIL=$(MODULE_NAME:xf86-%=xorg-%) 486N/A$(MODULE_PKGTAIL_DEFAULT) MODULE_PKGTAIL_SET=yes 486N/A# Package classification - must be a valid value recognized by pkg gui 486N/AMODULE_PKGCLASS_input = Drivers/Other Peripherals 486N/AMODULE_PKGCLASS_video = Drivers/Display 493N/AMODULE_PKGCLASS_DEFAULT = $(MODULE_PKGCLASS_SET:yes=$(POUND_SIGN)) 493N/A$(MODULE_PKGCLASS_DEFAULT) MODULE_PKGCLASS=$(MODULE_PKGCLASS_$(DRIVER_CLASS)) 493N/A$(MODULE_PKGCLASS_DEFAULT) MODULE_PKGCLASS_SET=yes 486N/A# Build 64-bit on SPARC, 32-bit & 64-bit on x86, to match Xorg server builds 851N/ABUILD_TYPES_DEFAULT = $(BUILD_TYPES_SET:yes=$(POUND_SIGN)) 851N/A$(BUILD_TYPES_DEFAULT) BUILD_TYPES_sparc=64 486N/A$(BUILD_TYPES_DEFAULT) BUILD_TYPES_i386=32 64 486N/A$(BUILD_TYPES_DEFAULT) BUILD_TYPES=$(BUILD_TYPES_$(MACH)) 486N/A$(BUILD_TYPES_DEFAULT) BUILD_TYPES_SET=yes 851N/A# Additional command line options to GNU autoconf configure script MODTYPE_BUILD_32_FLAGS=ARCHBINSUBDIR="$(SUBDIR32)" MODTYPE_BUILD_64_FLAGS=ARCHBINSUBDIR="$(SUBDIR64)" # Override module subdirs to be modules/xxx/amd64, not modules/amd64/xxx DRIVER_DIR_input=$(X11_SERVERMODS_DIR)/input$(SERVERMOD_subdir) DRIVER_DIR_video=$(X11_SERVERMODS_DIR)/drivers$(SERVERMOD_subdir) DRIVER_DIR=$(DRIVER_DIR_$(DRIVER_CLASS)) 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= $(PROG_CPPFLAGS) \ 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=$(LDFLAGS) -Wl,-B,direct -R/lib$(ARCHLIBSUBDIR) MODTYPE_LD_OPTIONS=-z defs $(X11_SERVERLIBS_LDFLAGS) \ # Need to fix libtool interference with our linker flags include $(TOP)/open-src/common/Makefile.inc # Clean up old 64-bit builds from before we stopped building them # for some drivers - depends on $(CLEAN_RULES) to avoid errors from # rm -r when two rules try to remove the same directory at once clean_old64: $(CLEAN_RULES)