diff options
Diffstat (limited to 'util')
-rw-r--r-- | util/inteltool/Makefile | 4 | ||||
-rw-r--r-- | util/inteltool/inteltool.h | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/util/inteltool/Makefile b/util/inteltool/Makefile index cb6d1467e0..b51f5a2ad8 100644 --- a/util/inteltool/Makefile +++ b/util/inteltool/Makefile @@ -17,10 +17,12 @@ PROGRAM = inteltool +top ?= $(abspath ../..) + CC ?= gcc INSTALL ?= /usr/bin/install PREFIX ?= /usr/local -CFLAGS ?= -O2 -g -Wall -W +CFLAGS ?= -O2 -g -Wall -W -I$(top)/src/commonlib/include LDFLAGS += -lpci -lz OBJS = inteltool.o cpu.o gpio.o rootcmplx.o powermgt.o memory.o pcie.o amb.o ivy_memory.o spi.o gfx.o ahci.o diff --git a/util/inteltool/inteltool.h b/util/inteltool/inteltool.h index 8fb6155898..54ddf84fe3 100644 --- a/util/inteltool/inteltool.h +++ b/util/inteltool/inteltool.h @@ -14,6 +14,8 @@ * GNU General Public License for more details. */ +#include <commonlib/helpers.h> + #include <stdint.h> #if defined(__GLIBC__) @@ -208,8 +210,6 @@ static inline uint32_t inl(unsigned port) #define PCI_DEVICE_ID_INTEL_CORE_5TH_GEN_U 0x1604 /* Broadwell-ULT */ #define PCI_DEVICE_ID_INTEL_CORE_6TH_GEN_WST 0x1918 -#define ARRAY_SIZE(a) ((int)(sizeof(a) / sizeof((a)[0]))) - #if !defined(__DARWIN__) && !defined(__FreeBSD__) typedef struct { uint32_t hi, lo; } msr_t; #endif |