xenocara/driver/xf86-video-radeonhd/RadeonHD.tmpl
2008-01-05 17:28:11 +00:00

34 lines
1.2 KiB
Makefile

/* imake template for radeonhd driver -*- makefile -*- */
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
*/