2008-06-14 19:23:31 +04:00
EVENTS_SONAME = libevents.$( SHLIBEXT) .0
EVENTS_SOLIB = libevents.$( SHLIBEXT) .$( PACKAGE_VERSION)
libevents.a : $( EVENTS_OBJ )
ar -rv libevents.a $( EVENTS_OBJ)
2008-09-19 23:20:47 +04:00
libevents.$(SHLIBEXT) : $( EVENTS_SOLIB )
2008-06-14 19:23:31 +04:00
ln -fs $< $@
$(EVENTS_SONAME) : $( EVENTS_SOLIB )
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
cp $( srcdir) /events.h $( DESTDIR) $( includedir)
installlibs :: installdirs
cp events.pc $( DESTDIR) $( libdir) /pkgconfig
2008-09-19 23:20:47 +04:00
cp libevents.a $( EVENTS_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 ::
2008-06-14 19:23:31 +04:00
rm -f $( EVENTS_SONAME) $( EVENTS_SOLIB) libevents.a libevents.$( SHLIBEXT)
2008-04-25 01:28:30 +04:00
rm -f events.pc
2008-06-14 19:23:31 +04:00
rm -f _libevents.$( SHLIBEXT)
#python stuff
check-python :: build -python
$( LIB_PATH_VAR) = . PYTHONPATH = " .: $( eventsdir) " $( PYTHON) $( eventsdir) /python/tests/simple.py
install-swig ::
mkdir -p $( DESTDIR) ` $( SWIG) -swiglib`
cp events.i $( DESTDIR) ` $( SWIG) -swiglib`
2008-04-25 01:28:30 +04:00
build-python :: _libevents .$( SHLIBEXT )
events_wrap.o : $( eventsdir ) /events_wrap .c
$( CC) $( PICFLAG) -c $( eventsdir) /events_wrap.c $( CFLAGS) ` $( PYTHON_CONFIG) --cflags`
_libevents.$(SHLIBEXT) : libevents .$( SHLIBEXT ) events_wrap .o
$( SHLD) $( SHLD_FLAGS) -o $@ events_wrap.o -L. -levents ` $( PYTHON_CONFIG) --libs`
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) ') " `
cp $( eventsdir) /events.py $( DESTDIR) ` $( PYTHON) -c " import distutils.sysconfig; print distutils.sysconfig.get_python_lib(0, prefix=' $( prefix) ') " `
cp _libevents.$( SHLIBEXT) $( DESTDIR) ` $( PYTHON) -c " import distutils.sysconfig; print distutils.sysconfig.get_python_lib(1, prefix=' $( prefix) ') " `