Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Alpha and x86 development
@ 1999-08-08  8:24 mgraffam
  0 siblings, 0 replies; 2+ messages in thread
From: mgraffam @ 1999-08-08  8:24 UTC (permalink / raw)
  To: axp-list

Hello all..

I know that this is off-topic, and not Alpha-specific.. but I thought
that someone out there might have run into this, and could e-mail me
a quick response.

I'm developing some code simulaneously under Linux on x86, Alpha and
Sparc processors. The code is stored on my x86 machine, and NFS exported
to my Sparc and my Alpha. 

I have a makefile setup to build for any of the three platforms, but the
code is pretty large, and takes awhile to build.. so if I rebuild the
code for Alpha, after working on the Sparc, the Alpha has to rebuild
everything.

I was wondering if there was a trick to get gcc (and egcs) to put (and
look for) all of the object code in a specified directory? Then I could
have a sub-dirs called alpha_obj, sparc_obj, etc.. then each build could
grab objects from there. 

I looked in the man page, but I couldn't find anything that looked
helpful. I was wondering if someone knew of a work around. 

Thanks. 

Michael J. Graffam (mgraffam@idsi.net)
Be a munitions trafficker: http://www.dcs.ex.ac.uk/~aba/rsa/rsa-keygen.html

#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Alpha and x86 development
@ 1999-08-08 12:35 Christian Groessler
  0 siblings, 0 replies; 2+ messages in thread
From: Christian Groessler @ 1999-08-08 12:35 UTC (permalink / raw)
  To: axp-list



Hi,

On 8/8/99 9:24:10 AM mgraffam wrote:
>
>Hello all..
>
>I was wondering if there was a trick to get gcc (and egcs) to put (and
>look for) all of the object code in a specified directory? Then I could
>have a sub-dirs called alpha_obj, sparc_obj, etc.. then each build could
>grab objects from there.

You can handle it in the Makefile. Do something like this:

# architecture (x86,alpha,sparc)
ARCH := $(shell uname -m | sed -e s/i.86/x86/ | sed -e s/i86pc/x86/ | sed
-e s/sun../sparc/)
# operating system
OSTYPE := $(shell uname -s | tr A-Z a-z)
# subdirectory where the objects will be stored
O = $(OSTYPE).$(ARCH)

CC= gcc

# platform-specific C-flags
CDEFS.linux=-DUNIX -DHAVE_ALLOCA_H -DNEED_SHMGETEVENTBASE -DHAVE_MATH_H \
         -DNEED_STRUPR -DNEED_O_BINARY -DHAVE_VALUES_H -DLINUX_MOUSE \
         -DLINUX_SOUND -DLINUX

# archit.-specific C-flags
CDEFS.alpha=-DNO_UNALIGNED
CDEFS.sparc=-DNO_UNALIGNED
CDEFS.x86=

# compiler debug flags, uncomment these if you will do debugging
CFLAGS= -g -Wall $(CDEFS.$(ARCH)) $(CDEFS.$(OSTYPE)) $(GOPTS)

all: dirs $(O)/result

dirs:
     @if [ ! -d $(O) ]; then rm -f $(O); mkdir $(O); fi

$(O)/%.o: %.c
     $(CC) $(CFLAGS) -c $< -o $@


regards,
chris



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-08-08 11:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-08-08 12:35 Alpha and x86 development Christian Groessler
  -- strict thread matches above, loose matches on Subject: below --
1999-08-08  8:24 mgraffam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox