🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.misc.discuss
Article #2280

Re: GNUmake question

#2280
From: Deyoung Hong
Date: Sat, 15 Aug 1998 00:00
27 lines
1366 bytes
Thanks for all the responses.

For the requirements that SOURCES can be anywhere and all OBJECTS
must be in the same place (something like obj/$(ARCH)) instead of
relative to the source directories, it would be simplier and I can
do this in my global make rules:


# Local makefile (which will include global makefile)
...
SOURCES = here.c else/where.c ../../upthere.c
...


# Global makefile may look something like this
...
OBJDIR = obj/$(ARCH)
OBJECTS = $(addprefix $(OBJDIR)/,$(notdir $(SOURCES)))
VPATH = $(sort $(dir $(SOURCES)))

$(OBJDIR)/%.o: %.c
	...

Thus I can define one make rule (which is what I want).

Thanks,
deyoung.hong@cisco.com
Technical Details
Message-ID: <35D63E2A.3B69E5A0@cisco.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <35D36BE6.89C653A6@cisco.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,457c97cafa25d3a0
X-Google-Attributes: gid11318c,public
X-Google-Thread: fa261,457c97cafa25d3a0
X-Google-Attributes: gidfa261,public
X-Google-Thread: 1025b4,457c97cafa25d3a0
X-Google-Attributes: gid1025b4,public
From: Deyoung Hong <hong@cisco.com>
Subject: Re: GNUmake question
Date: 1998/08/15
Message-ID: <35D63E2A.3B69E5A0@cisco.com>
X-Deja-AN: 381553378
Content-Transfer-Encoding: 7bit
References: <35D36BE6.89C653A6@cisco.com>
Content-Type: text/plain; charset=us-ascii
Organization: Cisco Systems
Mime-Version: 1.0
Reply-To: deyoung.hong@cisco.com
Newsgroups: gnu.misc.discuss,gnu.gcc.help,gnu.utils