+++ /dev/null
-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
--- /dev/null
+# # 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
--- /dev/null
+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)
--- /dev/null
+#!/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
+++ /dev/null
-# 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
{"opl3", 0, NULL, '4'},
{"list", 0, NULL, 'l'},
{"verbose", HAS_ARG, NULL, 'v'},
+ {"version", 0, NULL, 'V'},
{0, 0, 0, 0},
};
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) {
" -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++) {
}
}
+/*
+ * Show version
+ */
+static void
+show_version () {
+ printf("Version: " VERSION "\n");
+}
+
/*
* Show instrument FM operators
*/
char *astr;
char *cp;
int a[ADDR_PARTS];
- int count, naddr;
- int i;
+ int count;
if (portdesc == NULL)
return -1;
case 'v':
verbose = atoi (optarg);
break;
+ case 'V':
+ show_version();
+ exit (1);
case 'l':
show_list ();
exit (0);