Browse Source

Makefile install

master
Levi Olson 5 years ago
parent
commit
4d17d811fd
2 changed files with 12 additions and 2 deletions
  1. +1
    -1
      .gitignore
  2. +11
    -1
      Makefile

+ 1
- 1
.gitignore View File

@ -1,2 +1,2 @@
editor
led
tmp.txt tmp.txt

+ 11
- 1
Makefile View File

@ -9,7 +9,7 @@ endif
build_and_run: clean build run build_and_run: clean build run
.PHONY : build_and_run build run clean testfile
.PHONY : build_and_run build run clean testfile install
build : build :
@echo "-> Building" @echo "-> Building"
@ -17,6 +17,10 @@ build :
@go build . @go build .
@echo "-> Done" @echo "-> Done"
build_silent :
@cd utils/; go build .; cd ..
@go build .
run : run :
@echo "-> Running" @echo "-> Running"
@./led $(FILE) @./led $(FILE)
@ -25,6 +29,12 @@ clean :
@echo "-> Cleaning up" @echo "-> Cleaning up"
@-rm led @-rm led
install : build_silent
@echo "WOW, you're either brave or very stupid..."
@echo "-> Installing led in /usr/local/bin/led"
@ln -sF $(shell pwd)/led /usr/local/bin/led
@echo "-> Done"
testfile : testfile :
@echo -e "-> Generating test file" @echo -e "-> Generating test file"
@echo -e "This is a line.\nThis is another line.\n\n\nThis is the end." > tmp.txt @echo -e "This is a line.\nThis is another line.\n\n\nThis is the end." > tmp.txt

Loading…
Cancel
Save