summaryrefslogtreecommitdiff
path: root/test/Makefile
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2000-09-12 06:04:02 +0000
committerDavid Schleef <ds@schleef.org>2000-09-12 06:04:02 +0000
commit4c89e03a79fe3e845c6c1cd2343a30552cda933f (patch)
treedd02c83aafcffa6bbcc9218e85f83cd9bb141a73 /test/Makefile
parent7629fd6323fbee456f3cb41a5d8d085bed700544 (diff)
test proggy for strtol, strtoul
Diffstat (limited to 'test/Makefile')
-rw-r--r--test/Makefile45
1 files changed, 44 insertions, 1 deletions
diff --git a/test/Makefile b/test/Makefile
index ee3641d30..39c35acb9 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -19,7 +19,9 @@ ifndef $(STRIPTOOL)
endif
STRIP = $(STRIPTOOL) --remove-section=.note --remove-section=.comment $@
-TARGETS=hello_source hello_glibc hello testmalloc_source testmalloc_glibc testmalloc
+TARGETS=hello_source hello_glibc hello
+TARGETS+=testmalloc_source testmalloc_glibc testmalloc
+TARGETS+=teststrtol_source teststrtol_glibc teststrtol teststrtol_diff
all: $(TARGETS)
@@ -90,6 +92,47 @@ testmalloc_glibc: testmalloc.c Makefile $(TOPDIR)libc.a
-./$@
-@ echo " "
+teststrtol_source:
+ -@ echo "-------"
+ -@ echo "teststrtol.c source: "
+ -@ echo " "
+ -@ cat teststrtol.c
+ -@ echo " "
+
+teststrtol: teststrtol.c Makefile $(TOPDIR)libc.a
+ -@ echo "-------"
+ -@ echo " "
+ -@ echo "Compiling vs uC-Libc: "
+ -@ echo " "
+ $(CC) $(XCFLAGS) -c $< -o $@.o
+ $(CC) $(XLDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
+ $(STRIP)
+ ldd $@
+ ls -sh $@
+ -./$@ | tee $@.out
+ -@ echo " "
+
+teststrtol_glibc: teststrtol.c Makefile $(TOPDIR)libc.a
+ -@ echo "-------"
+ -@ echo " "
+ -@ echo "Compiling vs GNU libc: "
+ -@ echo " "
+ $(CC) $(YCFLAGS) -c $< -o $@.o
+ $(CC) $(YLDFLAGS) --static $@.o -o $@
+ $(STRIP)
+ ldd $@
+ ls -sh $@
+ -./$@ | tee $@.out
+ -@ echo " "
+
+teststrtol_diff: teststrtol_glibc teststrtol
+ -@ echo "-------"
+ -@ echo " "
+ -@ echo "Diffing output: "
+ -@ echo " "
+ -diff -u teststrtol_glibc.out teststrtol.out
+ -@ echo " "
+
clean:
rm -f *.[oa] *~ core $(TARGETS)