Makefile 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. CFLAGS = -Xcc -ISources/BoringSSL/include
  2. all:
  3. swift build -v $(CFLAGS)
  4. cp .build/debug/protoc-gen-swift .
  5. cp .build/debug/protoc-gen-swiftgrpc .
  6. project:
  7. swift package generate-xcodeproj
  8. # Optional: set the generated project's indentation settings.
  9. -ruby fix-indentation-settings.rb
  10. test: all
  11. swift test -v $(CFLAGS)
  12. test-echo: all
  13. cp .build/debug/Echo .
  14. ./Echo serve & /bin/echo $$! > echo.pid
  15. ./Echo get | tee test.out
  16. ./Echo expand | tee -a test.out
  17. ./Echo collect | tee -a test.out
  18. ./Echo update | tee -a test.out
  19. kill -9 `cat echo.pid`
  20. diff -u test.out Sources/Examples/Echo/test.gold
  21. test-plugin: all
  22. protoc Sources/Examples/Echo/echo.proto --proto_path=Sources/Examples/Echo --plugin=.build/debug/protoc-gen-swift --plugin=.build/debug/protoc-gen-swiftgrpc --swiftgrpc_out=/tmp --swiftgrpc_opt=TestStubs=true
  23. diff -u /tmp/echo.grpc.swift Sources/Examples/Echo/Generated/echo.grpc.swift
  24. clean:
  25. rm -rf Packages
  26. rm -rf .build
  27. rm -rf SwiftGRPC.xcodeproj
  28. rm -rf Package.pins Package.resolved
  29. rm -rf protoc-gen-swift protoc-gen-swiftgrpc
  30. cd Examples/Echo/PackageManager; make clean
  31. cd Examples/Simple/PackageManager; make clean