summaryrefslogtreecommitdiff
path: root/RadeonHD.tmpl
blob: 2b798e289478a0174bf626d73cf98df4c5d979f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/* imake template for radeonhd driver -*- makefile -*- */

/* Copyright (c) 2007 Hans Ulrich Niedermann <hun@n-dimensional.de>
 *
 * This Makefile fragment is free software; the author(s) give(s)
 * unlimited permission to copy, distribute and modify it.
 */

VER_GREP                   = grep -A 4 AC_INIT $(TOP)/configure.ac
VER_SED                    = sed -n '2s/[^0-9]*\([0-9][^,]*\).*/\1/p'
VER_CUT                    = cut -d . -f
PACKAGE_VERSION            = `$(VER_GREP) | $(VER_SED)`
PACKAGE_VERSION_MAJOR      = `$(VER_GREP) | $(VER_SED) | $(VER_CUT) 1`
PACKAGE_VERSION_MINOR      = `$(VER_GREP) | $(VER_SED) | $(VER_CUT) 2`
PACKAGE_VERSION_PATCHLEVEL = `$(VER_GREP) | $(VER_SED) | $(VER_CUT) 3`

PACKAGE_NAME               = xf86-video-radeonhd

RHD_VERSION_DEFINES = \
           -DPACKAGE_VERSION="\"$(PACKAGE_VERSION)\"" \
           -DPACKAGE_VERSION_MAJOR="$(PACKAGE_VERSION_MAJOR)" \
           -DPACKAGE_VERSION_MINOR="$(PACKAGE_VERSION_MINOR)" \
           -DPACKAGE_VERSION_PATCHLEVEL="$(PACKAGE_VERSION_PATCHLEVEL)"


/*
 * The only way to make sure the git version check is run and git_version.h is
 * updated before a compile. Creating a normal make rule cannot do that.
 */
GIT_VERSION_CMD = $(SHELL) $(TOP)/git_version.sh
RHD_GIT_DEFINES = \
	`$(GIT_VERSION_CMD) -q -k -s $(TOP) -o git_version.h`

clean::
	RemoveFile(git_version.h)
	RemoveFile(git_version.h.new)

/* vim: syntax=make
 */