help-make
[Top][All Lists]
Advanced

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

Re: too many obj


From: Paul Smith
Subject: Re: too many obj
Date: Wed, 10 May 2017 00:49:38 -0400

On Wed, 2017-05-10 at 08:18 +0800, Austin HE wrote:
> Would you please kindly help on the following GUN-make issue?

Why did you attach the source code for GNU make?  We already have that.
  
>  I am using make.exe 3.81 to work with Visual Studio2008 sp1 to build
> projects for different platforms. There are 134 .obj files in one of
> the sub project and it will fail to build up .lib file.  The build
> will be successful if I reduce the .obj files to 92 in config file but
> I will miss a lot of source codes(134-92=42 files). 

You didn't show us the rule that uses this value of $(OBJS) so it's hard
to help.

If your rule looks something like this:

  foo.lib: $(OBJS)
          lib /out:$@ $^

or something (I am not familiar with Windows compiler tools).

Instead of this, you can try changing directories and then removing the
$(PATH_OBJ) prefix.  For example something like this:

  foo.lib: $(OBJS)
          cd $(PATH_OBJ) ; lib /out:$(CURDIR)/$@ $(patsubst
$(PATH_OBJ)%,%,$^)

This will greatly reduce the length of your line since you won't have to
include the path to every object in the list.

Of course, this will only help so much; eventually you'll still exceed
the limits of the command line.

At that point all you can do, as far as I know, is create two libraries
instead of one, or else upgrade to a newer version of GNU make and use
the $(file ...) function to generate a file containing the list of
objects and use that with your command.



reply via email to

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