diff options
-rw-r--r-- | Makefile | 32 |
1 files changed, 18 insertions, 14 deletions
@@ -53,13 +53,7 @@ cgo.c = \ cgo.o = $(cgo.c:.c=.o) -sources = \ - src/$(NAME).go \ - src/version.go \ - - -derived-assets = \ - src/version.go \ +objects = \ src/_cgo_.o \ $(cgo.go) \ $(cgo.c) \ @@ -67,12 +61,21 @@ derived-assets = \ src/$(NAME).a \ tests/$(NAME).a \ tests/main.a \ - tests/main.bin \ $(functional-tests.a) \ - $(functional-tests.bin) \ $(fuzz-targets.a) \ - $(fuzz-targets.bin) \ $(benchmarks.a) \ + +sources = \ + src/$(NAME).go \ + src/version.go \ + + +derived-assets = \ + src/version.go \ + $(objects) \ + tests/main.bin \ + $(functional-tests.bin) \ + $(fuzz-targets.bin) \ $(benchmarks.bin) \ side-assets = \ @@ -87,7 +90,7 @@ side-assets = \ all: $(derived-assets) -$(derived-assets): Makefile deps.mk +$(objects): Makefile deps.mk $(cgo.go) $(cgo.c) $(cgo.o): src/_cgo_.o @@ -118,13 +121,13 @@ src/version.go: Makefile echo 'package $(NAME); const Version = "$(VERSION)"' > $@ $(functional-tests.a) $(benchmarks.a): - go tool compile $(GOCFLAGS) -o $@ -p main -I src $*.go + go tool compile $(GOCFLAGS) -o $@ -p main -I src $*.go $(fuzz-targets.a): - go tool compile -d=libfuzzer $(GOCFLAGS) -o $@ -p main -I src $*.go + go tool compile -d=libfuzzer $(GOCFLAGS) -o $@ -p main -I src $*.go $(functional-tests.bin) $(fuzz-targets.bin) $(benchmarks.bin): - go tool link $(GOLDFLAGS) -o $@ -L src --extldflags '$(LDLIBS)' $*.a + go tool link $(GOLDFLAGS) -o $@ -L src --extldflags '$(LDLIBS)' $*.a @@ -204,4 +207,5 @@ uninstall: '$(DESTDIR)$(SRCDIR)' \ + ALWAYS: |