deadbeef-rating
deadbeef-rating copied to clipboard
Makefile instead shell scripts
This method respect CFLAGS variable and is easier to use. Add this Makefile to root dir of project:
CFLAGS_EXTRA ?= -Wall -fPIC -std=c99 -shared -O2 -I/usr/include/deadbeef
PREFIX ?= $(HOME)/.local
LIBDIR ?= /lib/deadbeef
build:
$(CC) $(CFLAGS) $(CFLAGS_EXTRA) rating.c -o rating.so
clean:
test -f rating.so && rm rating.so || true
install:
install -d "$(DESTDIR)$(PREFIX)$(LIBDIR)"
install "rating.so" "$(DESTDIR)$(PREFIX)$(LIBDIR)/rating.so"
uninstall:
rm "$(DESTDIR)$(PREFIX)$(LIBDIR)/rating.so"
To do local instalation:
make
make install
To do system/global instalation:
make
make install PREFIX=/usr
To uninstall replace install with uninstall.