summaryrefslogtreecommitdiff
path: root/util/nvramtool/Makefile
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@coresystems.de>2009-09-01 09:54:21 +0000
committerStefan Reinauer <stepan@openbios.org>2009-09-01 09:54:21 +0000
commit4db6cbd26c2913549cd3d58c6943e766ccdc6c5e (patch)
tree5b81d8deaf1ac0b5ab4cefef53e404a76c32ef1e /util/nvramtool/Makefile
parentf7f2f258d8b44218c2efb83cfb276890fd4fb95c (diff)
downloadcoreboot-4db6cbd26c2913549cd3d58c6943e766ccdc6c5e.tar.xz
nvramtool:
* Add OSX/Darwin support * Add $DESTDIR support * Clean up make install/spec Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Peter Stuge <peter@stuge.se> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4622 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/nvramtool/Makefile')
-rw-r--r--util/nvramtool/Makefile12
1 files changed, 9 insertions, 3 deletions
diff --git a/util/nvramtool/Makefile b/util/nvramtool/Makefile
index f07ed7e943..752e106da8 100644
--- a/util/nvramtool/Makefile
+++ b/util/nvramtool/Makefile
@@ -18,6 +18,11 @@ OBJS = cmos_lowlevel.o cmos_ops.o common.o compute_ip_checksum.o \
hexdump.o input_file.o layout.o layout_file.o lbtable.o \
nvramtool.o opts.o reg_expr.o
+OS_ARCH = $(shell uname)
+ifeq ($(OS_ARCH), Darwin)
+LDFLAGS = -framework DirectIO
+endif
+
all: dep $(PROGRAM)
$(PROGRAM): $(OBJS)
@@ -34,9 +39,10 @@ dep:
@$(CC) -MM *.c > .dependencies
install: $(PROGRAM)
- $(INSTALL) $(PROGRAM) $(PREFIX)/sbin
- mkdir -p $(PREFIX)/share/man/man1
- $(INSTALL) $(PROGRAM).8 $(PREFIX)/share/man/man8
+ mkdir -p $(DESTDIR)$(PREFIX)/sbin
+ $(INSTALL) $(PROGRAM) $(DESTDIR)$(PREFIX)/sbin
+ mkdir -p $(DESTDIR)$(PREFIX)/share/man/man8
+ $(INSTALL) $(PROGRAM).8 $(DESTDIR)$(PREFIX)/share/man/man8
.PHONY: all clean distclean dep