From 4d17d811fdfd590b4e51beaae50998d6884a6342 Mon Sep 17 00:00:00 2001 From: Levi Olson Date: Wed, 13 Feb 2019 15:03:08 -0600 Subject: [PATCH] Makefile install --- .gitignore | 2 +- Makefile | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index c2110b0..6774288 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -editor +led tmp.txt diff --git a/Makefile b/Makefile index da9ef60..cd8d33e 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ endif build_and_run: clean build run -.PHONY : build_and_run build run clean testfile +.PHONY : build_and_run build run clean testfile install build : @echo "-> Building" @@ -17,6 +17,10 @@ build : @go build . @echo "-> Done" +build_silent : + @cd utils/; go build .; cd .. + @go build . + run : @echo "-> Running" @./led $(FILE) @@ -25,6 +29,12 @@ clean : @echo "-> Cleaning up" @-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 : @echo -e "-> Generating test file" @echo -e "This is a line.\nThis is another line.\n\n\nThis is the end." > tmp.txt