I'm trying to build an archive library using the following script. It builds fine on 32-bit architectures, but when I try to build on a computer with 64-bit architecture I get this error message: /usr/bin/ld: warning: i386 architecture of input file `../lpdlib/lpdlib_byteswapio.a(system.o)' is incompatible with i386:x86-64 output
I'm extremely unfamiliar with library building commands and can't figure out how to specify the architecture of the input object files. Any clues?
Makefile:
FORT_COMP= pgf90
FORT_OPTS= -c -Mvect -Minfo -Munroll -Mnoframe -O2 -pc 64 -Mnofree -Mbyteswapio
ARCHIVE=ar rs
RANLIB =ls
LIB=lpdlib_byteswapio.a
SOURCE = cpart.f names.f polar.f random.f surfer.f system.f vform.f interpol.f polarst.f
$(LIB): $(SOURCE)
$(FORT_COMP) $(FORT_OPTS) $(?)
$(ARCHIVE) $(LIB) $(?:.f=.o)
$(RANLIB) $(LIB)
rm -f $(?:.f=.o)
I'm extremely unfamiliar with library building commands and can't figure out how to specify the architecture of the input object files. Any clues?
Makefile:
FORT_COMP= pgf90
FORT_OPTS= -c -Mvect -Minfo -Munroll -Mnoframe -O2 -pc 64 -Mnofree -Mbyteswapio
ARCHIVE=ar rs
RANLIB =ls
LIB=lpdlib_byteswapio.a
SOURCE = cpart.f names.f polar.f random.f surfer.f system.f vform.f interpol.f polarst.f
$(LIB): $(SOURCE)
$(FORT_COMP) $(FORT_OPTS) $(?)
$(ARCHIVE) $(LIB) $(?:.f=.o)
$(RANLIB) $(LIB)
rm -f $(?:.f=.o)