diff options
| author | EuAndreh <eu@euandre.org> | 2024-08-15 07:24:32 -0300 |
|---|---|---|
| committer | EuAndreh <eu@euandre.org> | 2024-08-15 07:24:32 -0300 |
| commit | 796497de2df717dbc9c75135bb0aafdafc9a807a (patch) | |
| tree | 8e256f03dfbaa5d9e363b6ed3aa7e69e63041ecb /Makefile | |
| parent | Add tests/libbuild.go (diff) | |
| download | gobang-796497de2df717dbc9c75135bb0aafdafc9a807a.tar.gz gobang-796497de2df717dbc9c75135bb0aafdafc9a807a.tar.xz | |
Add src/version.go
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -38,9 +38,11 @@ objects = \ sources = \ src/$(NAME).go \ + src/version.go \ derived-assets = \ + src/version.go \ $(objects) \ tests/main.bin \ tests/libbuild.bin \ @@ -56,22 +58,27 @@ all: $(derived-assets) $(objects): Makefile -src/$(NAME).a: src/$(NAME).go +src/$(NAME).a: src/$(NAME).go src/version.go + go tool compile $(GOCFLAGS) -o $@ -p $(*F) -I $(@D) $*.go src/version.go + tests/main.a: tests/main.go tests/$(NAME).a -src/$(NAME).a tests/main.a: +tests/main.a: go tool compile $(GOCFLAGS) -o $@ -p $(*F) -I $(@D) $*.go tests/libbuild.a: tests/libbuild.go src/$(NAME).a go tool compile $(GOCFLAGS) -o $@ -p main -I src $*.go -tests/$(NAME).a: tests/$(NAME).go src/$(NAME).go - go tool compile $(GOCFLAGS) -o $@ -p $(*F) $*.go src/$(*F).go +tests/$(NAME).a: tests/$(NAME).go src/$(NAME).go src/version.go + go tool compile $(GOCFLAGS) -o $@ -p $(*F) $*.go src/$(*F).go src/version.go tests/libbuild.bin: tests/libbuild.a go tool link $(GOLDFLAGS) -o $@ -L src $*.a tests/main.bin: tests/main.a - go tool link $(GOLDFLAGS) -o $@ -L $(@D) $*.a + go tool link $(GOLDFLAGS) -o $@ -L $(@D) --extldflags '$(LDLIBS)' $*.a + +src/version.go: Makefile + echo 'package $(NAME); var version = "$(VERSION)"' > $@ |
