|
|
|
@ -26,6 +26,8 @@ ifeq ($(PREFIX),)
|
|
|
|
|
PREFIX := /usr/local
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
INCLUDE_PREFIX := $(PROJECT)/
|
|
|
|
|
|
|
|
|
|
# Default archivers
|
|
|
|
|
AR?=ar
|
|
|
|
|
RANLIB?=ranlib
|
|
|
|
@ -343,12 +345,13 @@ install:
|
|
|
|
|
install -s -m 755 lib$(PROJECT).so.$(VERSION) $(DESTDIR)$(PREFIX)/lib/
|
|
|
|
|
ln -sf lib$(PROJECT).so.$(VERSION) $(DESTDIR)$(PREFIX)/lib/lib$(PROJECT).so.$(VERSION_MAJOR)
|
|
|
|
|
ln -sf lib$(PROJECT).so.$(VERSION_MAJOR) $(DESTDIR)$(PREFIX)/lib/lib$(PROJECT).so
|
|
|
|
|
install -d $(DESTDIR)$(PREFIX)/include/$(PROJECT)/
|
|
|
|
|
install -m 644 $(wildcard $(INCLUDE)/*.*) $(DESTDIR)$(PREFIX)/include/$(PROJECT)/
|
|
|
|
|
install -d $(DESTDIR)$(PREFIX)/include/$(INCLUDE_PREFIX)
|
|
|
|
|
install -m 644 $(wildcard $(INCLUDE)/*.*) $(DESTDIR)$(PREFIX)/include/$(INCLUDE_PREFIX)
|
|
|
|
|
uninstall:
|
|
|
|
|
-rm $(DESTDIR)$(PREFIX)/lib/lib$(PROJECT).{a,so{,.*}}
|
|
|
|
|
cd $(INCLUDE) && find . -type f | xargs -I {} rm "$(DESTDIR)$(PREFIX)/include/$(PROJECT)/{}"
|
|
|
|
|
rmdir $(DESTDIR)$(PREFIX)/include/$(PROJECT)
|
|
|
|
|
cd $(INCLUDE) && find . -type f | xargs -I {} rm "$(DESTDIR)$(PREFIX)/include/$(INCLUDE_PREFIX){}"
|
|
|
|
|
[[ -d "$(DESTDIR)$(PREFIX)/include/$(INCLUDE_PREFIX)" ]] && \
|
|
|
|
|
rmdir $(DESTDIR)$(PREFIX)/include/$(INCLUDE_PREFIX) || :
|
|
|
|
|
|
|
|
|
|
#TODO: We can make the target between `{debug,release}{.a,.so}` configurable by call. e.g. `TARGET=release.a make test`
|
|
|
|
|
$(PROJECT)-test: LDFLAGS+= -lfmt -lstdc++
|
|
|
|
|