open-src/kernel/Makefile
author Niveditha Rau <Niveditha.Rau@Oracle.COM>
Thu, 23 Feb 2017 14:44:38 -0800
changeset 1696 486a9521e7bf
parent 1684 9f5a5146d91f
permissions -rw-r--r--
25607152 patch to fix 25172489 should be restrictive to just try modesetting for intel
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1494
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
     1
#
1611
69d07754b00f 22318439 incorrect build flags used for i915 (k)mdb dmod
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1537
diff changeset
     2
# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
1494
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
     3
#
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
     4
# Permission is hereby granted, free of charge, to any person obtaining a
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
     5
# copy of this software and associated documentation files (the "Software"),
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
     6
# to deal in the Software without restriction, including without limitation
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
     7
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
     8
# and/or sell copies of the Software, and to permit persons to whom the
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
     9
# Software is furnished to do so, subject to the following conditions:
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    10
#
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    11
# The above copyright notice and this permission notice (including the next
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    12
# paragraph) shall be included in all copies or substantial portions of the
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    13
# Software.
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    14
#
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    15
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    16
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    17
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    18
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    19
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    20
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    21
# DEALINGS IN THE SOFTWARE.
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    22
#
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    23
#
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    24
###############################################################################
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    25
#
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    26
#  Primary Makefile to build the components in open-src/kernel
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    27
#
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    28
###############################################################################
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    29
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    30
TOP:sh=hg root
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    31
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    32
include $(TOP)/open-src/common/Makefile.init
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    33
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    34
#
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    35
# Definitions that are similar to other Makefiles
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    36
#
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    37
OS_SUBDIRS_common =
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    38
1537
979ad61180fd 20656572 EOF efb Xorg Drivers [PSARC/2015/114]
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1512
diff changeset
    39
OS_SUBDIRS_sparc = $(OS_SUBDIRS_common)
1494
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    40
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    41
OS_SUBDIRS_i386  = $(OS_SUBDIRS_common)	\
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    42
	drm \
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    43
	i915 \
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    44
	mdb
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    45
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    46
# MACH will be either "sparc" or "i386"
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    47
MACH=$(TARGET_ARCH:-%=%)
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    48
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    49
# This is used for setting pkg attributes, so save for later.
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    50
START_CMD_ECHO = PS4="" ; set -x
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    51
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    52
OS_SUBDIRS=$(OS_SUBDIRS_$(MACH))
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    53
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    54
# Variables to always pass down to subdirs
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    55
PASSDOWN_VARS = V="$(V)" TOP="$(TOP)" CDEBUGFLAGS="$(CDEBUGFLAGS)" 
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    56
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    57
.DEFAULT:
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    58
	$(MAKE) -e $(MAKEFLAGS) $(PASSDOWN_VARS) subdirs OS_TARGET=$@
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    59
1677
894528f244b2 25029562 Change the location of ARCHIVE_SUBMIT per new filesystem location
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1637
diff changeset
    60
# No tarballs to archive
894528f244b2 25029562 Change the location of ARCHIVE_SUBMIT per new filesystem location
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1637
diff changeset
    61
archive-tarball:
894528f244b2 25029562 Change the location of ARCHIVE_SUBMIT per new filesystem location
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1637
diff changeset
    62
1494
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    63
# debug isn't working quite right yet.
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    64
# World: clean all debug install
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    65
World: clean all install lint
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    66
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    67
clean: clean-subdirs clean-obsolete-subdirs
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    68
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    69
clean-subdirs:
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    70
	$(MAKE) $(MAKEFLAGS) $(PASSDOWN_VARS) subdirs OS_TARGET=clean
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    71
1611
69d07754b00f 22318439 incorrect build flags used for i915 (k)mdb dmod
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1537
diff changeset
    72
clobber: xref-clobber parfait-clobber
1512
4b04d1e46a1d 20395950 Move efb to the X consolidation
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1494
diff changeset
    73
	$(MAKE) $(MAKEFLAGS) $(PASSDOWN_VARS) subdirs OS_TARGET=clobber
4b04d1e46a1d 20395950 Move efb to the X consolidation
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1494
diff changeset
    74
1494
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    75
subdirs: $(OS_SUBDIRS)
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    76
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    77
debug:
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    78
	@ set +e; \
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    79
	cd $@ ; \
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    80
	print "## making debug" $(OS_TARGET) "in open-src/kernel/$(DIRNAME)$@..."; \
1684
9f5a5146d91f 25177273 Enable dumb_create in i915
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1677
diff changeset
    81
	$(MAKE) DEBUG=DEBUG $(MAKEFLAGS) $(PASSDOWN_VARS) $(DEBUGPASSDOWN) $(OS_TARGET)
