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 # turn all the warnings on
28 # use '-Os' optimization if available, else use -O2
29 OPTIMIZATION = $(shell if $(CC) -Os -S -o /dev/null -xc /dev/null >/dev/null 2>&1; \
30 then echo "-Os"; else echo "-O2" ; fi)
32 CFLAGS=$(WARNINGS) $(OPTIMIZATION)
34 ifeq ($(DODEBUG),true)
36 LDFLAGS =-Wl,-warn-common
37 STRIPTOOL =/bin/true -Since_we_are_debugging
39 CFLAGS +=-fomit-frame-pointer
40 LDFLAGS =-s -Wl,-warn-common
41 STRIP = $(STRIPTOOL) --remove-section=.note --remove-section=.comment $(PROG)
44 ifneq ($(DODYNAMIC),true)