www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1993/10/11/12:33:47

From: kunst AT prl DOT philips DOT nl
Subject: Re: gcc call too long (>128)
To: davis AT pacific DOT mps DOT ohio-state DOT edu
Date: Mon, 11 Oct 1993 17:01:58 +0100 (MET)
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu (DJGPP users list)

> 
> Does anyone have a hacked up version of make that automatically generates a
> response file without any modification to the makefile?  That is, interpret:
> 
> target:
> 	$(CC) ....lots of stuff here requiring response file....
> 
> as
> target:
> 	$(CC) @target.rsp
> 
> where the file target.rsp is automatically generated by the make program.  

See below.

> It would also be nice if files with .o extension were expanded to a .obj
> extension.   

Why ? GCC has knowledge only of .o files, not .obj files.

> I know much of this could be done with macros but I would like to
> take a generic Unix Makefile and have the make program quietly but
> intelligently `dosify' it.
> 
> --John
> 
> 

This is what I use inside my makefiles. It's simple, and works !
(The only limitation is that you have to have a separate 
directory for each program you want to compile and link.)

OBJS = a.o b.o c.o d.o e.o f.o g.o

prog.lnk: $(OBJS)
        -del prog.lnk
        for %o in (*.o) do echo %o >>prog.lnk   # MS-DOS batch language

prog: prog.lnk
	cc -o prog @prog.lnk -lm 



 .^^^^^^^^           _____________________________________
 |      |          / Pieter Kunst (P.J.)                   \
 |  _  _|        /   Philips Research Laboratories,          \
.--(o)(o)      /     Building WY3, Prof. Holstlaan 4,         \
|@      _)   /       5656 AA  Eindhoven, The Netherlands.      |
  | ,___|   /        e-mail: kunst AT prl DOT philips DOT nl             /
  |   /     \_______________________________________________/
  /____\

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019