summaryrefslogtreecommitdiffstats
path: root/Makefile.config
diff options
context:
space:
mode:
authorDexter Morgan <dmorgan@mageia.org>2011-06-02 20:51:35 +0000
committerDexter Morgan <dmorgan@mageia.org>2011-06-02 20:51:35 +0000
commita9b2bdafaf625d10aef2f476aa4014fd36c846bc (patch)
tree2364afc0ee6739b59a25c44d68c9f003bcaf03d9 /Makefile.config
downloaddrakx-a9b2bdafaf625d10aef2f476aa4014fd36c846bc.tar
drakx-a9b2bdafaf625d10aef2f476aa4014fd36c846bc.tar.gz
drakx-a9b2bdafaf625d10aef2f476aa4014fd36c846bc.tar.bz2
drakx-a9b2bdafaf625d10aef2f476aa4014fd36c846bc.tar.xz
drakx-a9b2bdafaf625d10aef2f476aa4014fd36c846bc.zip
Branch for updates
Diffstat (limited to 'Makefile.config')
-rw-r--r--Makefile.config20
1 files changed, 20 insertions, 0 deletions
diff --git a/Makefile.config b/Makefile.config
new file mode 100644
index 000000000..ae1d66555
--- /dev/null
+++ b/Makefile.config
@@ -0,0 +1,20 @@
+
+_DISTRIB_NAME := $(shell sed -n '/^.*distribution=\([^,]*\),.*/s//\1/p' /etc/product.id)
+DISTRIB_NAME = "$(_DISTRIB_NAME)"
+DISTRIB_VERSION = $(shell sed -n '/^.*version=\([^,]*\),.*/s//\1/p' /etc/product.id)
+DISTRIB_TYPE = $(shell sed -n '/^.*type=\([^,]*\),.*/s//\1/p' /etc/product.id)
+DISTRIB_DESCR = "$(_DISTRIB_NAME) release $(DISTRIB_VERSION)"
+
+
+# not config, but useful everywhere :)
+ARCH := $(patsubst i%86,i386,$(shell uname -m))
+ARCH := $(patsubst sparc%,sparc,$(ARCH))
+ARCH := $(patsubst arm%,arm,$(ARCH))
+
+PKG_ARCH := $(patsubst i386,i586,$(ARCH))
+
+ifeq (x86_64, $(ARCH))
+LIB = lib64
+else
+LIB = lib
+endif