Various fixes to cbfstool.

- add ntohll and htonll (as coreboot parses 64bit fields now)
- use the same byte swapping code across platforms
- detect endianess early
- fix lots of warnings
- Don't override CFLAGS in Makefile

Change-Id: Iaea02ff7a31ab6a95fd47858d0efd9af764a3e5f
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Reviewed-on: http://review.coreboot.org/313
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
Stefan Reinauer
2011-10-21 14:24:57 -07:00
committed by Stefan Reinauer
parent 3c976791b0
commit a1e4824f73
8 changed files with 110 additions and 58 deletions

View File

@@ -1,9 +1,10 @@
obj ?= $(shell pwd)
HOSTCXX ?= g++
HOSTCC ?= gcc
CFLAGS ?= -g
HOSTCXX ?= g++
HOSTCC ?= gcc
CFLAGS ?= -g -Wall
CXXFLAGS ?=-DCOMPACT $(CFLAGS)
LDFLAGS ?= -g
BINARY:=$(obj)/cbfstool
@@ -44,9 +45,5 @@ clean:
tags:
ctags *.[ch]
CXXFLAGS=-DCOMPACT -g
CFLAGS=-g
LDFLAGS=-g
$(obj)/cbfstool:$(COMMON)
$(HOSTCXX) $(LDFLAGS) -o $@ $^