DESTDIR= PREFIX=/usr libpkgdir=$(PREFIX)/lib/deadbeef GLIB_CXX_FLAGS=-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include GLIB_LD_FLAGS=-lglib-2.0 all: alarm.so alarm.so: gcc -c -fPIC -I/usr/include $(GLIB_CXX_FLAGS) -Wall alarm.cc gcc -shared -fPIC -Wall -o alarm.so -lpthread $(GLIB_LD_FLAGS) alarm.o clean: rm -f alarm.o alarm.so install: mkdir -p $(DESTDIR)$(libpkgdir) install -m 0755 alarm.so $(DESTDIR)$(libpkgdir)/alarm.so