help-make
[Top][All Lists]
Advanced

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

Re: how to include .asm files


From: CHEN Cheng
Subject: Re: how to include .asm files
Date: Wed, 15 Jul 2009 20:06:05 +0800
User-agent: Mutt/1.5.17 (2007-11-01)

On Wed, Jul 15, 2009 at 03:48:42AM -0700, kwistjhp wrote:
> 
> Hi all,
> 
> I have a problem with making the following file, in which idt.asm and
> service.asm are included in kernel_init.asm and should not be assembled by
> themselves. I want them to be dependencies to kernel_init.o
> 
> --------
> kernel.bin : kernel_init.o
>       ld -T link.ld -o kernel.bin *.o -L H:\Jonix -lckjonix -nostdlib -M -s
> 
> kernel.bin : kernel_init.o
> 
> kernel_init.o : kernel_init.asm idt.asm service.asm
>       fasm kernel_init.asm kernel_init.o 
> --------
> 
> However, make complains 'no rule to make target idt.asm, needed by
> kernel_init.o. How can I tell make that these files are not to be built by
> make, but just that kernel_init.o is to be rebuilt whenever one of the
> dependencies are updated? When I add:

Are the included asm files located in the same directory as Makefile?
If not,
it might work if you specify full/relative path of them, e.g.:

kernel.bin: kernel_init.o
    ld -T link.ld -o $@ $^ -L H:\Jonix -lckjonix -nostdlib -M -s

kernel_init.o : kernel_init.asm
    fasm $< $@

kernel_init.o : included\idt.asm included\service.asm



Hope this helps,

Cheng





reply via email to

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