Rename bcm43xx -> b43
[b43-tools.git] / assembler / b43-asm
diff --git a/assembler/b43-asm b/assembler/b43-asm
new file mode 100755 (executable)
index 0000000..ec6fa6e
--- /dev/null
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+installed=0
+
+if [ -z "$B43_ASM" ]; then
+       if [ $installed -eq 0 ] && [ -x "./b43-asm.bin" ]; then
+               B43_ASM="./b43-asm.bin"
+       else
+               B43_ASM="b43-asm.bin"
+       fi
+fi
+
+if [ -z "$CPP" ]; then
+       CPP="cpp"
+fi
+
+if [ $# -lt 2 ]; then
+       $B43_ASM --help
+       exit 1
+fi
+
+infile="$1"
+shift
+outfile="$1"
+shift
+
+cat "$infile" | $CPP -traditional-cpp | $B43_ASM "-" "$outfile" $@