1 # Rules.make for uClibc test apps.
3 # Copyright (C) 2001 by Lineo, inc.
6 #Note: This does not read the top level Rules.mak file
9 include $(TESTDIR)Config
12 NATIVE_ARCH = $(shell uname -m | sed -e 's/i.86/i386/' -e 's/sparc.*/sparc/' \
13 -e 's/arm.*/arm/g' -e 's/m68k.*/m68k/' -e 's/ppc/powerpc/')
15 # If you are running a cross compiler, you may want to set this
16 # to something more interesting...
17 TESTCC = ../$(TESTDIR)extra/gcc-uClibc/$(NATIVE_ARCH)-uclibc-gcc
22 # Check if 'ls -sh' works or not
25 # use '-Os' optimization if available, else use -O2
26 OPTIMIZATION = $(shell if $(CC) -Os -S -o /dev/null -xc /dev/null >/dev/null 2>&1; \
27 then echo "-Os"; else echo "-O2" ; fi)
29 CFLAGS=$(WARNINGS) $(OPTIMIZATION)
31 ifeq ($(DODEBUG),true)
33 LDFLAGS =-Wl,-warn-common
34 STRIPTOOL =/bin/true -Since_we_are_debugging
36 CFLAGS +=-fomit-frame-pointer
37 LDFLAGS =-s -Wl,-warn-common
38 STRIP = $(STRIPTOOL) --remove-section=.note --remove-section=.comment $(PROG)
41 ifneq ($(DODYNAMIC),true)