Skip to content

Commit

Permalink
Add a efivar-static target
Browse files Browse the repository at this point in the history
This adds a target in the toplevel as well as in src/ for
"efivar-static", which builds a static version of the binary for use on
platforms that don't typically have shared libraries.

Based on a patch from Antonio Ospite <[email protected]>
Resolves: issue #14

Signed-off-by: Peter Jones <[email protected]>
  • Loading branch information
vathpela committed May 28, 2015
1 parent 997226e commit f0f680f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@
core.*
*.spec
src/efivar
src/efivar-static
src/makeguids
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 4 additions & 0 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand Down

0 comments on commit f0f680f

Please sign in to comment.