mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-26 22:52:34 +02:00

Move Mac OS X IOKit/DirectHW availability checks in the Makefile from compiler check to pciutils check. Print the compiler error messages for feature detection. Add DOS libpci in the Makefile includes only if a PCI-based programmer was requested. Restrict mmap usage in ich_descriptors_tool to Unix style systems. Build ich_descriptors_tool with the correct .exe extension on DOS/Windows. Build ich_descriptors_tool by default on x86. (Patch by Stefan Tauner) Print the Windows version instead of "unknown machine" on Windows. Don't #define our own __DARWIN__, use the standard OS X detection method. Update the README. Add more generated files to svn:ignore Corresponding to flashrom svn r1567. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
48 lines
1.2 KiB
Makefile
48 lines
1.2 KiB
Makefile
CC ?= gcc
|
|
|
|
PROGRAM=ich_descriptors_tool
|
|
EXTRAINCDIRS = ../../ .
|
|
DEPPATH = .dep
|
|
OBJATH = .obj
|
|
SHAREDSRC = ich_descriptors.c
|
|
SHAREDSRCDIR = ../..
|
|
|
|
SRC = $(wildcard *.c)
|
|
|
|
CFLAGS += -Wall
|
|
CFLAGS += -MMD -MP -MF $(DEPPATH)/$(@F).d
|
|
# enables functions that populate the descriptor structs from plain binary dumps
|
|
CFLAGS += -D ICH_DESCRIPTORS_FROM_DUMP
|
|
CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
|
|
|
|
ifeq ($(TARGET_OS), DOS)
|
|
# DJGPP has odd uint*_t definitions which cause lots of format string warnings.
|
|
CFLAGS += -Wno-format
|
|
endif
|
|
|
|
OBJ = $(OBJATH)/$(SRC:%.c=%.o)
|
|
|
|
SHAREDOBJ = $(OBJATH)/$(notdir $(SHAREDSRC:%.c=%.o))
|
|
|
|
all:$(PROGRAM)$(EXEC_SUFFIX)
|
|
|
|
$(OBJ): $(OBJATH)/%.o : %.c
|
|
$(CC) $(CFLAGS) -o $@ -c $<
|
|
|
|
# this enables us to share source files without simultaneously sharing .o files
|
|
# with flashrom, which would lead to unexpected results (w/o running make clean)
|
|
$(SHAREDOBJ): $(OBJATH)/%.o : $(SHAREDSRCDIR)/%.c
|
|
$(CC) $(CFLAGS) -o $@ -c $<
|
|
|
|
$(PROGRAM)$(EXEC_SUFFIX): $(OBJ) $(SHAREDOBJ)
|
|
$(CC) -o $(PROGRAM)$(EXEC_SUFFIX) $(OBJ) $(SHAREDOBJ)
|
|
|
|
clean:
|
|
rm -f $(PROGRAM) $(PROGRAM).exe
|
|
rm -rf $(DEPPATH) $(OBJATH)
|
|
|
|
# Include the dependency files.
|
|
-include $(shell mkdir -p $(DEPPATH) $(OBJATH) 2>/dev/null) $(wildcard $(DEPPATH)/*)
|
|
|
|
.PHONY: all clean
|