Improve Makefile
This commit is contained in:
		
							parent
							
								
									cbc31b64a8
								
							
						
					
					
						commit
						b865dd251c
					
				
							
								
								
									
										6
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								Makefile
									
									
									
									
									
								
							@ -7,9 +7,12 @@ DESTDIR=
 | 
			
		||||
PREFIX=/usr/local
 | 
			
		||||
BINDIR=$(PREFIX)/bin
 | 
			
		||||
 | 
			
		||||
SRCS=$(shell find . -name '*.go' -or -name '*.mod')
 | 
			
		||||
 | 
			
		||||
all: build/stepd build/step
 | 
			
		||||
 | 
			
		||||
build/%:
 | 
			
		||||
build/%: $(SRCS)
 | 
			
		||||
	mkdir -p build
 | 
			
		||||
	$(GO) build $(GOFLAGS) -o $@ ./cmd/$(shell basename $@)
 | 
			
		||||
 | 
			
		||||
check:
 | 
			
		||||
@ -17,6 +20,7 @@ check:
 | 
			
		||||
 | 
			
		||||
clean:
 | 
			
		||||
	rm -f build/*
 | 
			
		||||
	rmdir build
 | 
			
		||||
 | 
			
		||||
install:
 | 
			
		||||
	install -Dm755 $(BUILDDIR)/stepd $(DESTDIR)$(BINDIR)/stepd
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user