fcode-utils: add Makefile install target Add an install target to the fcode-utils Makefiles for toke, detok and romheaders so that "make install" will work correctly. Signed-off-by: John Arbuckle <programmingkidx@gmail.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/fcode-utils-devel@1335 f158a5a8-5612-0410-a976-696ce0be7e32
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
diff --git a/detok/Makefile b/detok/Makefile
index 0b730dc..3ba6c30 100644
--- a/detok/Makefile
+++ b/detok/Makefile
@@ -24,6 +24,7 @@
PROGRAM = detok
+DESTDIR = /usr/local
CC ?= gcc
STRIP = strip
INCLUDES = -I../shared
@@ -63,3 +64,6 @@ clean:
.c.o:
$(CC) -c $(CFLAGS) $(INCLUDES) $< -o $@
+install:
+ mkdir -p $(DESTDIR)/bin
+ cp $(PROGRAM) $(DESTDIR)/bin/$(PROGRAM)
diff --git a/romheaders/Makefile b/romheaders/Makefile
index 7d47a21..a216e7b 100644
--- a/romheaders/Makefile
+++ b/romheaders/Makefile
@@ -22,6 +22,9 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA, 02110-1301 USA
#
+PROGRAM = romheaders
+
+DESTDIR = /usr/local
CC ?= gcc
STRIP = strip
CFLAGS = -O2 -Wall -Wextra
@@ -39,4 +42,8 @@ romheaders: $(SOURCES)
clean:
rm -f *~
- rm -f romheaders
+ rm -f $(PROGRAM)
+
+install:
+ mkdir -p $(DESTDIR)/bin
+ cp $(PROGRAM) $(DESTDIR)/bin/$(PROGRAM)
diff --git a/toke/Makefile b/toke/Makefile
index a3d81b1..aa75acd 100644
--- a/toke/Makefile
+++ b/toke/Makefile
@@ -24,6 +24,7 @@
PROGRAM = toke
+DESTDIR = /usr/local
CC ?= gcc
STRIP = strip
INCLUDES = -I../shared
@@ -73,3 +74,6 @@ documentation:: *.c *.h toke.doxygen
.c.o:
$(CC) -c $(CFLAGS) $(INCLUDES) $< -o $@
+install:
+ mkdir -p $(DESTDIR)/bin
+ cp $(PROGRAM) $(DESTDIR)/bin/$(PROGRAM)