citrun

watch C/C++ source code execute
Log | Files | Refs | LICENSE

commit c09f54e8350d3c29252470b0aacca2c6b4cf78ae
parent 1f6d614d472288b5aa3fc6f42efc36e87e7ad9e7
Author: Kyle Milz <milz@imac.0x30.net>
Date:   Wed,  3 Mar 2021 22:05:21 -0800

make: add clean targets

Diffstat:
MMakefile | 22++++++++++++++++++++++
Minst/Makefile | 9++++++++-
Mlib/Makefile | 3+++
3 files changed, 33 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile @@ -7,5 +7,27 @@ SUBDIR += man # SUBDIR += share # SUBDIR += term +#actions TestCoverage +#{ +# set -e +# #CFLAGS="-coverage" LDFLAGS="-coverage" ./configure +# #CFLAGS="--coverage" LDFLAGS="--coverage" jam -j4 +# CXX=/usr/local/bin/clang++ CFLAGS="-fprofile-instr-generate -fcoverage-mapping" LDFLAGS=${CFLAGS} jam -dx +# +#exit 1 +# # Roll libgcov.a into libcitrun.a. +# ar -M < t/libcitrun_gcov.mri + +# prove +# # prove tt + +# mkdir gcov +# # The output from gcov is valuable to save too. +# gcov -o lib lib/lib*.c | tee gcov/SUMMARY +# egcov -r bin/*.cc | tee -a gcov/SUMMARY +# mv *.gcov gcov/ +#} + + .include "Makefile.in" diff --git a/inst/Makefile b/inst/Makefile @@ -1,3 +1,8 @@ +#else if $(OS) = "Linux" { +# INST_EXTRALIB = "-lbsd" ; +# GL_EXTRALIB = "-lbsd" ; +# } + LLVM_CONFIG ?= /usr/local/bin/llvm-config PROG= citrun_inst @@ -33,7 +38,9 @@ SRCS = main.cc \ visitor.cc citrun_inst: ${SRCS:.cc=.o} - c++ $(LDFLAGS) -o $@ $(SRCS:cc=o) $(LDLIBS) + ${CXX} $(LDFLAGS) -o $@ $(SRCS:cc=o) $(LDLIBS) +clean: + rm -f ${PROG} *.o .include "../Makefile.in" diff --git a/lib/Makefile b/lib/Makefile @@ -11,5 +11,8 @@ libcitrun.a: libcitrun.a(citrun.o) libcitrun.a(unix.o) #unix.o: unix.c citrun.h os.h #citrun.o: citrun.c citrun.h os.h +clean: + rm -f *.a *.o + .include "../Makefile.in"