From: Boon van der RJ Newsgroups: comp.os.msdos.djgpp Subject: Re: Making MAKE call NASM like it calls GCC Date: 28 Sep 1998 11:05:38 GMT Organization: Fac. Wiskunde & Informatica, VU, Amsterdam Message-ID: <6unqi2$b77$1@star.cs.vu.nl> References: <360BAA3F DOT 79D6 AT erols DOT com> NNTP-Posting-Host: sloep07.cs.vu.nl User-Agent: tin/pre-1.4-980730 (UNIX) (SunOS/5.5.1 (sun4u)) Originator: rjvdboon AT sloep07 DOT cs DOT vu DOT nl Lines: 32 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk John S. Fine wrote: > In case that needs to be a little clearer, the source of > the confusion is that gcc is used as both the compiler and > the linker (actually gcc is a control program that invokes > the compiler and linker). This can be confusing yes. Even more if a makefile asks for LD and you know you've got ld.exe, but should say gcc. > The rule above, is using gcc as a linker to combine all the > .o files (and some libraries) into an exe file. As such, its > list of .o files must include both the ones that came from .c > files and the ones that came from .asm files. And that's no problem to either make nor gcc. It can be confusing to make if you need xyz.o and you both have xyz.c and xyz.asm. If you have got xyz.c and abc.asm and the makefile: CC = gcc CFLAGS = -m486 -s -Wall -Werror OBJS = xyz.o abc.o gall.exe: $(OBJS); gcc -o $@ $(OBJS) %.o: %.asm; nasm $< -o $@ -fcoff $(NASMFLAGS) will do what you want, and expect it to do. (because the %.o: %.c rule is builtin.You can make it explicit also, for clarity and to control the proces completely) bye now, Robert. -- rjvdboon AT cs DOT vu DOT nl | "En dat is niet waar!" sprak ex-Staatsecretaris- www.cs.vu.nl/~rjvdboon | van-Onderwijs Netelenbos fel.