Add cross compile support.
[freerunner-navigation-board:bmp085.git] / userspace / Makefile
1 CC=$(CROSS_COMPILE)gcc
2 AR=$(CROSS_COMPILE)ar
3
4 ALL: libbmp085.so libbmp085.a
5
6 libbmp085.so: bmp085.o
7         $(CC) -shared -Wl,-soname,libbmp085.so -o libbmp085.so bmp085.o
8
9 libbmp085.a: bmp085.o
10         $(AR) rcs libbmp085.a bmp085.o
11
12 bmp085.o: bmp085.c
13         $(CC) -c -fPIC -o bmp085.o bmp085.c
14
15 clean:
16         rm *.o
17         rm *.so
18         rm *.a