1494
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    82
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    83
$(OS_SUBDIRS): ALWAYS_RUN
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    84
	@case '${MAKEFLAGS}' in *[ik]*) set +e;; esac; \
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    85
	cd $@ ; \
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    86
	print "## making" $(OS_TARGET) "in open-src/kernel/$(DIRNAME)$@..."; \
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    87
        $(MAKE) $(MAKEFLAGS) $(PASSDOWN_VARS) $(OS_TARGET)
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    88
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    89
clean-obsolete-subdirs:
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    90
	@ set +e; \
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    91
	if [[ ! -z "$(OBSOLETE_SUBDIRS)" ]] ; then \
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    92
	    for i in $(OBSOLETE_SUBDIRS) ; do \
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    93
	    	if [[ -d $$i ]] ; then \
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    94
		    if [[ -f $$i/Makefile ]] ; then \
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    95
		    	$(MAKE) $(MAKEFLAGS) subdirs OS_TARGET=clean OS_SUBDIRS=$$i ; \
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    96
		    else ; \
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    97
		    	print "## removing obsolete build directories in open-src/$(DIRNAME)$$i..."; \
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    98
			($(START_CMD_ECHO) ; cd $$i && rm -rf build* .checksum* ) ; \
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
    99
			($(START_CMD_ECHO) ; rmdir $$i ) ; \
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
   100
		    fi ; \
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
   101
		fi ; \
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
   102
	    done ; \
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
   103
	fi ; \
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
   104
	return 0
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
   105
1512
4b04d1e46a1d 20395950 Move efb to the X consolidation
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1494
diff changeset
   106
# Build various x-ref's
1637
4d091a29bd63 23216116 i915/drm should use header files from libdrm, not have copies
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1611
diff changeset
   107
XREFDIRS	= Make* sys $(OS_SUBDIRS_i386) $(OS_SUBDIRS_sparc) $(PROTODIR)/usr/include/drm
1611
69d07754b00f 22318439 incorrect build flags used for i915 (k)mdb dmod
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1537
diff changeset
   108
1512
4b04d1e46a1d 20395950 Move efb to the X consolidation
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1494
diff changeset
   109
xref: tags cscope.out
4b04d1e46a1d 20395950 Move efb to the X consolidation
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1494
diff changeset
   110
4b04d1e46a1d 20395950 Move efb to the X consolidation
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1494
diff changeset
   111
xref-clobber: tags-clobber cscope-clobber
4b04d1e46a1d 20395950 Move efb to the X consolidation
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1494
diff changeset
   112
4b04d1e46a1d 20395950 Move efb to the X consolidation
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1494
diff changeset
   113
cscope.files: ALWAYS_RUN
1637
4d091a29bd63 23216116 i915/drm should use header files from libdrm, not have copies
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1611
diff changeset
   114
	@echo "Building filelist from $(XREFDIRS)"; \
4d091a29bd63 23216116 i915/drm should use header files from libdrm, not have copies
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1611
diff changeset
   115
	find $(XREFDIRS) -follow -name "Make*" -o -name "*.[ch]" > $@; \
1611
69d07754b00f 22318439 incorrect build flags used for i915 (k)mdb dmod
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1537
diff changeset
   116
	if [[ -f gfxp_files ]]; then \
69d07754b00f 22318439 incorrect build flags used for i915 (k)mdb dmod
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1537
diff changeset
   117
		/usr/bin/cat -s gfxp_files >> $@; \
69d07754b00f 22318439 incorrect build flags used for i915 (k)mdb dmod
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1537
diff changeset
   118
	fi
1512
4b04d1e46a1d 20395950 Move efb to the X consolidation
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1494
diff changeset
   119
4b04d1e46a1d 20395950 Move efb to the X consolidation
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1494
diff changeset
   120
tags: cscope.files
4b04d1e46a1d 20395950 Move efb to the X consolidation
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1494
diff changeset
   121
	@ctags -tw `cat cscope.files`
4b04d1e46a1d 20395950 Move efb to the X consolidation
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1494
diff changeset
   122
4b04d1e46a1d 20395950 Move efb to the X consolidation
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1494
diff changeset
   123
tags-clobber:
4b04d1e46a1d 20395950 Move efb to the X consolidation
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1494
diff changeset
   124
	@rm -f tags cscope.files
4b04d1e46a1d 20395950 Move efb to the X consolidation
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1494
diff changeset
   125
4b04d1e46a1d 20395950 Move efb to the X consolidation
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1494
diff changeset
   126
cscope.out: cscope.files
4b04d1e46a1d 20395950 Move efb to the X consolidation
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1494
diff changeset
   127
	@cscope-fast -bq
4b04d1e46a1d 20395950 Move efb to the X consolidation
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1494
diff changeset
   128
