🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.misc.discuss
Article #1121

help needed for makefile

#1121
From: Ker
Date: Sat, 03 Oct 1992 20:30
29 lines
910 bytes
Given a set of rules as the followed:

A: a1.o a2.o
	cc -o $@  $^

B: b1.o 
	cc -o $@  $^

C: c1.o c2.o c3.o c4.o
	cc -o $@  $^

	--------
Z: z1.o z2.o z3.o
	cc -o $@  $^


Instead of writing 26 rules, is there any way to write somthing like

TARGETS = A B C ... Z

TARGETS : DEPENDENCIES
	cc -o $@  $^ 

	where TARGETS is {A}, {B}, {C}, ..., {Z}
	and DEPENDENCIES is {a1.o a2.o}, {b1.o}, {c1.o, c2.o, c3.o, c4.o}, ...,
	{z1.o, z2.o, z3.o} 


ivan@d1.att.com
Technical Details
Message-ID: <1992Oct3.203020.18865@ucs.att.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!ames!sun-barr!cs.utexas.edu!uwm.edu!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!att!dptg!ucs!ker

Show Full Headers
Complete Article Headers
Newsgroups: gnu.misc.discuss
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!ames!sun-barr!cs.utexas.edu!uwm.edu!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!att!dptg!ucs!ker
From: ker@ucs.att.com (Ker)
Subject: help needed for makefile
Message-ID: <1992Oct3.203020.18865@ucs.att.com>
Organization: AT&T Universal Card Services, Jacksonville FL
Distribution: inet
Date: Sat, 3 Oct 1992 20:30:20 GMT
Lines: 29