4 TARGETS=lib/libccmalloc.a @TARGETS@ bin/ccmalloc
7 #--------------------------------------------------------------------------#
9 OBJ=obj/callchain.o obj/hash.o obj/wrapper.o
11 #--------------------------------------------------------------------------#
16 rm -f obj/*.o lib/*.a bin/* core
19 rm -f src/config.h Makefile
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.
28 lib/libccmalloc.a: $(OBJ)
32 #--------------------------------------------------------------------------#
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
43 -e 's,@''PREFIX@,$(PREFIX),g' \
44 -e 's,@''COMPILERS@,"$(COMPILERS)",g' \
45 -e 's,@''VERSION@,@VERSION@,g' \
49 #--------------------------------------------------------------------------#
51 .PHONY: all clean distclean install