summaryrefslogtreecommitdiff
path: root/test/misc/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'test/misc/Makefile')
-rw-r--r--test/misc/Makefile88
1 files changed, 86 insertions, 2 deletions
diff --git a/test/misc/Makefile b/test/misc/Makefile
index ae49a865a..d94e48747 100644
--- a/test/misc/Makefile
+++ b/test/misc/Makefile
@@ -19,7 +19,9 @@
TESTDIR=../
include $(TESTDIR)/Rules.mak
-TARGETS=sem outb
+CFLAGS64=-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
+
+TARGETS=sem fdopen dirent_diff dirent64_diff #outb
all: $(TARGETS)
outb: outb.c ../testsuite.h Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(CC)
@@ -44,7 +46,89 @@ sem: sem.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(CC)
-./$@
-@ echo " "
+fdopen: fdopen.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 $@
+ -./$@
+ -@ echo " "
+
+dirent_source:
+ -@ rm -f $(TARGETS)
+ -@ echo "-------"
+ -@ echo "dirent.c source: "
+ -@ echo " "
+ -@ cat dirent.c
+ -@ echo " "
+
+dirent: dirent.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 $@
+ -./$@ dirent.c > $@.out
+ -@ echo " "
+
+dirent_glibc: dirent.c Makefile
+ -@ echo "-------"
+ -@ echo " "
+ -@ echo "Compiling vs GNU libc: "
+ -@ echo " "
+ $(HOSTCC) $(GLIBC_CFLAGS) -c $< -o $@.o
+ $(HOSTCC) $(GLIBC_LDFLAGS) $@.o -o $@
+ $(STRIPTOOL) -x -R .note -R .comment $@
+ -./$@ dirent.c > $@.out
+ -@ echo " "
+
+dirent_diff: dirent dirent_glibc
+ -@ echo "-------"
+ -@ echo " "
+ -@ echo "Diffing dirent output: "
+ -@ echo " "
+ -diff -u dirent_glibc.out dirent.out
+ -@ echo " "
+
+dirent64: dirent.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(CC)
+ -@ echo "-------"
+ -@ echo " "
+ -@ echo "Compiling vs uClibc: "
+ -@ echo " "
+ $(CC) $(CFLAGS) $(CFLAGS64) -c $< -o $@.o
+ $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
+ $(STRIPTOOL) -x -R .note -R .comment $@
+ -./$@ dirent.c > $@.out
+ -@ echo " "
+
+dirent64_glibc: dirent.c Makefile
+ -@ echo "-------"
+ -@ echo " "
+ -@ echo "Compiling vs GNU libc: "
+ -@ echo " "
+ $(HOSTCC) $(GLIBC_CFLAGS) $(CFLAGS64) -c $< -o $@.o
+ $(HOSTCC) $(GLIBC_LDFLAGS) $@.o -o $@
+ $(STRIPTOOL) -x -R .note -R .comment $@
+ -./$@ dirent.c > $@.out
+ -@ echo " "
+
+dirent64_diff: dirent64 dirent64_glibc
+ -@ echo "-------"
+ -@ echo " "
+ -@ echo "Diffing dirent64 output: "
+ -@ echo " "
+ -diff -u dirent64_glibc.out dirent64.out
+ -@ echo " "
+
clean:
- rm -f *.[oa] *~ core $(TARGETS)
+ rm -f *.[oa] *~ core dirent dirent_glibc dirent_glibc.out dirent.out \
+ dirent64 dirent64_glibc dirent64_glibc.out dirent64.out \
+ outb sem fdopen
+