Check if the AR environment variable exists for cross compilation
[lttng-ust.git] / doc / examples / hello-static-lib / Makefile
index c5fdd31c4638f466c551d2347054dd92511e8e89..8f094e0e70e5fff33ff29458136bd6dc0aaea794 100644 (file)
@@ -18,6 +18,7 @@ LOCAL_CPPFLAGS += -I.
 LIBS = -ldl -llttng-ust        # On Linux
 #LIBS = -lc -llttng-ust        # On BSD
 AM_V_P := :
+AR ?= ar
 
 all: hello
 
@@ -28,7 +29,7 @@ lttng-ust-provider-hello.o: tp.c ust_tests_hello.h
 
 lttng-ust-provider-hello.a: lttng-ust-provider-hello.o
        @if $(AM_V_P); then set -x; else echo "  AR       $@"; fi; \
-               ar -rc $@ lttng-ust-provider-hello.o
+               $(AR) -rc $@ lttng-ust-provider-hello.o
 
 hello.o: hello.c
        @if $(AM_V_P); then set -x; else echo "  CC       $@"; fi; \
This page took 0.023993 seconds and 4 git commands to generate.