From 7629fd6323fbee456f3cb41a5d8d085bed700544 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Fri, 1 Sep 2000 17:47:30 +0000 Subject: Fix up the Makefile for better portability -Erik --- test/Makefile | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'test/Makefile') 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 " " -- cgit v1.2.3