46 lines
1.3 KiB
Makefile
46 lines
1.3 KiB
Makefile
X_OSTYPE ?= $(shell uname)-$(shell uname -m | sed -e s/x86_64/amd64/ -e s/.86/386/ -e 's/\/800//')
|
|
ifeq ($(X_OSTYPE),Linux-amd64)
|
|
X_MODEL_NAME := $(shell cat /proc/cpuinfo | grep "model name")
|
|
ifneq (,$(findstring Intel,$(X_MODEL_NAME)))
|
|
# intel
|
|
ifneq (,$(findstring i5,$(X_MODEL_NAME)))
|
|
# core i5
|
|
X_OSTYPE := Linux-amd64-corei7
|
|
else
|
|
ifneq (,$(findstring i7,$(X_MODEL_NAME)))
|
|
# core i7
|
|
X_OSTYPE := Linux-amd64-corei7
|
|
else
|
|
ifneq (,$(findstring E55,$(X_MODEL_NAME)))
|
|
#Nehalems
|
|
X_OSTYPE := Linux-amd64-corei7
|
|
else
|
|
ifneq (,$(findstring E56,$(X_MODEL_NAME)))
|
|
#Nehalems
|
|
X_OSTYPE := Linux-amd64-corei7
|
|
else
|
|
ifneq (,$(findstring X55,$(X_MODEL_NAME)))
|
|
#Nehalems
|
|
X_OSTYPE := Linux-amd64-corei7
|
|
else
|
|
#core 2
|
|
X_OSTYPE := Linux-amd64-core2
|
|
endif
|
|
endif
|
|
endif
|
|
endif
|
|
endif
|
|
else
|
|
#amd
|
|
ifneq (,$(findstring X6,$(X_MODEL_NAME)))
|
|
X_OSTYPE := Linux-amd64-hexacore
|
|
else
|
|
X_OSTYPE := Linux-amd64-opteron
|
|
endif
|
|
endif
|
|
|
|
else
|
|
# other OS
|
|
|
|
endif
|