Commit 47ef6cd1 authored by Ophélie Gagnard's avatar Ophélie Gagnard Committed by Ophélie Gagnard

Standardize the installation process in order to ease the installation with...

Standardize the installation process in order to ease the installation with buildout, and with OBS in particular.
parent c7d2c48b
ifeq ($(PREFIX),)
PREFIX=/opt/fluentbit-plugin-wendelin
endif
.PHONY: all
all: build
build:
go build -v -buildmode=c-shared -o build/libfluentbit_wendelin.so src/fluentbit_wendelin.go
.PHONY: install
install: fluentbit_wendelin_output
install: all
install -d $(DESTDIR)$(PREFIX)/lib/
install -d $(DESTDIR)$(PREFIX)/include/
cp build/libfluentbit_wendelin.so $(DESTDIR)$(PREFIX)/lib/
cp build/libfluentbit_wendelin.h $(DESTDIR)$(PREFIX)/include/
.PHONY: uninstall
uninstall:
rm -f $(DESTDIR)$(PREFIX)/lib/libfluentbit_wendelin.so
rm -f $(DESTDIR)$(PREFIX)/include/libfluentbit_wendelin.h
.PHONY: clean
clean:
rm -f libfluentbit_wendelin.so libfluentbit_wendelin.h
rm -rf build/
.PHONY: fluentbit_wendelin_output
fluentbit_wendelin_output:
go build -buildmode=c-shared -o libfluentbit_wendelin.so plugin/fluentbit_wendelin.go
# export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)
.PHONY: test
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment