help-make
[Top][All Lists]
Advanced

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

Re: new to make (GNU make on NT 4.0)


From: David Luchin
Subject: Re: new to make (GNU make on NT 4.0)
Date: Wed, 04 Apr 2001 08:53:54 -0500

If you don't give make a specific target on the command line, make will
build the first target listed in the makefile.  In this case, that is "
%.obj ".  If you put $(program_name) first, it should work (assuming
that's your only problem, and I don't know NT well enough to claim that
it is).  Alternately, you could run

make -f makefile --jobs=1 -k ctest

to tell it what, specifically, you want to build.

Pedersen Torben Sandbæk (SMP/R&D) wrote:
> 
> Hi
> 
> I've got a perhaps Stupid question, but I hope some one will help me any way
> ;-)  (and I hope that this is the way to ask questions about make!?!)
> 
> I've just started to look at make jobs, and I though that I should use GNU
> make, as this support most platforms, all though that I don't know much
> about UNIX.
> 
> I'm using GNU make 3.79 on windows NT 4.0 sp 5 and a Borland C 3.1 compiler.
> 
> I through that I should start wit a small and simple "make file", with just
> 2 source files, and 1 header file. My problem is that often when  I tries to
> recompile, it's only one of the source files that gets compiled (I've
> deleted the all obj, and exe files first). If I then run the compiler again,
> the last source file gets compiled, and the .exe file gets linked. I also
> noticed that if I write exit in the command prompt, it seams like there
> still is some compilation running, like the make job started to compile both
> source files at once. So I tried to use the "-job=1" as argument to the make
> job, but it doesn't seams to help at all?!? What am I doing wrong?
> 
> I've also tried the Borland Make, but could not get the "include" to work,
> so if anybody knows how to do this with Borland Make, I'll be happy.
> 
> I start the make job like this:
> make -f makefile --jobs=1 -k
> 
> --------------------------------makefile------------------------------------
> -------------------
> include scr.mak
> program_name = ctest
> 
> TLIB = tlib
> TLINK = c:\\borlandc\\bin\\tlink
> LIBPATH = C:\\BORLANDC\\LIB
> INCLUDEPATH = C:\\BORLANDC\\INCLUDE
> 
> scr_wo_ext = $(scr:.c=)
> obj = $(scr:.c=.obj)
> 
> CC = c:\\borlandc\\bin\\BCC
> CFLAGS = -I$(INCLUDEPATH)
> 
> %.obj : %.c
>         @echo now compiling $< to $@
>         $(CC) $(CFLAGS) -c $<
> 
> $(program_name) : $(obj)
>         $(TLINK) /v/x/cs/P-/L$(LIBPATH) c0s.obj $(obj), $(program_name),,
> emu.lib maths.lib cs.lib
> 
> .PHONY : clean
> clean:
>         del $(obj)
>         del $(program_name).exe
> 
> include depn
> 
> --------------------------------scr.mak-------------------------------------
> ------------------
> scr = \
> cunit.c \
> tstcunit.c \
> 
> --------------------------------depn----------------------------------------
> ---------------
> cunit.obj: cunit.c CUnit.h
> tstcunit.obj: tstcunit.c cunit.h
> 
> Best regards,
>         Torben
> 
> _______________________________________________
> Help-make mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/help-make



reply via email to

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