2009-01-03 12:41:17 +03:00
TEVENT_SOBASE = libtevent.$( SHLIBEXT)
TEVENT_SONAME = $( TEVENT_SOBASE) .0
TEVENT_SOLIB = $( TEVENT_SOBASE) .$( PACKAGE_VERSION)
2008-12-23 21:39:52 +03:00
TEVENT_STLIB = libtevent.a
2008-06-14 19:23:31 +04:00
2008-12-23 21:39:52 +03:00
$(TEVENT_STLIB) : $( TEVENT_OBJ )
ar -rv $( TEVENT_STLIB) $( TEVENT_OBJ)
2008-06-14 19:23:31 +04:00
2009-01-03 12:41:17 +03:00
$(TEVENT_SOBASE) : $( TEVENT_SOLIB )
2008-06-14 19:23:31 +04:00
ln -fs $< $@
2008-12-20 21:23:30 +03:00
$(TEVENT_SONAME) : $( TEVENT_SOLIB )
2008-06-14 19:23:31 +04:00
ln -fs $< $@
2008-04-25 01:28:30 +04:00
dirs ::
@mkdir -p lib
2008-06-14 19:23:31 +04:00
installdirs ::
mkdir -p $( DESTDIR) $( includedir)
mkdir -p $( DESTDIR) $( libdir)
mkdir -p $( DESTDIR) $( libdir) /pkgconfig
installheaders :: installdirs
2008-12-20 21:23:30 +03:00
cp $( srcdir) /tevent.h $( DESTDIR) $( includedir)
2008-06-14 19:23:31 +04:00
installlibs :: installdirs
2008-12-20 21:23:30 +03:00
cp tevent.pc $( DESTDIR) $( libdir) /pkgconfig
2008-12-23 21:39:52 +03:00
cp $( TEVENT_STLIB) $( TEVENT_SOLIB) $( DESTDIR) $( libdir)
2008-04-25 01:28:30 +04:00
2008-06-14 19:23:31 +04:00
install :: all installdirs installheaders installlibs $( PYTHON_INSTALL_TARGET )
2008-04-25 01:28:30 +04:00
clean ::
2009-01-03 12:41:17 +03:00
rm -f $( TEVENT_SOBASE) $( TEVENT_SONAME) $( TEVENT_SOLIB) $( TEVENT_STLIB)
2008-12-20 21:23:30 +03:00
rm -f tevent.pc
2008-12-23 21:39:52 +03:00
rm -f tevent.$( SHLIBEXT)
2008-06-14 19:23:31 +04:00
#python stuff
check-python :: build -python
2008-12-20 21:23:30 +03:00
$( LIB_PATH_VAR) = . PYTHONPATH = " .: $( teventdir) " $( PYTHON) $( teventdir) /tests.py
2008-06-14 19:23:31 +04:00
2008-12-20 21:54:13 +03:00
build-python :: tevent .$( SHLIBEXT )
2008-04-25 01:28:30 +04:00
2008-12-20 21:54:13 +03:00
pytevent.o : $( teventdir ) /pytevent .c
$( CC) $( PICFLAG) -c $( teventdir) /pytevent.c $( CFLAGS) ` $( PYTHON_CONFIG) --cflags`
2008-04-25 01:28:30 +04:00
2009-01-03 12:41:17 +03:00
tevent.$(SHLIBEXT) : $( TEVENT_SOBASE ) $( TEVENT_SONAME ) pytevent .o
2008-12-20 21:54:13 +03:00
$( SHLD) $( SHLD_FLAGS) -o $@ pytevent.o -L. -ltevent ` $( PYTHON_CONFIG) --libs`
2008-04-25 01:28:30 +04:00
install-python :: build -python
mkdir -p $( DESTDIR) ` $( PYTHON) -c " import distutils.sysconfig; print distutils.sysconfig.get_python_lib(0, prefix=' $( prefix) ') " ` \
$( DESTDIR) ` $( PYTHON) -c " import distutils.sysconfig; print distutils.sysconfig.get_python_lib(1, prefix=' $( prefix) ') " `
2008-12-23 01:55:01 +03:00
cp tevent.$( SHLIBEXT) $( DESTDIR) ` $( PYTHON) -c " import distutils.sysconfig; print distutils.sysconfig.get_python_lib(1, prefix=' $( prefix) ') " `
2008-04-25 01:28:30 +04:00