chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Incremental build, tricks or tips anyone?


From: Jim Ursetto
Subject: Re: [Chicken-users] Incremental build, tricks or tips anyone?
Date: Sun, 5 Sep 2010 23:52:52 -0500

Matthew,
Would it be possible for you to use the make macro that is built into setup-api 
(and therefore chicken-install), along with 'csc -t' for example to do the 
translation from .c to .o, rather than manually invoking gcc? csc can also be 
called in a separate step to link your object files together.  And you should 
be able to obtain the names of your source files via scheme calls.
Jim

On Sep 5, 2010, at 16:52, Matthew Welland <address@hidden> wrote:

> I am updating some old code and the build broke because chicken-config no 
> longer exists.  It took a while but I finally found that all I had to do was 
> replace chicken-config with csc. I.e. "csc -cflags" in place of 
> "chicken-config 
> -cflags".
> 
> My question is, does anyone have a nicer way of doing this? I sometimes work 
> on very weak machines such as single board computers and really appreciate 
> build times of seconds instead of minutes when only one file has changed. 
> 
> src_code  := laedlib tc_laedlib re-route 
> scm_files := $(addprefix ../scm/,$(addsuffix .scm,$(src_code)))
> c_files   := $(addprefix src/,$(addsuffix .c,$(src_code)))
> o_files   := $(addprefix src/,$(addsuffix .o,$(src_code)))
> 
> $(c_files): src/%.c: ../scm/%.scm ../scm/macros.scm
>       chicken $< -output-file $@
> 
> $(o_files): src/%.o: src/%.c
>       gcc -c $< `chicken-config -cflags` -o $@
> 
> $(src_code): %: src/%.o src/laedlib.o
>       gcc src/$*.o src/laedlib.o -o $* `chicken-config -libs`
> 
> _______________________________________________
> Chicken-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/chicken-users



reply via email to

[Prev in Thread] Current Thread [Next in Thread]