diff --git a/Makefile b/Makefile index c3a3845..2baeeb1 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,11 @@ -SRC=./cmd -BINARY=imgcat -BINARY_SRC=$(SRC)/imgcat -SOURCES=$(shell find $(BINARY_SRC) -name "*.go") - .DEFAULT_GOAL := all -$(BINARY): $(SOURCES) - go build $(BINARY_SRC) +imgcat: main.go + go build -o $@ -all: $(BINARY) test +build: imgcat + +all: build test test: - ./$(BINARY) -u "https://images.pexels.com/photos/2558605/pexels-photo-2558605.jpeg?cs=srgb&dl=pexels-anel-rossouw-2558605.jpg&fm=jpg" -r 25 + ./imgcat -u "https://images.pexels.com/photos/2558605/pexels-photo-2558605.jpeg?cs=srgb&dl=pexels-anel-rossouw-2558605.jpg&fm=jpg" -r 25 diff --git a/README.md b/README.md index 8b91fba..3fdade6 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ make Or directly ``` -go build ./cmd/imgcat +go build -o imgcat ``` ## Usage diff --git a/cmd/imgcat/main.go b/main.go similarity index 100% rename from cmd/imgcat/main.go rename to main.go