mirror of
				https://github.com/ClusterCockpit/cc-metric-collector.git
				synced 2025-10-31 00:55:06 +01:00 
			
		
		
		
	* Add sink directly using libganglia.so * Remove unneeded confuse header * add submodule init to build action * add submodule init to runonce action * add installation og ganglia to runonce * add installation of ganglia to runonce * add installation of ganglia to runonce * libconfuse not required * Remove ganglia submodule * Remove ganglia.h * Add Makefile to help creating the libganglia.so link * Fix cgo header * Rename new Ganglia sink to 'libgangliaSink' * Add documentation for libgangliaSink * Extend make buildsystem with find&symlink helper for libgangliaSink * Add metric renaming function * Add build tag 'ganglia' and create corresponding files
		
			
				
	
	
		
			54 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Makefile
		
	
	
	
	
	
			
		
		
	
	
			54 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Makefile
		
	
	
	
	
	
| APP = cc-metric-collector
 | |
| GOSRC_APP        := metric-collector.go
 | |
| GOSRC_COLLECTORS := $(wildcard collectors/*.go)
 | |
| GOSRC_SINKS      := $(wildcard sinks/*.go)
 | |
| GOSRC_RECEIVERS  := $(wildcard receivers/*.go)
 | |
| GOSRC_INTERNAL   := $(wildcard internal/*/*.go)
 | |
| GOSRC            := $(GOSRC_APP) $(GOSRC_COLLECTORS) $(GOSRC_SINKS) $(GOSRC_RECEIVERS) $(GOSRC_INTERNAL)
 | |
| COMPONENT_DIRS   := collectors \
 | |
| 			sinks \
 | |
| 			receivers \
 | |
| 			internal/metricRouter \
 | |
| 			internal/ccMetric \
 | |
| 			internal/metricAggregator \
 | |
| 			internal/ccLogger \
 | |
| 			internal/ccTopology \
 | |
| 			internal/multiChanTicker
 | |
| 
 | |
| 
 | |
| .PHONY: all
 | |
| all: $(APP)
 | |
| 
 | |
| $(APP): $(GOSRC)
 | |
| 	make -C collectors
 | |
| 	make -C sinks
 | |
| 	go get
 | |
| 	go build -o $(APP) $(GOSRC_APP)
 | |
| 
 | |
| .PHONY: clean
 | |
| clean:
 | |
| 	@for COMP in $(COMPONENT_DIRS); do if [ -e $$COMP/Makefile ]; then make -C $$COMP clean; fi; done
 | |
| 	rm -f $(APP)
 | |
| 
 | |
| .PHONY: fmt
 | |
| fmt:
 | |
| 	go fmt $(GOSRC_COLLECTORS)
 | |
| 	go fmt $(GOSRC_SINKS)
 | |
| 	go fmt $(GOSRC_RECEIVERS)
 | |
| 	go fmt $(GOSRC_APP)
 | |
| 	@for F in $(GOSRC_INTERNAL); do go fmt $$F; done
 | |
| 
 | |
| 
 | |
| # Examine Go source code and reports suspicious constructs
 | |
| .PHONY: vet
 | |
| vet:
 | |
| 	go vet ./...
 | |
| 
 | |
| 
 | |
| # Run linter for the Go programming language.
 | |
| # Using static analysis, it finds bugs and performance issues, offers simplifications, and enforces style rules
 | |
| .PHONY: staticcheck
 | |
| staticcheck:
 | |
| 	go install honnef.co/go/tools/cmd/staticcheck@latest
 | |
| 	$$(go env GOPATH)/bin/staticcheck ./...
 |