summaryrefslogtreecommitdiff
path: root/test/malloc/Makefile
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-08-14 02:38:04 +0000
committerEric Andersen <andersen@codepoet.org>2002-08-14 02:38:04 +0000
commit8c2c5e549eec9eec63c85e2d21a53a71a369e557 (patch)
treea6f09ae74a425d493fbab0d4e453da7db956c9ab /test/malloc/Makefile
parent8966b4965d7d6ae29d957950d064382c79669246 (diff)
Move all malloc tests under test/malloc/
Diffstat (limited to 'test/malloc/Makefile')
-rw-r--r--test/malloc/Makefile62
1 files changed, 62 insertions, 0 deletions
diff --git a/test/malloc/Makefile b/test/malloc/Makefile
index b1f61cdc9..aaa2976d6 100644
--- a/test/malloc/Makefile
+++ b/test/malloc/Makefile
@@ -21,6 +21,8 @@ include $(TESTDIR)/Rules.mak
TARGETS=malloc
+TARGETS+=testmalloc testmalloc_glibc
+TARGETS+=mallocbug mallocbug_glibc
all: $(TARGETS)
malloc: malloc.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(CC)
@@ -34,6 +36,66 @@ malloc: malloc.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(CC)
-./$@
-@ echo " "
+testmalloc_source:
+ -@ echo "-------"
+ -@ echo "testmalloc.c source: "
+ -@ echo " "
+ -@ cat testmalloc.c
+ -@ echo " "
+
+testmalloc: testmalloc.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(CC)
+ -@ echo "-------"
+ -@ echo " "
+ -@ echo "Compiling vs uClibc: "
+ -@ echo " "
+ $(CC) $(CFLAGS) -c $< -o $@.o
+ $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
+ $(STRIPTOOL) -x -R .note -R .comment $@
+ -$(LDD) $@
+ ls -l $@
+ -./$@
+ -@ echo " "
+
+testmalloc_glibc: testmalloc.c Makefile
+ -@ echo "-------"
+ -@ echo " "
+ -@ echo "Compiling vs GNU libc: "
+ -@ echo " "
+ $(HOST_CC) $(GLIBC_CFLAGS) -c $< -o $@.o
+ $(HOST_CC) $(GLIBC_LDFLAGS) $@.o -o $@
+ $(STRIPTOOL) -x -R .note -R .comment $@
+ -$(LDD) $@
+ ls -l $@
+ -./$@
+ -@ echo " "
+
+mallocbug: mallocbug.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(CC)
+ -@ echo "-------"
+ -@ echo " "
+ -@ echo "Compiling vs uClibc: "
+ -@ echo " "
+ $(CC) $(CFLAGS) -c $< -o $@.o
+ $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
+ $(STRIPTOOL) -x -R .note -R .comment $@
+ -$(LDD) $@
+ ls -l $@
+ -./$@
+ -@ echo " "
+
+mallocbug_glibc: mallocbug.c Makefile
+ -@ echo "-------"
+ -@ echo " "
+ -@ echo "Compiling vs GNU libc: "
+ -@ echo " "
+ $(HOST_CC) $(GLIBC_CFLAGS) -c $< -o $@.o
+ $(HOST_CC) $(GLIBC_LDFLAGS) $@.o -o $@
+ $(STRIPTOOL) -x -R .note -R .comment $@
+ -$(LDD) $@
+ ls -l $@
+ -./$@
+ -@ echo " "
+
+
clean:
rm -f *.[oa] *~ core $(TARGETS)