Commit 9a4887e9c1082875e2c6801adfec832cebdb1a37

Authored by Christophe Blaess
1 parent 8b1ccc1b

Fix `install` and `uninstall` targets in Makefile.

Add `install` target for  executable and default
`bootcode.bin`/`bootcode4.bin` and
`start.elf`/`start4.elf` files.

Update `uninstall` target.
Showing 1 changed file with 12 additions and 5 deletions
Makefile
@@ -10,13 +10,20 @@ rpiboot: main.c msd/bootcode.h msd/start.h msd/bootcode4.h msd/start4.h @@ -10,13 +10,20 @@ rpiboot: main.c msd/bootcode.h msd/start.h msd/bootcode4.h msd/start4.h
10 bin2c: bin2c.c 10 bin2c: bin2c.c
11 $(CC) -Wall -Wextra -g -o $@ $< 11 $(CC) -Wall -Wextra -g -o $@ $<
12 12
  13 +install: rpiboot
  14 + install -m 755 rpiboot /usr/bin/
  15 + install -d /usr/share/rpiboot
  16 + install -m 644 msd/bootcode.bin /usr/share/rpiboot/
  17 + install -m 644 msd/bootcode4.bin /usr/share/rpiboot/
  18 + install -m 644 msd/start.elf /usr/share/rpiboot/
  19 + install -m 644 msd/start4.elf /usr/share/rpiboot/
  20 +
13 uninstall: 21 uninstall:
14 rm -f /usr/bin/rpiboot 22 rm -f /usr/bin/rpiboot
15 - rm -f /usr/share/rpiboot/usbbootcode.bin  
16 - rm -f /usr/share/rpiboot/usbbootcode4.bin  
17 - rm -f /usr/share/rpiboot/msd.elf  
18 - rm -f /usr/share/rpiboot/msd4.elf  
19 - rm -f /usr/share/rpiboot/buildroot.elf 23 + rm -f /usr/share/rpiboot/bootcode.bin
  24 + rm -f /usr/share/rpiboot/bootcode4.bin
  25 + rm -f /usr/share/rpiboot/start.elf
  26 + rm -f /usr/share/rpiboot/start4.elf
20 rmdir --ignore-fail-on-non-empty /usr/share/rpiboot/ 27 rmdir --ignore-fail-on-non-empty /usr/share/rpiboot/
21 28
22 clean: 29 clean: