ccache - Unix

This is a discussion on ccache - Unix ; how can i use ccache to MAKE my code? my make file looks like: FC=~/gfortran/bin/gfortran CC=gcc irun:$(oall) $(FC) $(FFLAG) $(oall) -o irun cptimer.o:lib/cptimer.c $(CC) $(CFLAG) -c lib/cptimer.c bit.o:bit.c $(CC) -c $(CFLAG) bit.c main.o : main.f90 $(FC) $(FFLAG) -c main.f90 now ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: ccache

  1. ccache

    how can i use ccache to MAKE my code?
    my make file looks like:

    FC=~/gfortran/bin/gfortran
    CC=gcc
    irun:$(oall)
    $(FC) $(FFLAG) $(oall) -o irun
    cptimer.o:lib/cptimer.c
    $(CC) $(CFLAG) -c lib/cptimer.c
    bit.o:bit.c
    $(CC) -c $(CFLAG) bit.c
    main.o : main.f90
    $(FC) $(FFLAG) -c main.f90

    now when I do make clean;make, how can i know if it is using ccache or
    not? if it is not, how can i force compiler to use ccache?

  2. Re: ccache

    rudra wrote:
    > how can i use ccache to MAKE my code?
    > my make file looks like:


    > FC=~/gfortran/bin/gfortran
    > CC=gcc
    > irun:$(oall)
    > $(FC) $(FFLAG) $(oall) -o irun
    > cptimer.o:lib/cptimer.c
    > $(CC) $(CFLAG) -c lib/cptimer.c
    > bit.o:bit.c
    > $(CC) -c $(CFLAG) bit.c
    > main.o : main.f90
    > $(FC) $(FFLAG) -c main.f90


    > now when I do make clean;make, how can i know if it is using ccache or
    > not? if it is not, how can i force compiler to use ccache?


    Since 'ccache' is never appears in the Makefile why do you expect
    it to be used at all? If I am not mistaken you would need to change

    > CC=gcc


    to

    CC = ccache gcc

    to enable the use of ccache first.

    Regards, Jens
    --
    \ Jens Thoms Toerring ___ jt@toerring.de
    \__________________________ http://toerring.de

+ Reply to Thread