deadbeef-rating icon indicating copy to clipboard operation
deadbeef-rating copied to clipboard

Makefile instead shell scripts

Open 3ed opened this issue 5 years ago • 0 comments

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.

3ed avatar Jun 01 '20 12:06 3ed