Path: chuka.playstation.co.uk!news From: Dave Smethurst Newsgroups: scee.yaroze.programming.gnu_compiler Subject: Re: gcc DOS line length limit Date: Sat, 19 Apr 1997 13:00:44 +0100 Organization: PlayStation Net Yaroze (SCEE) Lines: 51 Message-ID: <3358B3EC.120EBF4C@ulthwe.foobar.co.uk> References: <335815c1.4298411@news.playstation.co.uk> NNTP-Posting-Host: ulthwe.foobar.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.01Gold (X11; I; Linux 2.0.30 i586) Alex Amsel wrote: > > Quick question, > when using gcc and a makefile, the list of object files that > make up the executable is often longer than the 126 characters that > the dos command line allows. Most compilers i've used have a way > around this, for e.g. Watcom uses a '*' in front of the link command > and passes the command line in an environment variable, and the name > of the env var to the linker in an @. > > Anybody know how to do a similar thing with gcc???? Well , if the DOS make utility is the same as all the UNIX types then you should be able to set enviroment variables inside the Make file. When I usually compile a program (haven't done many for PSX yet .. uni is in the way =( ) I set 2 variables, one called SOURCE , the other obj i.e SOURCE = source.cpp OBJ = source.o EXE = source all: ${EXE} ${EXE} : ${OBJ} ${GCC} -o ${EXE} ${OBJ} ${OBJ} : ${SOURCE} ${GCC} -c ${OBJ} ${SOURCE} For a fact I know that this works on UNIX. But I haven't had much experience with DOS make. Anyway ... you can set any variable really. But there are some which Make usually likes to reserve.... can't list all of them. The GCC variable is the compiler command line exe call. If you need any more help drop me an email DJS. djs@ulthwe.foobar.co.uk