mirror of
https://github.com/anrieff/libcpuid
synced 2024-11-10 22:59:13 +00:00
4cf8cfa862
Initial commit adding support for detection of SGX. Not tested yet. Increment version number due to binary incompatibility of the sizes of cpu_raw_data_t and cpu_id_t.
40 lines
1.1 KiB
Text
40 lines
1.1 KiB
Text
# Makefile for Win32
|
|
#
|
|
# This is required on machines with multiple versions of the Microsoft compiler
|
|
#
|
|
# E.g. if you have Visual Studio 2008 and compile libcpuid with it, the static lib
|
|
# will not link in an executable, created through makefiles and MSVC 2003 (7.1).
|
|
#
|
|
# The solution is to use this custom makefile and compile libcpuid for MSVC 2003
|
|
#
|
|
|
|
all: libcpuid.lib
|
|
|
|
CC = cl.exe /nologo /TC
|
|
OPTFLAGS = /MT
|
|
DEFINES = /D "VERSION=\"0.4.0\""
|
|
OBJECTS = asm-bits.obj cpuid_main.obj libcpuid_util.obj recog_amd.obj recog_intel.obj rdtsc.obj
|
|
|
|
libcpuid.lib: $(OBJECTS)
|
|
lib /nologo /out:libcpuid.lib $(OBJECTS)
|
|
|
|
asm-bits.obj: asm-bits.c
|
|
$(CC) $(OPTFLAGS) $(DEFINES) /c asm-bits.c
|
|
|
|
cpuid_main.obj: cpuid_main.c
|
|
$(CC) $(OPTFLAGS) $(DEFINES) /c cpuid_main.c
|
|
|
|
libcpuid_util.obj: libcpuid_util.c
|
|
$(CC) $(OPTFLAGS) $(DEFINES) /c libcpuid_util.c
|
|
|
|
recog_amd.obj: recog_amd.c
|
|
$(CC) $(OPTFLAGS) $(DEFINES) /c recog_amd.c
|
|
|
|
recog_intel.obj: recog_intel.c
|
|
$(CC) $(OPTFLAGS) $(DEFINES) /c recog_intel.c
|
|
|
|
rdtsc.obj: rdtsc.c
|
|
$(CC) $(OPTFLAGS) $(DEFINES) /c rdtsc.c
|
|
|
|
clean:
|
|
del *.obj libcpuid.lib
|