From a8da224c63fd9e41d87e57f72050c0e23a285d86 Mon Sep 17 00:00:00 2001 From: Carl-Daniel Hailfinger Date: Wed, 15 Aug 2012 23:06:32 +0000 Subject: Allow specifying CPPFLAGS The user may know better which CFLAGS/CPPFLAGS are appropriate. Use flashrom_CFLAGS for flags which flashrom definitely needs to build. Thanks to Stefan Tauner for pointing out the flaw in r1574. Corresponding to flashrom svn r1575. Signed-off-by: Carl-Daniel Hailfinger Acked-by: Carl-Daniel Hailfinger --- util/ich_descriptors_tool/Makefile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'util') diff --git a/util/ich_descriptors_tool/Makefile b/util/ich_descriptors_tool/Makefile index 4d18aec..9cbc150 100644 --- a/util/ich_descriptors_tool/Makefile +++ b/util/ich_descriptors_tool/Makefile @@ -30,10 +30,10 @@ CFLAGS += -Werror endif -CPPFLAGS += -MMD -MP -MF $(DEPPATH)/$(@F).d +FLASHROM_CFLAGS += -MMD -MP -MF $(DEPPATH)/$(@F).d # enables functions that populate the descriptor structs from plain binary dumps -CPPFLAGS += -D ICH_DESCRIPTORS_FROM_DUMP -CPPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS)) +FLASHROM_CFLAGS += -D ICH_DESCRIPTORS_FROM_DUMP +FLASHROM_CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS)) OBJ = $(OBJATH)/$(SRC:%.c=%.o) @@ -42,15 +42,15 @@ SHAREDOBJ = $(OBJATH)/$(notdir $(SHAREDSRC:%.c=%.o)) all:$(PROGRAM)$(EXEC_SUFFIX) $(OBJ): $(OBJATH)/%.o : %.c - $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c $< + $(CC) $(CFLAGS) $(CPPFLAGS) $(FLASHROM_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) $(CPPFLAGS) -o $@ -c $< + $(CC) $(CFLAGS) $(CPPFLAGS) $(FLASHROM_CFLAGS) -o $@ -c $< $(PROGRAM)$(EXEC_SUFFIX): $(OBJ) $(SHAREDOBJ) - $(CC) -o $(PROGRAM)$(EXEC_SUFFIX) $(OBJ) $(SHAREDOBJ) + $(CC) $(LDFLAGS) -o $(PROGRAM)$(EXEC_SUFFIX) $(OBJ) $(SHAREDOBJ) clean: rm -f $(PROGRAM) $(PROGRAM).exe -- cgit v1.1