Initial commit.
[b43-tools.git] / assembler / bcm43xx-asm
1 #!/bin/sh
2
3 installed=0
4
5 if [ -z "$BCM43xx_ASM" ]; then
6         if [ $installed -eq 0 ] && [ -x "./bcm43xx-asm.bin" ]; then
7                 BCM43xx_ASM="./bcm43xx-asm.bin"
8         else
9                 BCM43xx_ASM="bcm43xx-asm.bin"
10         fi
11 fi
12
13 if [ -z "$CPP" ]; then
14         CPP="cpp"
15 fi
16
17 if [ $# -lt 2 ]; then
18         $BCM43xx_ASM --help
19         exit 1
20 fi
21
22 infile="$1"
23 shift
24 outfile="$1"
25 shift
26
27 cat "$infile" | $CPP -traditional-cpp | $BCM43xx_ASM "-" "$outfile" $@