2010-08-19 16:00:06 -05:00
|
|
|
# extra includes paths (-I options)
|
2011-04-27 17:25:20 -05:00
|
|
|
INCLUDE = -I../bsd-compat
|
2010-08-19 16:00:06 -05:00
|
|
|
|
|
|
|
# extra libraries paths (-L options)
|
|
|
|
LIB =
|
|
|
|
|
|
|
|
# extra defines (-D options)
|
|
|
|
DEFS = -DDEBUG @defs@
|
|
|
|
|
|
|
|
# extra libraries (-l options)
|
|
|
|
LDADD = @ldadd@
|
|
|
|
|
|
|
|
# extra compiler flags to produce objects for shared library
|
|
|
|
SO_CFLAGS = -fPIC
|
|
|
|
|
|
|
|
# extra compiler flags to produce a shared library with the given name
|
2015-07-15 03:37:46 -05:00
|
|
|
SO_LDFLAGS = -shared -Wl,-soname=libsndio.so.${MAJ}.${MIN}
|
2010-08-19 16:00:06 -05:00
|
|
|
|
|
|
|
# variables defined on configure script command line (if any)
|
|
|
|
@vars@
|
|
|
|
|
|
|
|
#
|
|
|
|
# headers, libraries and man pages installation paths
|
|
|
|
#
|
|
|
|
INCLUDE_DIR = @includedir@
|
|
|
|
LIB_DIR = @libdir@
|
|
|
|
MAN3_DIR = @mandir@/man3
|
|
|
|
MAN7_DIR = @mandir@/man7
|
|
|
|
|
|
|
|
# man3 and man7 pages
|
|
|
|
MAN3 = \
|
|
|
|
sio_open.3 \
|
|
|
|
sio_close.3 sio_setpar.3 sio_getpar.3 sio_getcap.3 \
|
|
|
|
sio_start.3 sio_stop.3 sio_read.3 sio_write.3 sio_onmove.3 \
|
|
|
|
sio_nfds.3 sio_pollfd.3 sio_revents.3 sio_eof.3 \
|
|
|
|
sio_setvol.3 sio_onvol.3 sio_initpar.3 \
|
2014-07-16 05:05:01 -05:00
|
|
|
siomix_open.3 \
|
|
|
|
siomix_close.3 siomix_setctl.3 siomix_ondesc.3 siomix_onctl.3 \
|
|
|
|
siomix_nfds.3 siomix_pollfd.3 siomix_revents.3 siomix_eof.3 \
|
2010-08-19 16:00:06 -05:00
|
|
|
mio_open.3 \
|
|
|
|
mio_close.3 mio_read.3 mio_write.3 mio_nfds.3 mio_pollfd.3 \
|
|
|
|
mio_revents.3 mio_eof.3
|
|
|
|
MAN7 = sndio.7
|
|
|
|
|
|
|
|
#
|
|
|
|
# libraries to build and install
|
|
|
|
#
|
2013-11-26 12:45:01 -06:00
|
|
|
MAJ = 6
|
2015-09-04 10:08:12 -05:00
|
|
|
MIN = 1
|
2010-08-19 16:00:06 -05:00
|
|
|
SO = @so@
|
|
|
|
|
|
|
|
all: ${SO}
|
|
|
|
|
|
|
|
install:
|
|
|
|
mkdir -p ${DESTDIR}${INCLUDE_DIR}
|
|
|
|
mkdir -p ${DESTDIR}${LIB_DIR}
|
|
|
|
mkdir -p ${DESTDIR}${MAN3_DIR}
|
|
|
|
mkdir -p ${DESTDIR}${MAN7_DIR}
|
|
|
|
cp sndio.h ${DESTDIR}${INCLUDE_DIR}
|
|
|
|
cp -R ${SO} ${DESTDIR}${LIB_DIR}
|
|
|
|
cp sio_open.3 ${DESTDIR}${MAN3_DIR}
|
|
|
|
ln -sf sio_open.3 ${DESTDIR}${MAN3_DIR}/sio_close.3
|
|
|
|
ln -sf sio_open.3 ${DESTDIR}${MAN3_DIR}/sio_setpar.3
|
|
|
|
ln -sf sio_open.3 ${DESTDIR}${MAN3_DIR}/sio_getpar.3
|
|
|
|
ln -sf sio_open.3 ${DESTDIR}${MAN3_DIR}/sio_getcap.3
|
|
|
|
ln -sf sio_open.3 ${DESTDIR}${MAN3_DIR}/sio_start.3
|
|
|
|
ln -sf sio_open.3 ${DESTDIR}${MAN3_DIR}/sio_stop.3
|
|
|
|
ln -sf sio_open.3 ${DESTDIR}${MAN3_DIR}/sio_read.3
|
|
|
|
ln -sf sio_open.3 ${DESTDIR}${MAN3_DIR}/sio_write.3
|
|
|
|
ln -sf sio_open.3 ${DESTDIR}${MAN3_DIR}/sio_onmove.3
|
|
|
|
ln -sf sio_open.3 ${DESTDIR}${MAN3_DIR}/sio_nfds.3
|
|
|
|
ln -sf sio_open.3 ${DESTDIR}${MAN3_DIR}/sio_pollfd.3
|
|
|
|
ln -sf sio_open.3 ${DESTDIR}${MAN3_DIR}/sio_revents.3
|
|
|
|
ln -sf sio_open.3 ${DESTDIR}${MAN3_DIR}/sio_eof.3
|
|
|
|
ln -sf sio_open.3 ${DESTDIR}${MAN3_DIR}/sio_setvol.3
|
|
|
|
ln -sf sio_open.3 ${DESTDIR}${MAN3_DIR}/sio_onvol.3
|
|
|
|
ln -sf sio_open.3 ${DESTDIR}${MAN3_DIR}/sio_initpar.3
|
2014-07-16 05:05:01 -05:00
|
|
|
cp siomix_open.3 ${DESTDIR}${MAN3_DIR}
|
|
|
|
ln -sf siomix_open.3 ${DESTDIR}${MAN3_DIR}/siomix_close.3
|
|
|
|
ln -sf siomix_open.3 ${DESTDIR}${MAN3_DIR}/siomix_setctl.3
|
|
|
|
ln -sf siomix_open.3 ${DESTDIR}${MAN3_DIR}/siomix_ondesc.3
|
|
|
|
ln -sf siomix_open.3 ${DESTDIR}${MAN3_DIR}/siomix_onctl.3
|
|
|
|
ln -sf siomix_open.3 ${DESTDIR}${MAN3_DIR}/siomix_nfds.3
|
|
|
|
ln -sf siomix_open.3 ${DESTDIR}${MAN3_DIR}/siomix_pollfd.3
|
|
|
|
ln -sf siomix_open.3 ${DESTDIR}${MAN3_DIR}/siomix_revents.3
|
|
|
|
ln -sf siomix_open.3 ${DESTDIR}${MAN3_DIR}/siomix_eof.3
|
2010-08-19 16:00:06 -05:00
|
|
|
cp mio_open.3 ${DESTDIR}${MAN3_DIR}
|
|
|
|
ln -sf mio_open.3 ${DESTDIR}${MAN3_DIR}/mio_close.3
|
|
|
|
ln -sf mio_open.3 ${DESTDIR}${MAN3_DIR}/mio_read.3
|
|
|
|
ln -sf mio_open.3 ${DESTDIR}${MAN3_DIR}/mio_write.3
|
|
|
|
ln -sf mio_open.3 ${DESTDIR}${MAN3_DIR}/mio_nfds.3
|
|
|
|
ln -sf mio_open.3 ${DESTDIR}${MAN3_DIR}/mio_pollfd.3
|
|
|
|
ln -sf mio_open.3 ${DESTDIR}${MAN3_DIR}/mio_revents.3
|
|
|
|
ln -sf mio_open.3 ${DESTDIR}${MAN3_DIR}/mio_eof.3
|
|
|
|
cp sndio.7 ${DESTDIR}${MAN7_DIR}
|
|
|
|
|
|
|
|
uninstall:
|
|
|
|
rm -f ${DESTDIR}${INCLUDE_DIR}/sndio.h
|
|
|
|
cd ${DESTDIR}${LIB_DIR} && rm -f ${SO}
|
|
|
|
cd ${DESTDIR}${MAN3_DIR} && rm -f ${MAN3}
|
|
|
|
cd ${DESTDIR}${MAN7_DIR} && rm -f ${MAN7}
|
|
|
|
|
|
|
|
clean:
|
2013-11-12 02:51:47 -06:00
|
|
|
rm -f -- *.so *.so.* *.o
|
2010-08-19 16:00:06 -05:00
|
|
|
|
|
|
|
# ---------------------------------------------------------- dependencies ---
|
|
|
|
|
2010-11-10 07:53:44 -06:00
|
|
|
#
|
|
|
|
# object files, sorted following dependencies to allow the
|
|
|
|
# loader to determine dependencies in a single pass
|
|
|
|
#
|
2011-04-16 04:12:41 -05:00
|
|
|
OBJS = debug.o aucat.o \
|
2012-10-26 07:30:48 -05:00
|
|
|
mio.o mio_rmidi.o mio_alsa.o mio_aucat.o \
|
|
|
|
sio.o sio_alsa.o sio_aucat.o sio_sun.o \
|
2014-07-16 05:05:01 -05:00
|
|
|
siomix.o siomix_aucat.o siomix_sun.o \
|
2011-05-06 06:12:01 -05:00
|
|
|
issetugid.o strlcat.o strlcpy.o strtonum.o
|
2010-08-19 16:00:06 -05:00
|
|
|
|
|
|
|
.c.o:
|
2014-05-13 02:38:00 -05:00
|
|
|
${CC} ${CFLAGS} ${SO_CFLAGS} -I. ${INCLUDE} ${DEFS} -o $@ -c $<
|
2010-08-19 16:00:06 -05:00
|
|
|
|
|
|
|
libsndio.so.${MAJ}.${MIN}: ${OBJS}
|
2011-05-06 12:15:16 -05:00
|
|
|
${CC} ${LDFLAGS} ${SO_CFLAGS} ${SO_LDFLAGS} -o libsndio.so.${MAJ}.${MIN} ${OBJS} ${LDADD}
|
2010-08-19 16:00:06 -05:00
|
|
|
|
|
|
|
libsndio.so:
|
2015-07-15 03:37:46 -05:00
|
|
|
ln -sf libsndio.so.${MAJ}.${MIN} libsndio.so
|
2010-08-19 16:00:06 -05:00
|
|
|
|
|
|
|
issetugid.o: ../bsd-compat/issetugid.c
|
|
|
|
${CC} ${CFLAGS} ${SO_CFLAGS} ${INCLUDE} ${DEFS} -c -o issetugid.o ../bsd-compat/issetugid.c
|
|
|
|
|
2011-05-06 05:47:34 -05:00
|
|
|
strlcat.o: ../bsd-compat/strlcat.c
|
|
|
|
${CC} ${CFLAGS} ${SO_CFLAGS} ${INCLUDE} ${DEFS} -c -o strlcat.o ../bsd-compat/strlcat.c
|
|
|
|
|
2011-05-06 05:48:47 -05:00
|
|
|
strlcpy.o: ../bsd-compat/strlcpy.c
|
|
|
|
${CC} ${CFLAGS} ${SO_CFLAGS} ${INCLUDE} ${DEFS} -c -o strlcpy.o ../bsd-compat/strlcpy.c
|
|
|
|
|
2010-08-19 16:00:06 -05:00
|
|
|
strtonum.o: ../bsd-compat/strtonum.c
|
|
|
|
${CC} ${CFLAGS} ${SO_CFLAGS} ${INCLUDE} ${DEFS} -c -o strtonum.o ../bsd-compat/strtonum.c
|
|
|
|
|
2011-04-27 17:25:20 -05:00
|
|
|
aucat.o: aucat.c aucat.h amsg.h debug.h \
|
2011-04-16 04:12:41 -05:00
|
|
|
../bsd-compat/bsd-compat.h
|
|
|
|
debug.o: debug.c debug.h ../bsd-compat/bsd-compat.h
|
|
|
|
mio.o: mio.c debug.h mio_priv.h sndio.h \
|
2011-04-12 02:37:02 -05:00
|
|
|
../bsd-compat/bsd-compat.h
|
2012-10-26 07:30:48 -05:00
|
|
|
mio_alsa.o: mio_alsa.c debug.h mio_priv.h sndio.h
|
2011-04-27 17:25:20 -05:00
|
|
|
mio_aucat.o: mio_aucat.c aucat.h amsg.h debug.h mio_priv.h sndio.h \
|
|
|
|
../bsd-compat/bsd-compat.h
|
2011-04-16 04:12:41 -05:00
|
|
|
mio_rmidi.o: mio_rmidi.c debug.h mio_priv.h sndio.h
|
|
|
|
sio.o: sio.c debug.h sio_priv.h sndio.h \
|
|
|
|
../bsd-compat/bsd-compat.h
|
2012-10-26 07:30:48 -05:00
|
|
|
sio_alsa.o: sio_alsa.c debug.h sio_priv.h sndio.h \
|
|
|
|
../bsd-compat/bsd-compat.h
|
2011-04-27 17:25:20 -05:00
|
|
|
sio_aucat.o: sio_aucat.c aucat.h amsg.h debug.h sio_priv.h sndio.h \
|
|
|
|
../bsd-compat/bsd-compat.h
|
2012-10-26 07:30:48 -05:00
|
|
|
sio_sun.o: sio_sun.c debug.h sio_priv.h sndio.h \
|
|
|
|
../bsd-compat/bsd-compat.h
|
2014-07-16 05:05:01 -05:00
|
|
|
siomix.o: siomix.c debug.h siomix_priv.h
|
|
|
|
siomix_aucat.o: siomix_aucat.c debug.h aucat.h amsg.h siomix_priv.h
|
|
|
|
siomix_sun.o: siomix_sun.c debug.h amsg.h siomix_priv.h
|