OSDN Git Service

Major facelift on the test area -- the beginnings of some real testing
[uclinux-h8/uClibc.git] / test / ctype / Makefile
1 TOPDIR=../../
2 include $(TOPDIR)Rules.make
3
4 # Check if 'ls -sh' works or not 
5 LSFLAGS = $(shell if ls -sh >/dev/null 2>&1; \
6     then echo "-sh"; else echo "-s" ; fi)
7
8 XCFLAGS = -Wall -Os -fomit-frame-pointer -fno-builtin -nostdinc \
9         -I$(TOPDIR)include -I/usr/include/linux
10 XLDFLAGS = -nostdlib -s -gc-sections
11 EXTRA_LIBS=$(TOPDIR)libc.a
12
13 YCFLAGS = -Wall -Os -fomit-frame-pointer
14 YLDFLAGS = -s --static 
15
16 # Allow alternative stripping tools to be used...
17 ifndef $(STRIPTOOL)
18         STRIPTOOL = strip
19 endif
20 STRIP    = $(STRIPTOOL) --remove-section=.note --remove-section=.comment $@
21
22 TARGETS=ctype ctype_glibc
23
24 all: $(TARGETS)
25
26 ctype: ctype.c ../testsuite.h Makefile $(TOPDIR)libc.a
27         -@ echo "-------"
28         -@ echo " "
29         -@ echo "Testing ctype functions: "
30         -@ echo " "
31         $(CC) $(XCFLAGS) -c $< -o $@.o
32         $(CC) $(XLDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
33         -./$@
34         -@ echo " "
35
36 ctype_glibc: ctype.c ../testsuite.h Makefile $(TOPDIR)libc.a
37         -@ echo "-------"
38         -@ echo " "
39         -@ echo "Testing ctype functions: "
40         -@ echo " "
41         $(CC) $(YCFLAGS) -c $< -o $@.o
42         $(CC) $(YLDFLAGS) --static $@.o -o $@
43         -./$@
44         -./$@
45         -@ echo " "
46
47 clean:
48         rm -f *.[oa] *~ core $(TARGETS)
49
50