| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 | # Rules.make for uClibc test apps.## Copyright (C) 2001 by Lineo, inc.###Note: This does not read the top level Rules.mak file#include $(TESTDIR)../Configinclude $(TESTDIR)Config# Use NATIVE_ARCH here since running these test is not# even possible when cross compiling...NATIVE_ARCH:= ${shell uname -m | sed \		-e 's/i.86/i386/' \		-e 's/sparc.*/sparc/' \		-e 's/arm.*/arm/g' \		-e 's/m68k.*/m68k/' \		-e 's/ppc/powerpc/g' \		-e 's/v850.*/v850/g' \		-e 's/sh[234].*/sh/' \		-e 's/mips.*/mips/' \		}ifeq ($(strip $(TARGET_ARCH)),)TARGET_ARCH:=${shell $(CC) -dumpmachine | sed -e s'/-.*//' \		-e 's/i.86/i386/' \		-e 's/sparc.*/sparc/' \		-e 's/arm.*/arm/g' \		-e 's/m68k.*/m68k/' \		-e 's/ppc/powerpc/g' \		-e 's/v850.*/v850/g' \		-e 's/sh[234]/sh/' \		-e 's/mips.*/mips/' \		}endif# If you are running a cross compiler, you may want to set this# to something more interesting...CC = ../$(TESTDIR)extra/gcc-uClibc/$(TARGET_ARCH)-uclibc-gccHOST_CC = gccSTRIPTOOL=stripLDD = ../$(TESTDIR)ldso/util/ldd# Check if 'ls -sh' works or notLSFLAGS = -l# turn all the warnings onWARNINGS=-Wall# use '-Os' optimization if available, else use -O2OPTIMIZATION = ${shell if $(CC) -Os -S -o /dev/null -xc /dev/null >/dev/null 2>&1; \    then echo "-Os"; else echo "-O2" ; fi}ifeq ($(DODEBUG),true)    CFLAGS +=$(WARNINGS) $(OPTIMIZATION) -g    GLIBC_CFLAGS +=$(WARNINGS) $(OPTIMIZATION) -g    LDFLAGS =-Wl,-warn-common    GLIBC_LDFLAGS =-Wl,-warn-common     STRIPTOOL =/bin/true -Since_we_are_debuggingelse    CFLAGS  +=$(WARNINGS) $(OPTIMIZATION) -fomit-frame-pointer    GLIBC_CFLAGS  +=$(WARNINGS) $(OPTIMIZATION) -fomit-frame-pointer    LDFLAGS  =-s -Wl,-warn-common    GLIBC_LDFLAGS  =-s -Wl,-warn-common    STRIP    = $(STRIPTOOL) --remove-section=.note --remove-section=.comment $(PROG)endififneq ($(DODYNAMIC),true)    LDFLAGS +=--static    GLIBC_LDFLAGS +=--staticendifCFLAGS+=--uclibc-use-build-dirLDFLAGS+=--uclibc-use-build-dir
 |