1 TEVENT_SONAME = libtevent.$(SHLIBEXT).0
2 TEVENT_SOLIB = libtevent.$(SHLIBEXT).$(PACKAGE_VERSION)
3 TEVENT_STLIB = libtevent.a
5 $(TEVENT_STLIB): $(TEVENT_OBJ)
6 ar -rv $(TEVENT_STLIB) $(TEVENT_OBJ)
8 libtevent.$(SHLIBEXT): $(TEVENT_SOLIB)
11 $(TEVENT_SONAME): $(TEVENT_SOLIB)
18 mkdir -p $(DESTDIR)$(includedir)
19 mkdir -p $(DESTDIR)$(libdir)
20 mkdir -p $(DESTDIR)$(libdir)/pkgconfig
22 installheaders:: installdirs
23 cp $(srcdir)/tevent.h $(DESTDIR)$(includedir)
25 installlibs:: installdirs
26 cp tevent.pc $(DESTDIR)$(libdir)/pkgconfig
27 cp $(TEVENT_STLIB) $(TEVENT_SOLIB) $(DESTDIR)$(libdir)
29 install:: all installdirs installheaders installlibs $(PYTHON_INSTALL_TARGET)
32 rm -f $(TEVENT_SONAME) $(TEVENT_SOLIB) $(TEVENT_STLIB) libtevent.$(SHLIBEXT)
34 rm -f tevent.$(SHLIBEXT)
38 check-python:: build-python
39 $(LIB_PATH_VAR)=. PYTHONPATH=".:$(teventdir)" $(PYTHON) $(teventdir)/tests.py
41 build-python:: tevent.$(SHLIBEXT)
43 pytevent.o: $(teventdir)/pytevent.c
44 $(CC) $(PICFLAG) -c $(teventdir)/pytevent.c $(CFLAGS) `$(PYTHON_CONFIG) --cflags`
46 tevent.$(SHLIBEXT): libtevent.$(SHLIBEXT) pytevent.o
47 $(SHLD) $(SHLD_FLAGS) -o $@ pytevent.o -L. -ltevent `$(PYTHON_CONFIG) --libs`
49 install-python:: build-python
50 mkdir -p $(DESTDIR)`$(PYTHON) -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib(0, prefix='$(prefix)')"` \
51 $(DESTDIR)`$(PYTHON) -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib(1, prefix='$(prefix)')"`
52 cp tevent.$(SHLIBEXT) $(DESTDIR)`$(PYTHON) -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib(1, prefix='$(prefix)')"`