OSDN Git Service

2013.10.24
[uclinux-h8/uClinux-dist.git] / lib / libccmalloc / Makefile.in
1 CC=@CC@
2 CFLAGS=@CFLAGS@
3 COMPILERS=@COMPILERS@
4 TARGETS=lib/libccmalloc.a @TARGETS@ bin/ccmalloc
5 PREFIX=@PREFIX@
6
7 #--------------------------------------------------------------------------#
8
9 OBJ=obj/callchain.o obj/hash.o obj/wrapper.o
10
11 #--------------------------------------------------------------------------#
12
13 all: $(TARGETS)
14
15 clean:
16         rm -f obj/*.o lib/*.a bin/* core
17
18 distclean: clean
19         rm -f src/config.h Makefile
20         rm -rf obj lib bin
21         cd test; make clean
22
23 #--------------------------------------------------------------------------#
24 # The library is not inialized statically.  Thus the library may produce
25 # some bogus messages like `free(...) called after reporting'.  However it
26 # should work even if another compiler is used by the user.
27 #
28 lib/libccmalloc.a: $(OBJ)
29         ar rc $@ $(OBJ)
30         ranlib $@
31
32 #--------------------------------------------------------------------------#
33
34 obj/callchain.o: src/config.h src/hash.h src/callchain.c src/ccmalloc.h
35         $(CC) $(CFLAGS) -c -o $@ src/callchain.c
36 obj/hash.o: src/hash.h src/hash.c
37         $(CC) $(CFLAGS) -c -o $@ src/hash.c
38 obj/wrapper.o: src/config.h src/wrapper.c
39         $(CC) $(CFLAGS) -c -o $@ src/wrapper.c
40 bin/ccmalloc: Makefile src/ccmalloc.in
41         rm -f $@
42         sed \
43         -e 's,@''PREFIX@,$(PREFIX),g' \
44         -e 's,@''COMPILERS@,"$(COMPILERS)",g' \
45         -e 's,@''VERSION@,@VERSION@,g' \
46         src/ccmalloc.in > $@
47         chmod 755 $@
48
49 #--------------------------------------------------------------------------#
50
51 .PHONY: all clean distclean install