Am 18.04.2015 um 03:34 schrieb Programmingkid:
This patch gives the fcode-utils' toke, detok, and romheaders commands an install target. This makes "make install" work.
signed-off-by: John Arbuckle programmingkidx@gmail.com
Index: detok/Makefile
--- detok/Makefile (revision 1334) +++ detok/Makefile (working copy) @@ -63,3 +63,5 @@ .c.o: $(CC) -c $(CFLAGS) $(INCLUDES) $< -o $@
+install:
- cp ./$(PROGRAM) /usr/local/bin/$(PROGRAM)
Hardcoding /usr/local is not much better than having no install target. Can you define a DESTDIR variable to /usr/local and make sure "make install DESTDIR=/usr/bin" overrides it?
Suggest to drop the leading ./ here and below.
Also, many installation targets use install -m 0755 src dst to force setting the file mode. Not sure if it matters here though.
Index: romheaders/Makefile
--- romheaders/Makefile (revision 1334) +++ romheaders/Makefile (working copy) @@ -22,6 +22,8 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA, 02110-1301 USA #
+PROGRAM=romheaders
CC ?= gcc STRIP = strip CFLAGS = -O2 -Wall -Wextra @@ -40,3 +42,6 @@ clean: rm -f *~ rm -f romheaders
Might make sense to reuse the new variable here?
+install:
- cp ./$(PROGRAM) /usr/local/bin/$(PROGRAM)
Index: toke/Makefile
--- toke/Makefile (revision 1334) +++ toke/Makefile (working copy) @@ -73,3 +73,5 @@ .c.o: $(CC) -c $(CFLAGS) $(INCLUDES) $< -o $@
+install:
- cp ./$(PROGRAM) /usr/local/bin/$(PROGRAM)
Regards, Andreas