From 0f4eda33ebfefad6edf75091ea0039b6ea65c15b Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Wed, 25 Aug 2010 11:03:53 +0000 Subject: [PATCH] new base libaudiodriver out of -lcommon in drivers/audio. - this lets the drivers that used that library be compiled easily with different compilers. --- drivers/audio/Makefile | 2 +- drivers/audio/Makefile.inc | 9 ++------- drivers/audio/es1370/es1370.c | 2 +- drivers/audio/es1371/es1371.c | 2 +- drivers/audio/es1371/es1371.h | 2 +- drivers/audio/sb16/sb16.h | 2 +- include/Makefile | 3 ++- {drivers/audio/common => include/minix}/audio_fw.h | 0 {drivers/audio/common => lib/libaudiodriver}/Makefile | 4 +--- {drivers/audio/common => lib/libaudiodriver}/audio_fw.c | 0 .../audio/common => lib/libaudiodriver}/liveupdate.c | 0 share/mk/bsd.prog.mk | 2 +- 12 files changed, 11 insertions(+), 17 deletions(-) rename {drivers/audio/common => include/minix}/audio_fw.h (100%) rename {drivers/audio/common => lib/libaudiodriver}/Makefile (73%) rename {drivers/audio/common => lib/libaudiodriver}/audio_fw.c (100%) rename {drivers/audio/common => lib/libaudiodriver}/liveupdate.c (100%) diff --git a/drivers/audio/Makefile b/drivers/audio/Makefile index 77114cd87..7dcffe42e 100644 --- a/drivers/audio/Makefile +++ b/drivers/audio/Makefile @@ -2,6 +2,6 @@ .include -SUBDIR= common .WAIT es1370 es1371 sb16 +SUBDIR= .WAIT es1370 es1371 sb16 .include diff --git a/drivers/audio/Makefile.inc b/drivers/audio/Makefile.inc index 2da843909..85ebc1bb6 100644 --- a/drivers/audio/Makefile.inc +++ b/drivers/audio/Makefile.inc @@ -1,12 +1,7 @@ .include -LIBCOMMON != cd ${.CURDIR}/../common && ${PRINTOBJDIR} -CPPFLAGS+=-I${.CURDIR}/../common -DPADD+= ${LIBCOMMON}/libcommon.a -LDADD+= -L${LIBCOMMON} -lcommon - -DPADD+= ${LIBDRIVER} ${LIBSYS} -LDADD+= -ldriver -lsys +DPADD+= ${LIBAUDIODRIVER} ${LIBDRIVER} ${LIBSYS} +LDADD+= -laudiodriver -ldriver -lsys .if exists(${.CURDIR}/../../Makefile.inc) .include "${.CURDIR}/../../Makefile.inc" diff --git a/drivers/audio/es1370/es1370.c b/drivers/audio/es1370/es1370.c index 52020f129..8dc6a5f35 100644 --- a/drivers/audio/es1370/es1370.c +++ b/drivers/audio/es1370/es1370.c @@ -17,7 +17,7 @@ #include -#include "audio_fw.h" +#include #include "es1370.h" #include "ak4531.h" #include "pci_helper.h" diff --git a/drivers/audio/es1371/es1371.c b/drivers/audio/es1371/es1371.c index 500bb74c6..deaad9161 100644 --- a/drivers/audio/es1371/es1371.c +++ b/drivers/audio/es1371/es1371.c @@ -22,7 +22,7 @@ #include -#include "audio_fw.h" +#include #include "es1371.h" #include "AC97.h" #include "sample_rate_converter.h" diff --git a/drivers/audio/es1371/es1371.h b/drivers/audio/es1371/es1371.h index 1e3743973..e95ddf216 100644 --- a/drivers/audio/es1371/es1371.h +++ b/drivers/audio/es1371/es1371.h @@ -2,7 +2,7 @@ #define ES1371_H /* best viewed with tabsize=4 */ -#include "audio_fw.h" +#include #include #include #include diff --git a/drivers/audio/sb16/sb16.h b/drivers/audio/sb16/sb16.h index 38b184390..7adbbc5a5 100644 --- a/drivers/audio/sb16/sb16.h +++ b/drivers/audio/sb16/sb16.h @@ -2,7 +2,7 @@ #define SB16_H #include -#include "audio_fw.h" +#include #define AUDIO 0 #define MIXER 1 diff --git a/include/Makefile b/include/Makefile index b68984311..a75437ea8 100644 --- a/include/Makefile +++ b/include/Makefile @@ -25,7 +25,8 @@ INCS+= minix/a.out.h minix/bitmap.h minix/callnr.h minix/cdrom.h \ minix/spin.h minix/sys_config.h minix/sysinfo.h minix/syslib.h \ minix/sysutil.h minix/timers.h minix/tty.h minix/type.h minix/types.h \ minix/u64.h minix/vfsif.h minix/vm.h minix/vtreefs.h \ - minix/compiler.h minix/compiler-ack.h minix/sha2.h minix/sha1.h minix/md5.h + minix/compiler.h minix/compiler-ack.h minix/sha2.h minix/sha1.h minix/md5.h \ + minix/audio_fw.h INCS+= net/hton.h net/if.h net/ioctl.h net/netlib.h INCS+= net/gen/arp_io.h net/gen/dhcp.h net/gen/ether.h \ net/gen/eth_hdr.h net/gen/eth_io.h net/gen/icmp.h \ diff --git a/drivers/audio/common/audio_fw.h b/include/minix/audio_fw.h similarity index 100% rename from drivers/audio/common/audio_fw.h rename to include/minix/audio_fw.h diff --git a/drivers/audio/common/Makefile b/lib/libaudiodriver/Makefile similarity index 73% rename from drivers/audio/common/Makefile rename to lib/libaudiodriver/Makefile index cc3471028..3466d2cb3 100644 --- a/drivers/audio/common/Makefile +++ b/lib/libaudiodriver/Makefile @@ -1,8 +1,6 @@ # Makefile for the common audio framework -LIBISPRIVATE= yes - -LIB= common +LIB= audiodriver SRCS= audio_fw.c liveupdate.c .include diff --git a/drivers/audio/common/audio_fw.c b/lib/libaudiodriver/audio_fw.c similarity index 100% rename from drivers/audio/common/audio_fw.c rename to lib/libaudiodriver/audio_fw.c diff --git a/drivers/audio/common/liveupdate.c b/lib/libaudiodriver/liveupdate.c similarity index 100% rename from drivers/audio/common/liveupdate.c rename to lib/libaudiodriver/liveupdate.c diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk index 407179193..04f8eecca 100644 --- a/share/mk/bsd.prog.mk +++ b/share/mk/bsd.prog.mk @@ -56,7 +56,7 @@ MKDEP_SUFFIXES?= .o .ln # rumpfs_lfs rumpfs_msdosfs rumpfs_nfs rumpfs_ntfs rumpfs_syspuffs \ # rumpfs_tmpfs rumpfs_udf rumpfs_ufs .for _lib in \ - c curses driver netdriver edit end m sys timers util bz2 l hgfs + c curses driver netdriver edit end m sys timers util bz2 l hgfs audiodriver .ifndef LIB${_lib:tu} LIB${_lib:tu}= ${DESTDIR}/usr/lib/lib${_lib}.a .if ${COMPILER_TYPE} == "ack" -- 2.44.0