1 TEVENT_SONAME = libtevent.$(SHLIBEXT).0
2 TEVENT_SOLIB = libtevent.$(SHLIBEXT).$(PACKAGE_VERSION)
4 libtevent.a: $(TEVENT_OBJ)
5 ar -rv libtevent.a $(TEVENT_OBJ)
7 libtevent.$(SHLIBEXT): $(TEVENT_SOLIB)
10 $(TEVENT_SONAME): $(TEVENT_SOLIB)
17 mkdir -p $(DESTDIR)$(includedir)
18 mkdir -p $(DESTDIR)$(libdir)
19 mkdir -p $(DESTDIR)$(libdir)/pkgconfig
21 installheaders:: installdirs
22 cp $(srcdir)/tevent.h $(DESTDIR)$(includedir)
24 installlibs:: installdirs
25 cp tevent.pc $(DESTDIR)$(libdir)/pkgconfig
26 cp libtevent.a $(TEVENT_SOLIB) $(DESTDIR)$(libdir)
28 install:: all installdirs installheaders installlibs $(PYTHON_INSTALL_TARGET)
31 rm -f $(TEVENT_SONAME) $(TEVENT_SOLIB) libtevent.a libtevent.$(SHLIBEXT)
33 rm -f _libtevent.$(SHLIBEXT)
37 check-python:: build-python
38 $(LIB_PATH_VAR)=. PYTHONPATH=".:$(teventdir)" $(PYTHON) $(teventdir)/tests.py
40 build-python:: tevent.$(SHLIBEXT)
42 pytevent.o: $(teventdir)/pytevent.c
43 $(CC) $(PICFLAG) -c $(teventdir)/pytevent.c $(CFLAGS) `$(PYTHON_CONFIG) --cflags`
45 tevent.$(SHLIBEXT): libtevent.$(SHLIBEXT) pytevent.o
46 $(SHLD) $(SHLD_FLAGS) -o $@ pytevent.o -L. -ltevent `$(PYTHON_CONFIG) --libs`
48 install-python:: build-python
49 mkdir -p $(DESTDIR)`$(PYTHON) -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib(0, prefix='$(prefix)')"` \
50 $(DESTDIR)`$(PYTHON) -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib(1, prefix='$(prefix)')"`
51 cp $(teventdir)/events.py $(DESTDIR)`$(PYTHON) -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib(0, prefix='$(prefix)')"`
52 cp _libevents.$(SHLIBEXT) $(DESTDIR)`$(PYTHON) -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib(1, prefix='$(prefix)')"`