Commit 3840f3b8b92f48a360b70f48a2bb24aa16879163

Authored by Tim Gover
Committed by GitHub
2 parents 8b1ccc1b 9a4887e9

Merge pull request #86 from cpb-/feature/add-install-target-in-makefile

Fix `install` and `uninstall` targets in Makefile.
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 10 bin2c: bin2c.c
11 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 21 uninstall:
14 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 27 rmdir --ignore-fail-on-non-empty /usr/share/rpiboot/
21 28  
22 29 clean:
... ...