4b04d1e46a1d 20395950 Move efb to the X consolidation
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1494
diff changeset
   129
cscope-clobber:
4b04d1e46a1d 20395950 Move efb to the X consolidation
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1494
diff changeset
   130
	@rm -f cscope.files cscope.in.out cscope.out cscope.out.in cscope.out.po cscope.po.out
4b04d1e46a1d 20395950 Move efb to the X consolidation
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1494
diff changeset
   131
	
1611
69d07754b00f 22318439 incorrect build flags used for i915 (k)mdb dmod
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1537
diff changeset
   132
# Create local Parfait output
69d07754b00f 22318439 incorrect build flags used for i915 (k)mdb dmod
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1537
diff changeset
   133
XBUILD_HG_ID:sh=hg id -i
69d07754b00f 22318439 incorrect build flags used for i915 (k)mdb dmod
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1537
diff changeset
   134
PLOG			= parfait_log
69d07754b00f 22318439 incorrect build flags used for i915 (k)mdb dmod
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1537
diff changeset
   135
PARFAIT_MAX_JOBS	= 100%
69d07754b00f 22318439 incorrect build flags used for i915 (k)mdb dmod
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1537
diff changeset
   136
69d07754b00f 22318439 incorrect build flags used for i915 (k)mdb dmod
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1537
diff changeset
   137
69d07754b00f 22318439 incorrect build flags used for i915 (k)mdb dmod
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1537
diff changeset
   138
${PLOG}:
69d07754b00f 22318439 incorrect build flags used for i915 (k)mdb dmod
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1537
diff changeset
   139
	@if [[ ! -d $@ ]] ; then mkdir $@ ; fi ; \
69d07754b00f 22318439 incorrect build flags used for i915 (k)mdb dmod
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1537
diff changeset
   140
69d07754b00f 22318439 incorrect build flags used for i915 (k)mdb dmod
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1537
diff changeset
   141
parfait: ALWAYS_RUN ${PLOG}
69d07754b00f 22318439 incorrect build flags used for i915 (k)mdb dmod
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1537
diff changeset
   142
	-@echo "Making Parfait" ; \
69d07754b00f 22318439 incorrect build flags used for i915 (k)mdb dmod
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1537
diff changeset
   143
	parfait -e all -c ${TOP}/open-src/common/X-parfait.conf \
69d07754b00f 22318439 incorrect build flags used for i915 (k)mdb dmod
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1537
diff changeset
   144
	   -z "${TOP}/open-src/kernel" -j "${PARFAIT_MAX_JOBS}" \
69d07754b00f 22318439 incorrect build flags used for i915 (k)mdb dmod
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1537
diff changeset
   145
	   -r "${XBUILD_HG_ID}" -o ${PLOG}/parfait.txt -g ${PLOG}/parfait \
69d07754b00f 22318439 incorrect build flags used for i915 (k)mdb dmod
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1537
diff changeset
   146
	   ${TOP}/open-src/kernel > ${PLOG}/parfait.out 2>&1 ; \
69d07754b00f 22318439 incorrect build flags used for i915 (k)mdb dmod
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1537
diff changeset
   147
	if [[ $$? != 0 ]]; \
69d07754b00f 22318439 incorrect build flags used for i915 (k)mdb dmod
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1537
diff changeset
   148
	  then echo "Parfait defects discovered, see ${PWD}/${PLOG}"; \
69d07754b00f 22318439 incorrect build flags used for i915 (k)mdb dmod
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1537
diff changeset
   149
	fi ; \
69d07754b00f 22318439 incorrect build flags used for i915 (k)mdb dmod
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1537
diff changeset
   150
	return 0
69d07754b00f 22318439 incorrect build flags used for i915 (k)mdb dmod
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1537
diff changeset
   151
69d07754b00f 22318439 incorrect build flags used for i915 (k)mdb dmod
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1537
diff changeset
   152
parfait-clobber:
69d07754b00f 22318439 incorrect build flags used for i915 (k)mdb dmod
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1537
diff changeset
   153
	rm -rf ${PLOG}
69d07754b00f 22318439 incorrect build flags used for i915 (k)mdb dmod
Randy Fishel <Randy.Fishel@Oracle.COM>
parents: 1537
diff changeset
   154
1494
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
   155
# Dummy target to force another target to always be run, even if a file
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
   156
# or directory with the same name already exists (as it will for subdirs)
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
   157
ALWAYS_RUN:
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
   158
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
   159
# Tell dmake it can build subdirs in parallel
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
   160
.PARALLEL: $(OS_SUBDIRS)
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
   161
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
   162
# Dependencies between modules
a72f39592745 PSARC 2014/148 Move DRM drivers to X11
Randy Fishel <Randy.Fishel@Oracle.COM>
parents:
diff changeset
   163
i915: drm