|
|
|
.PHONY: all check clean distclean doc install install-headers regressions uninstall
|
|
|
|
|
|
|
|
CFLAGS=@CFLAGS@
|
|
|
|
VERSION=@VERSION@
|
|
|
|
VERSION_MAJOR=@VERSION_MAJOR@
|
|
|
|
PREFIX=@PREFIX@
|
|
|
|
LIBRARY=@LIBRARY@
|
|
|
|
HEADERS=@HEADERS@
|
|
|
|
PKGCONFIG_DATA=@LIBRARY@/pkgconfig
|
|
|
|
DISTDIR=.spool
|
|
|
|
DISTFILE=$(DISTDIR)/ck-$(VERSION).tar.gz
|
|
|
|
|
|
|
|
all: doc
|
|
|
|
$(MAKE) -C src all || exit
|
|
|
|
@echo
|
|
|
|
@echo
|
|
|
|
@echo ---[ Concurrency Kit has built successfully. You may now \"make install\".
|
|
|
|
|
|
|
|
doc:
|
|
|
|
$(MAKE) -C doc all || exit
|
|
|
|
@echo ---[ Manual pages are ready for installation.
|
|
|
|
|
|
|
|
regressions:
|
|
|
|
$(MAKE) -C regressions all || exit
|
|
|
|
@echo ---[ Regressions have built successfully.
|
|
|
|
|
|
|
|
check: regressions
|
|
|
|
@echo ---[ Executing unit tests...
|
|
|
|
$(MAKE) -C regressions check
|
|
|
|
@echo ---[ Unit tests have completed successfully.
|
|
|
|
|
|
|
|
install-headers:
|
|
|
|
mkdir -p $(DESTDIR)/$(HEADERS) || exit
|
|
|
|
cp include/*.h $(DESTDIR)/$(HEADERS) || exit
|
|
|
|
chmod 644 $(DESTDIR)/$(HEADERS)/ck_*.h || exit
|
|
|
|
mkdir -p $(DESTDIR)$(HEADERS)/gcc || exit
|
|
|
|
cp -r include/gcc/* $(DESTDIR)/$(HEADERS)/gcc || exit
|
|
|
|
chmod 755 $(DESTDIR)/$(HEADERS)/gcc
|
|
|
|
chmod 644 $(DESTDIR)/$(HEADERS)/gcc/ck_*.h $(DESTDIR)/$(HEADERS)/gcc/*/ck_*.h || exit
|
|
|
|
|
|
|
|
install: all install-headers
|
|
|
|
$(MAKE) -C doc install
|
|
|
|
mkdir -p $(DESTDIR)/$(LIBRARY) || exit
|
|
|
|
cp src/libck.so $(DESTDIR)/$(LIBRARY)/libck.so.$(VERSION) || exit
|
|
|
|
ln -s libck.so.$(VERSION) $(DESTDIR)/$(LIBRARY)/libck.so
|
|
|
|
ln -s libck.so.$(VERSION) $(DESTDIR)/$(LIBRARY)/libck.so.$(VERSION_MAJOR)
|
|
|
|
chmod 744 $(DESTDIR)/$(LIBRARY)/libck.so* || exit
|
|
|
|
mkdir -p $(DESTDIR)/$(PKGCONFIG_DATA) || exit
|
|
|
|
chmod 755 $(DESTDIR)/$(PKGCONFIG_DATA)
|
|
|
|
cp build/ck.pc $(DESTDIR)/$(PKGCONFIG_DATA)/ck.pc || exit
|
|
|
|
cp src/libck.a $(DESTDIR)/$(LIBRARY)/libck.a || exit
|
|
|
|
chmod 644 $(DESTDIR)/$(LIBRARY)/libck.a || exit
|
|
|
|
@echo
|
|
|
|
@echo
|
|
|
|
@echo ---[ Concurrency Kit has installed successfully.
|
|
|
|
|
|
|
|
uninstall:
|
|
|
|
$(MAKE) -C doc uninstall
|
|
|
|
rm -f $(DESTDIR)/$(LIBRARY)/libck.so*
|
|
|
|
rm -f $(DESTDIR)/$(LIBRARY)/libck.a
|
|
|
|
rm -f $(DESTDIR)/$(HEADERS)/ck_*.h
|
|
|
|
rm -f $(DESTDIR)/$(HEADERS)/gcc/ck_*.h
|
|
|
|
rm -f $(DESTDIR)/$(HEADERS)/gcc/*/ck_*.h
|
|
|
|
rm -f $(DESTDIR)/$(PKGCONFIG_DATA)/ck.pc
|
|
|
|
|
|
|
|
clean:
|
|
|
|
$(MAKE) -C doc clean
|
|
|
|
$(MAKE) -C src clean
|
|
|
|
$(MAKE) -C regressions clean
|
|
|
|
rm -f *~ *.o *.tar.gz
|
|
|
|
|
|
|
|
distclean: clean
|
|
|
|
rm -f include/ck_md.h
|
|
|
|
rm -f build/regressions.build
|
|
|
|
rm -f build/ck.build
|
|
|
|
rm -f build/ck.pc
|
|
|
|
rm -f Makefile
|
|
|
|
rm -f doc/Makefile
|
|
|
|
|