mirror of
https://github.com/anrieff/libcpuid
synced 2025-02-02 20:14:07 +00:00
Don't link with msrdriver.c on non-Windows platform. (#159)
This simplify the procedure of sanitizing unneeded blob in source.
This commit is contained in:
parent
7a580fd2b2
commit
2e61160983
3 changed files with 20 additions and 3 deletions
11
configure.ac
11
configure.ac
|
@ -56,6 +56,17 @@ if test "x$GCC" = "xyes"; then
|
|||
AM_LDFLAGS="$AM_LDFLAGS -g -Wall"
|
||||
fi
|
||||
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
build_windows=no
|
||||
|
||||
case "${host_os}" in
|
||||
cygwin*|mingw*)
|
||||
build_windows=yes
|
||||
;;
|
||||
esac
|
||||
|
||||
AM_CONDITIONAL([WINDOWS], [test "$build_windows" = "yes"])
|
||||
|
||||
AC_SUBST(AM_CPPFLAGS)
|
||||
AC_SUBST(AM_LDFLAGS)
|
||||
|
|
|
@ -5,9 +5,12 @@ set(cpuid_sources
|
|||
rdtsc.c
|
||||
libcpuid_util.c
|
||||
rdmsr.c
|
||||
msrdriver.c
|
||||
asm-bits.c)
|
||||
|
||||
if(WIN32)
|
||||
list(APPEND cpuid_sources msrdriver.c)
|
||||
endif()
|
||||
|
||||
if("${MSVC_CXX_ARCHITECTURE_ID}" MATCHES "x64")
|
||||
list(APPEND cpuid_sources masm-x64.asm)
|
||||
endif()
|
||||
|
|
|
@ -13,8 +13,11 @@ libcpuid_la_SOURCES = \
|
|||
rdtsc.c \
|
||||
asm-bits.c \
|
||||
libcpuid_util.c \
|
||||
rdmsr.c \
|
||||
msrdriver.c
|
||||
rdmsr.c
|
||||
|
||||
if WINDOWS
|
||||
libcpuid_la_SOURCES += msrdriver.c
|
||||
endif
|
||||
|
||||
libcpuid_la_DEPENDENCIES = \
|
||||
$(srcdir)/libcpuid.sym
|
||||
|
|
Loading…
Add table
Reference in a new issue