Always compile in the speaker code. There's little savings by

omitting it, and other platforms may implement /dev/speaker in the
future.
This commit is contained in:
imp 2010-02-04 07:08:06 +00:00
parent 655cacab1f
commit 205d2929b8
2 changed files with 3 additions and 4 deletions

View File

@ -4,8 +4,4 @@
PROG= morse
MAN= morse.6
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64"
CFLAGS += -DSPEAKER=\"/dev/speaker\"
.endif
.include <bsd.prog.mk>

View File

@ -63,6 +63,9 @@ static const char rcsid[] =
#include <termios.h>
#include <unistd.h>
/* Always use the speaker, let the open fail if -p is selected */
#define SPEAKER "/dev/speaker"
#ifdef SPEAKER
#include <dev/speaker/speaker.h>
#endif