[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: nasm support?
From: |
Timothee Besset |
Subject: |
Re: nasm support? |
Date: |
Sat, 15 Sep 2001 13:30:22 +0200 |
I would rather avoid having to modify cons to get what I want in there. Or
at least apply very minimal changes.
I think I have a beginning of solution so far:
$env_nasm = new cons(
CC => 'nasm',
CFLAGS => '',
CCCOM => '%CC -f elf -o %> %<'
);
And then I use something like:
Library $env_nasm 'asmlib', 'ftol.c', 'snapvector.c';
ftol.c snapvector.c ARE actually my .nasm files I had to rename, my
current problem is that I can't get cons to execute the CCCOM command on
files with the .nasm suffix.
I tried adding '.nasm' => 'build::command::cc', in the SUFMAP definition
in cons, I tried putting it in the cons object declaration too:
$env_nasm = new cons(
CC => 'nasm',
CFLAGS => '',
CCCOM => '%CC -f elf -o %> %<',
SUFMAP => { '.nasm' => 'build::command::cc' }
);
but that doesn't seem to work, I'm getting:
"don't know how to construct .../ftol.o from .../ftol.nasm"
any ideas?
TTimo
On Wed, 12 Sep 2001 09:07:23 -0400
"Gary Oberbrunner" <address@hidden> wrote:
> What I would do (don't know if this is "right" or not...) is define a
> CompileNASM method (call it what you want), and then you can swap out
the
> implementation of that however you like. I.e. in your Conscripts you'll
> have
> $env->CompileNASM(@nasm_files);
> (or however they work -- maybe you need to specify destinations, or
maybe it
> returns objects, or whatever.)
>
> Then you can write
> sub cons::CompileNASM
> {
> my $env = shift;
> my @nasmfiles = @_;
> foreach my $f (@nasmfiles) {
> $env->Command(....);
> }
> }
>
> So that later if there's a more automatic way to do it with Objects,
> Program, Library or whatever, you can just swap out this implementation.
>
> I know you'd like to avoid this step, but AFAIK it can't be done yet.
The
> refactoring currently being discussed should be able to handle this
easily
> though.
>
> -- Gary Oberbrunner
>
> > -----Original Message-----
> > From: address@hidden
[mailto:address@hidden
> > Behalf Of Timothee Besset
> > Sent: Wednesday, September 12, 2001 5:56 AM
> > To: address@hidden
> > Subject: nasm support?
> >
> >
> > I am starting to convert some more projects to use cons after
> > the great experience I've had with it on GtkRadiant build
> > system. I have a bunch of .nasm files in this new project. I
> > think that my first approach will be to hardcode their
> > compilation, but in the long run I would like to be able to just
> > give the file.nasm to any 'Program' or 'Library' method.
> >
> > Does anyone have experience with .nasm files / integrated them
> > with cons etc.? Or has info on how I should go about it? (I can
> > write some perl, but I'm not that good at it .. kind of "hello
> > world" stage right now)
> >
> > TTimo
> >
> > _______________________________________________
> > address@hidden
> > http://mail.gnu.org/mailman/listinfo/cons-discuss
> > Cons URL: http://www.dsmit.com/cons/
> >
>
>
> _______________________________________________
> address@hidden
> http://mail.gnu.org/mailman/listinfo/cons-discuss
> Cons URL: http://www.dsmit.com/cons/