|
|
@ -26,6 +26,8 @@ ifeq ($(PREFIX),)
|
|
|
|
PREFIX := /usr/local
|
|
|
|
PREFIX := /usr/local
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
INCLUDE_PREFIX := $(PROJECT)/
|
|
|
|
|
|
|
|
|
|
|
|
# Default archivers
|
|
|
|
# Default archivers
|
|
|
|
AR?=ar
|
|
|
|
AR?=ar
|
|
|
|
RANLIB?=ranlib
|
|
|
|
RANLIB?=ranlib
|
|
|
@ -343,12 +345,13 @@ install:
|
|
|
|
install -s -m 755 lib$(PROJECT).so.$(VERSION) $(DESTDIR)$(PREFIX)/lib/
|
|
|
|
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) $(DESTDIR)$(PREFIX)/lib/lib$(PROJECT).so.$(VERSION_MAJOR)
|
|
|
|
ln -sf lib$(PROJECT).so.$(VERSION_MAJOR) $(DESTDIR)$(PREFIX)/lib/lib$(PROJECT).so
|
|
|
|
ln -sf lib$(PROJECT).so.$(VERSION_MAJOR) $(DESTDIR)$(PREFIX)/lib/lib$(PROJECT).so
|
|
|
|
install -d $(DESTDIR)$(PREFIX)/include/$(PROJECT)/
|
|
|
|
install -d $(DESTDIR)$(PREFIX)/include/$(INCLUDE_PREFIX)
|
|
|
|
install -m 644 $(wildcard $(INCLUDE)/*.*) $(DESTDIR)$(PREFIX)/include/$(PROJECT)/
|
|
|
|
install -m 644 $(wildcard $(INCLUDE)/*.*) $(DESTDIR)$(PREFIX)/include/$(INCLUDE_PREFIX)
|
|
|
|
uninstall:
|
|
|
|
uninstall:
|
|
|
|
-rm $(DESTDIR)$(PREFIX)/lib/lib$(PROJECT).{a,so{,.*}}
|
|
|
|
-rm $(DESTDIR)$(PREFIX)/lib/lib$(PROJECT).{a,so{,.*}}
|
|
|
|
cd $(INCLUDE) && find . -type f | xargs -I {} rm "$(DESTDIR)$(PREFIX)/include/$(PROJECT)/{}"
|
|
|
|
cd $(INCLUDE) && find . -type f | xargs -I {} rm "$(DESTDIR)$(PREFIX)/include/$(INCLUDE_PREFIX){}"
|
|
|
|
rmdir $(DESTDIR)$(PREFIX)/include/$(PROJECT)
|
|
|
|
[[ -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`
|
|
|
|
#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++
|
|
|
|
$(PROJECT)-test: LDFLAGS+= -lfmt -lstdc++
|
|
|
|