]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Makefile fixes:
authorJulian Seward <jseward@acm.org>
Thu, 15 Sep 2005 16:00:58 +0000 (16:00 +0000)
committerJulian Seward <jseward@acm.org>
Thu, 15 Sep 2005 16:00:58 +0000 (16:00 +0000)
- Fix default compiler better
- Add dummy install target to help V's build system
- Don't hardwire 'ar' (fix for #112199).

git-svn-id: svn://svn.valgrind.org/vex/trunk@1397

VEX/Makefile

index 5be717519f3448b30e7c6a266c63ea8ffe71362a..4e664d777bc79f2bff56a7c9c2aea4195166de00 100644 (file)
@@ -63,9 +63,13 @@ PUB_INCLUDES = -Ipub
 PRIV_INCLUDES = -Ipriv
 
 
-ifeq ($(CC),) 
+ifndef $(CC)
    CC = gcc 
 endif 
+ifndef $(AR)
+   AR = ar 
+endif
+
 CCFLAGS = -g -O -Wall -Wmissing-prototypes -Wshadow -Winline \
                -Wpointer-arith -Wbad-function-cast -Wcast-qual \
                -Wcast-align -Wmissing-declarations \
@@ -85,6 +89,9 @@ CCFLAGS = -g -O -Wall -Wmissing-prototypes -Wshadow -Winline \
 
 all: vex
 
+# Empty, needed for Valgrind
+install:
+
 scratch: clean version all
 
 vex: libvex.a test_main.o
@@ -92,7 +99,7 @@ vex: libvex.a test_main.o
 
 libvex.a: $(LIB_OBJS)
        rm -f libvex.a
-       ar clq libvex.a $(LIB_OBJS)
+       $(AR) clq libvex.a $(LIB_OBJS)
 
 # This doesn't get rid of priv/main/vex_svnversion.h, because
 # that can't be regenerated in the final Valgrind tarball, and