Updated to use GNU autoconf/automake.

This commit is contained in:
Jaroslav Kysela 2001-08-20 13:18:40 +00:00
parent 1a7c2fedf5
commit a8d15e1b99
6 changed files with 60 additions and 42 deletions

View file

@ -1,27 +0,0 @@
TOP = .
include $(TOP)/make.conf
CFLAGS = $(COPTS) $(INCLUDES)
LIBS = $(ASOUND)
OBJS = sbiload.o
# Build all the targets.
#
all: $(OBJS)
$(CC) -o sbiload $(CFLAGS) $(OBJS) $(LIBS)
install: all
$(INSTALL) sbiload $(INSTDIR)
# Remove all object files and exectutables
#
clean:
rm -f sbiload $(OBJS) core a.out
# Remove all generated and built files.
#
clobber: clean
sbiload.o : sbiload.c

11
seq/sbiload/Makefile.am Normal file
View file

@ -0,0 +1,11 @@
# # Process this file with automake to produce Makefile.in.
AUTOMAKE_OPTIONS = 1.3 foreign
CFLAGS = -Wall -g
bin_PROGRAMS = sbiload
#man_MANS = sbiload.1
sbiload_SOURCES = sbiload.c
EXTRA_DIST = README COPYING

10
seq/sbiload/configure.in Normal file
View file

@ -0,0 +1,10 @@
AC_INIT(sbiload.c)
AM_INIT_AUTOMAKE(sbiload, 0.3.0)
AC_PROG_CC
AC_PROG_INSTALL
AC_HEADER_STDC
AM_PATH_ALSA(0.9.0)
CFLAGS="$CFLAGS $ALSA_FLAGS"
LDFLAGS="$LDFLAGS $ALSA_LIBS"
AC_OUTPUT(Makefile)

24
seq/sbiload/cvscompile Normal file
View file

@ -0,0 +1,24 @@
#!/bin/bash
if test "x$AUTOMAKE_DIR" = "x"; then
if test -d /usr/local/share/automake; then
AUTOMAKE_DIR=/usr/local/share/automake
fi
if test -d /usr/share/automake; then
AUTOMAKE_DIR="/usr/share/automake"
fi
fi
for f in install-sh mkinstalldirs missing; do
cp -av $AUTOMAKE_DIR/$f .
done
aclocal $ACLOCAL_FLAGS
automake --foreign --add-missing
autoconf
export CFLAGS='-O2 -Wall -pipe -g'
echo "CFLAGS=$CFLAGS"
echo "./configure $@"
./configure $@
unset CFLAGS
make

View file

@ -1,12 +0,0 @@
# Options required by the C compiler
COPTS = -O2 -g
# Path to include files
INCLUDES = -I .
# Options to link with alsa sound library
ASOUND = -lasound
# Installation options
INSTALL = install -s
INSTDIR = /usr/local/bin

View file

@ -81,6 +81,7 @@ static struct option long_opts[] = {
{"opl3", 0, NULL, '4'},
{"list", 0, NULL, 'l'},
{"verbose", HAS_ARG, NULL, 'v'},
{"version", 0, NULL, 'V'},
{0, 0, 0, 0},
};
@ -130,7 +131,7 @@ error_handler (const char *file, int line, const char *function, int err, const
static void
show_list () {
snd_seq_client_info_t *cinfo;
int client, port, err;
int client, err;
snd_lib_error_set_handler (error_handler);
if ((err = snd_seq_open (&seq_handle, "hw", SND_SEQ_OPEN_DUPLEX, 0)) < 0) {
@ -175,6 +176,7 @@ show_usage () {
" -4 - four operators file type (default = two ops)",
" -l - List possible output ports that could be used",
" -v level - Verbose level (default = 0)",
" -V - Show version",
};
for (cpp = msg; cpp < msg + NELEM (msg); cpp++) {
@ -182,6 +184,14 @@ show_usage () {
}
}
/*
* Show version
*/
static void
show_version () {
printf("Version: " VERSION "\n");
}
/*
* Show instrument FM operators
*/
@ -448,8 +458,7 @@ parse_portdesc (char *portdesc) {
char *astr;
char *cp;
int a[ADDR_PARTS];
int count, naddr;
int i;
int count;
if (portdesc == NULL)
return -1;
@ -578,6 +587,9 @@ main (int argc, char **argv) {
case 'v':
verbose = atoi (optarg);
break;
case 'V':
show_version();
exit (1);
case 'l':
show_list ();
exit (0);