[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] [PATCH] build actrl



On 08/10/2014 21:09, Vincent Rivière wrote:
Here is a patch to compile audiodev.xdd for ColdFire.

And here is a further patch to allow building the actrl tool using "make actrl".

Alan, please commit!

actrl.patch
New actrl target. Contributed by Vincent Rivière.

--
Vincent Rivière
diff -aurN -x CVS freemint-CVS-20141002.orig/sys/xdd/audio/Makefile freemint-CVS-20141002/sys/xdd/audio/Makefile
--- freemint-CVS-20141002.orig/sys/xdd/audio/Makefile	2014-10-08 21:54:46.109375000 +0200
+++ freemint-CVS-20141002/sys/xdd/audio/Makefile	2014-10-08 21:31:17.687500000 +0200
@@ -16,7 +16,7 @@
 include $(top_srcdir)/RULES
 include $(top_srcdir)/PHONY
 
-all-here: $(TARGET)
+all-here: $(TARGET) actrl
 
 # default overwrites
 INCLUDES = -I$(top_srcdir)
@@ -33,5 +33,7 @@
 $(TARGET): $(OBJS) $(LIBKERNTARGET)
 	$(LD) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
 
+actrl:
+	$(CC) $(MODEL) $(OPTS) $(WARN) actrl.c -o $@
 
 include $(top_srcdir)/DEPENDENCIES
diff -aurN -x CVS freemint-CVS-20141002.orig/sys/xdd/audio/actrl.c freemint-CVS-20141002/sys/xdd/audio/actrl.c
--- freemint-CVS-20141002.orig/sys/xdd/audio/actrl.c	2014-10-02 23:09:13.000000000 +0200
+++ freemint-CVS-20141002/sys/xdd/audio/actrl.c	2014-10-08 21:37:33.359375000 +0200
@@ -15,15 +15,16 @@
 # include <errno.h>
 # include <unistd.h>
 # include <fcntl.h>
-# include <ioctl.h>
+# include <sys/ioctl.h>
+# include "../../mint/ioctl.h"
 
  
-char *loptarg;
+static char *loptarg;
 
-int
+static int
 lgetopt (int argc, char *argv[], const char *opts)
 {
-	static char sp = 1;
+	static int sp = 1;
 	const char *op, *lop;
 	int i, olen;
 
@@ -73,7 +74,7 @@
 	return 0;
 }
 
-void
+static void
 usage (void)
 {
 	fprintf (stderr,