summaryrefslogtreecommitdiff
path: root/test/unistd/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'test/unistd/Makefile')
-rw-r--r--test/unistd/Makefile16
1 files changed, 15 insertions, 1 deletions
diff --git a/test/unistd/Makefile b/test/unistd/Makefile
index 251f4c78e..360392612 100644
--- a/test/unistd/Makefile
+++ b/test/unistd/Makefile
@@ -21,7 +21,7 @@ include $(TESTDIR)/Rules.mak
-TARGETS=fork fork_glibc vfork vfork_glibc getcwd
+TARGETS=fork fork_glibc vfork vfork_glibc getcwd getopt getopt_long
all: $(TARGETS)
getcwd: getcwd.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(CC)
@@ -79,6 +79,20 @@ vfork_glibc: vfork.c ../testsuite.h Makefile
-./$@
-@ echo " "
+getopt: getopt.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(CC)
+ $(CC) $(CFLAGS) -c $< -o $@.o
+ $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
+ $(STRIPTOOL) -x -R .note -R .comment $@
+ ./$@ -abcXXX -9
+ -@ echo " "
+
+getopt_long: getopt_long.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(CC)
+ $(CC) $(CFLAGS) -c $< -o $@.o
+ $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
+ $(STRIPTOOL) -x -R .note -R .comment $@
+ ./$@ --add XXX --delete YYY --verbose
+ -@ echo " "
+
clean:
rm -f *.[oa] *~ core $(TARGETS)