add Makefile

trunk
vilmibm 2023-11-04 05:08:46 +00:00
parent 9bb456bc17
commit 4958407856
2 changed files with 60 additions and 0 deletions

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
*.swp *.swp
bin/
cmd/launcher/launcher cmd/launcher/launcher
cmd/request/request cmd/request/request
cmd/contrib/contrib cmd/contrib/contrib

59
Makefile 100644
View File

@ -0,0 +1,59 @@
all: cmds external
external: bin/help bin/welcome bin/signup exthelpers
bin/help: external/cmd/help/main.go bin
go build -o bin/help ./external/cmd/help
bin/welcome: external/cmd/welcome/main.go bin
go build -o bin/welcome ./external/cmd/welcome
bin/signup: external/cmd/signup/main.go bin
go build -o bin/signup ./external/cmd/signup
exthelpers: bin/appendkeyfile bin/createkeyfile bin/emailtouser bin/registeruser
bin/appendkeyfile: external/cmd/helpers/appendkeyfile/main.go bin
go build -o bin/appendkeyfile ./external/cmd/helpers/appendkeyfile
bin/createkeyfile: external/cmd/helpers/createkeyfile/main.go bin
go build -o bin/createkeyfile ./external/cmd/helpers/createkeyfile
bin/emailtouser: external/cmd/helpers/emailtouser/main.go bin
go build -o bin/emailtouser ./external/cmd/helpers/emailtouser
bin/registeruser: external/cmd/helpers/registeruser/main.go bin
go build -o bin/registeruser ./external/cmd/helpers/registeruser
cmds: bin/launcher bin/stats bin/contrib bin/request
bin/launcher: cmd/launcher/main.go bin
go build -o bin/launcher ./cmd/launcher
bin/stats: cmd/stats/main.go bin
go build -o bin/stats ./cmd/stats
bin/contrib: cmd/contrib/main.go bin
go build -o bin/contrib ./cmd/contrib
bin/request: cmd/request/main.go bin
go build -o bin/request ./cmd/request
bin:
mkdir -p bin
install: all
cp bin/launcher /usr/local/bin/town
cp bin/stats /town/bin/
cp bin/contrib /town/bin/
cp bin/request /town/bin/
cp bin/appendkeyfile /town/bin/
cp bin/createkeyfile /town/bin/
cp bin/emailtouser /town/bin/
cp bin/registeruser /town/bin/
cp bin/help /town/bin/external/c
cp bin/welcome /town/bin/external/
cp bin/signup /town/bin/external/
clean:
rm -rf bin