summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2000-09-01 17:47:30 +0000
committerEric Andersen <andersen@codepoet.org>2000-09-01 17:47:30 +0000
commit7629fd6323fbee456f3cb41a5d8d085bed700544 (patch)
treefee4dc4787fadcbdcb9b947ee07a9f0cea0bd7ca
parentc526f7d42d3ddf36aec20b1747ddcd8c40c23cb7 (diff)
Fix up the Makefile for better portability
-Erik
-rw-r--r--test/Makefile19
1 files changed, 11 insertions, 8 deletions
diff --git a/test/Makefile b/test/Makefile
index 916fd7e16..ee3641d30 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -1,6 +1,9 @@
TOPDIR=../
include $(TOPDIR)Rules.make
+# Check if 'ls -sh' works or not
+LSFLAGS = $(shell if ls -sh >/dev/null 2>&1; \
+ then echo "-sh"; else echo "-s" ; fi)
XCFLAGS = -Wall -Os -fomit-frame-pointer -fno-builtin -nostdinc \
-I$(TOPDIR)include -I/usr/include/linux
@@ -36,8 +39,8 @@ hello: hello.c Makefile $(TOPDIR)libc.a
$(CC) $(XCFLAGS) -c $< -o $@.o
$(CC) $(XLDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
$(STRIP)
- ldd $@
- ls -sh $@
+ -ldd $@
+ ls $(LSFLAGS) $@
-./$@
-@ echo " "
@@ -49,8 +52,8 @@ hello_glibc: hello.c Makefile $(TOPDIR)libc.a
$(CC) $(YCFLAGS) -c $< -o $@.o
$(CC) $(YLDFLAGS) --static $@.o -o $@
$(STRIP)
- ldd $@
- ls -sh $@
+ -ldd $@
+ ls $(LSFLAGS) $@
-./$@
-@ echo " "
@@ -69,8 +72,8 @@ testmalloc: testmalloc.c Makefile $(TOPDIR)libc.a
$(CC) $(XCFLAGS) -c $< -o $@.o
$(CC) $(XLDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
$(STRIP)
- ldd $@
- ls -sh $@
+ -ldd $@
+ ls $(LSFLAGS) $@
-./$@
-@ echo " "
@@ -82,8 +85,8 @@ testmalloc_glibc: testmalloc.c Makefile $(TOPDIR)libc.a
$(CC) $(YCFLAGS) -c $< -o $@.o
$(CC) $(YLDFLAGS) --static $@.o -o $@
$(STRIP)
- ldd $@
- ls -sh $@
+ -ldd $@
+ ls $(LSFLAGS) $@
-./$@
-@ echo " "