diff --git a/.gitignore b/.gitignore index 8027a187..5f5c7506 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,5 @@ core.* *.spec src/efivar +src/efivar-static src/makeguids diff --git a/Makefile b/Makefile index 4b2beb86..66985006 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,9 @@ VERSION := 0.18 all : $(SUBDIRS) efivar.spec +efivar efivar-static : + $(MAKE) -C src TOPDIR=$(TOPDIR) SRCDIR=$(TOPDIR)/$@/ ARCH=$(ARCH) VERSION=$(VERSION) $@ + $(SUBDIRS) : $(MAKE) -C $@ TOPDIR=$(TOPDIR) SRCDIR=$(TOPDIR)/$@/ ARCH=$(ARCH) VERSION=$(VERSION) diff --git a/src/Makefile b/src/Makefile index 61613992..f8ac6bd0 100644 --- a/src/Makefile +++ b/src/Makefile @@ -44,6 +44,10 @@ efivar : efivar.o libefivar.so $(CCLD) $(ccldflags) -L. -lefivar -o $@ $^ \ -lpopt $(foreach lib,$(EFIVAR_LIBS),-l$(lib)) +efivar-static : efivar.o libefivar.a + $(CCLD) $(ccldflags) -static -L. -o $@ $^ \ + -lpopt $(foreach lib,$(EFIVAR_LIBS),-l$(lib)) + %.pc : %.pc.in sed -e "s,@@VERSION@@,$(VERSION),g" \ -e "s,@@LIBDIR@@,$(libdir),g" \