Skip to content

Commit

Permalink
src/Makefile: build util.c separately for makeguids
Browse files Browse the repository at this point in the history
util.c needs to be built twice when cross-compiling:
for the build machine to be able to link with
makeguids which then runs during the same build,
and then for the actual target.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
  • Loading branch information
Alexander Kanavin authored and frozencemetery committed Jun 8, 2022
1 parent b23aba1 commit ca48d39
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,13 @@ EFIVAR_OBJECTS = $(patsubst %.S,%.o,$(patsubst %.c,%.o,$(EFIVAR_SOURCES)))
EFISECDB_SOURCES = efisecdb.c guid-symbols.c secdb-dump.c util.c
EFISECDB_OBJECTS = $(patsubst %.S,%.o,$(patsubst %.c,%.o,$(EFISECDB_SOURCES)))
GENERATED_SOURCES = include/efivar/efivar-guids.h guid-symbols.c
MAKEGUIDS_SOURCES = makeguids.c util.c
MAKEGUIDS_SOURCES = makeguids.c util-makeguids.c
MAKEGUIDS_OBJECTS = $(patsubst %.S,%.o,$(patsubst %.c,%.o,$(MAKEGUIDS_SOURCES)))
MAKEGUIDS_OUTPUT = $(GENERATED_SOURCES) guids.lds

util-makeguids.c : util.c
cp util.c util-makeguids.c

ALL_SOURCES=$(LIBEFISEC_SOURCES) $(LIBEFIBOOT_SOURCES) $(LIBEFIVAR_SOURCES) \
$(MAKEGUIDS_SOURCES) $(GENERATED_SOURCES) $(EFIVAR_SOURCES) \
$(sort $(wildcard include/efivar/*.h))
Expand Down

0 comments on commit ca48d39

Please sign in to comment.