2018-01-15 19:24:57 +00:00
|
|
|
ifeq ($(OS),Windows_NT)
|
|
|
|
EXECUTABLE_EXTENSION := .exe
|
|
|
|
else
|
|
|
|
EXECUTABLE_EXTENSION :=
|
|
|
|
endif
|
|
|
|
|
|
|
|
GO_FILES = $(shell find . -type f -name '*.go')
|
|
|
|
|
2017-08-25 16:07:24 +00:00
|
|
|
all: zgrab2
|
2017-08-01 23:13:28 +00:00
|
|
|
|
2018-01-15 19:24:57 +00:00
|
|
|
.PHONY: all clean integration-test integration-test-clean docker-runner container-clean
|
|
|
|
|
|
|
|
zgrab2: $(GO_FILES)
|
|
|
|
cd cmd/zgrab2 && go build && cd ../..
|
|
|
|
rm -f zgrab2
|
|
|
|
ln -s cmd/zgrab2/zgrab2$(EXECUTABLE_EXTENSION) zgrab2
|
|
|
|
|
|
|
|
docker-runner: zgrab2
|
|
|
|
make -C docker-runner
|
|
|
|
|
|
|
|
.integration-test-setup: | docker-runner
|
|
|
|
./integration_tests/setup.sh
|
|
|
|
touch .integration-test-setup
|
|
|
|
|
|
|
|
integration-test: docker-runner .integration-test-setup
|
|
|
|
rm -rf zgrab-output
|
|
|
|
./integration_tests/test.sh
|
|
|
|
|
|
|
|
integration-test-clean:
|
|
|
|
rm -f .integration-test-setup
|
|
|
|
rm -rf zgrab-output
|
|
|
|
./integration_tests/cleanup.sh
|
|
|
|
make -C docker-runner clean
|
2017-08-25 16:07:24 +00:00
|
|
|
|
2018-01-15 19:24:57 +00:00
|
|
|
# This is the target for re-building from source in the container
|
|
|
|
container-clean:
|
|
|
|
rm -f zgrab2
|
|
|
|
cd cmd/zgrab2 && go build && cd ../..
|
|
|
|
ln -s cmd/zgrab2/zgrab2$(EXECUTABLE_EXTENSION) zgrab2
|
2017-08-25 16:07:24 +00:00
|
|
|
|
|
|
|
clean:
|
2018-01-15 19:24:57 +00:00
|
|
|
cd cmd/zgrab2 && go clean
|
|
|
|
rm -f .integration-test-setup
|
|
|
|
rm -f zgrab2
|