Makefile 724 B

12345678910111213141516171819202122232425262728293031
  1. FILTER=
  2. PARAMS=
  3. ifeq ($(debug),1)
  4. PARAMS+=debug=1
  5. endif
  6. ifdef pid
  7. ifneq ($(pid),0)
  8. PARAMS+=pid=$(pid)
  9. FILTER=FILTER_PID=${pid}
  10. endif
  11. endif
  12. ifeq ($(send),1)
  13. FILTER+= SEND=1
  14. endif
  15. all: c-build go-build
  16. build:
  17. CGO_ENABLED=1 go build -gcflags="all=-N -l" -buildvcs=false -o euspace
  18. c:
  19. docker exec -it 62d0676aa0b7 sh -c 'cd /opt/github/euspace/ebpftracer && make all ${PARAMS}'
  20. c-build: c
  21. go-build:
  22. docker exec -it 62d0676aa0b7 bash -c 'cd /opt/github/euspace && source ~/.g/env && make build'
  23. go: go-build run
  24. run:
  25. ssh [email protected] 'cd /opt/github/euspace && CONFIG_ENDPOINT=10.0.16.250:18080 && TRACES_ENDPOINT=http://10.0.16.250:18080/docp/api/v2/data/receive ${FILTER} ./euspace --listen="0.0.0.0:8123"'