diff options
-rw-r--r-- | util/cbmem/Makefile | 15 | ||||
-rw-r--r-- | util/cbmem/cbmem.c | 2 |
2 files changed, 8 insertions, 9 deletions
diff --git a/util/cbmem/Makefile b/util/cbmem/Makefile index 3541e90ead..bf74e08bdf 100644 --- a/util/cbmem/Makefile +++ b/util/cbmem/Makefile @@ -19,17 +19,16 @@ PROGRAM = cbmem ROOT = ../../src -CC = gcc -CFLAGS = -O2 -Wall -Werror -iquote $(ROOT)/include \ - -iquote $(ROOT)/src/arch/x86 -LDFLAGS = +CC = $(CROSS_COMPILE)gcc +CFLAGS ?= -O2 +CFLAGS += -Wall -Werror +CPPFLAGS += -iquote $(ROOT)/include -iquote $(ROOT)/src/arch/x86 OBJS = $(PROGRAM).o -all: dep $(PROGRAM) +all: $(PROGRAM) $(PROGRAM): $(OBJS) - $(CC) -o $(PROGRAM) $(OBJS) $(LDFLAGS) clean: rm -f $(PROGRAM) *.o *~ @@ -37,9 +36,9 @@ clean: distclean: clean rm -f .dependencies -dep: +.dependencies: @$(CC) $(CFLAGS) -MM *.c > .dependencies -.PHONY: all clean distclean dep +.PHONY: all clean distclean -include .dependencies diff --git a/util/cbmem/cbmem.c b/util/cbmem/cbmem.c index ff411db248..31950e22a3 100644 --- a/util/cbmem/cbmem.c +++ b/util/cbmem/cbmem.c @@ -125,7 +125,7 @@ static const struct timestamp_table *find_tstamps(u64 address) int new_size; struct timestamp_table *tst_p; u32 stamp_addr = (u32) - ((u64)cbmr_p->cbmem_addr); + ((uintptr_t)(cbmr_p->cbmem_addr)); readmem(buf, stamp_addr, sizeof(struct timestamp_table)); |