Here is a copy of my makefile.  It is a lot easier for someone to help, if 
they can see what I'm doing...
I just noticed the CC and lack of CXX, I'll fix that.

# Makefile for tcp_fft_server
# Date: Fri 18 Sep 2009 10:13:54 AM EDT 
# Author: Bruce Labitt  bruce.lab...@autoliv.com

# Dependencies
# myserver needs = myfft, memcpy_cell, getflops, pack, savewisdom, fftw3
# myfft.cpp depends on memcpy_cell
# memcpy_cell.c depends on - 
# getflops.cpp needs fftw3.h
# pack.c depends on -
# savewisdom.cpp needs fftw3.h

CC=g++
C=gcc
INCLUDES=-I/usr/local/include -I/usr/lib/gcc/ppu/4.1.1/include 
-I/usr/lib/gcc/spu/4.1.1/include -I./include
LIBS=-L/usr/local/lib -lfftw3 -lm 
CCOPTS=-O3 -m64 -mcpu=970 -mtune=970 -D_FILE_OFFSET_BITS=64 -fopenmp -Wall 
-Wcast-qual
OBJECTS=pack.o getflops.o memcpy_cell.o myfft.o savewisdom.o myserver.o
vpath %.h ./include

all: server

server: $(OBJECTS)
        $(CC) -oserver $(CCOPTS) $(LIBS) $(INCLUDES) $(OBJECTS)

pack.o: pack.c pack.h
        $(C) -c pack.c $(CCOPTS) $(INCLUDES)

getflops.o:     getflops.cpp getflops.h
        $(CC) -c getflops.cpp $(CCOPTS) $(INCLUDES)

myserver.o:     myserver.cpp getflops.h myfft.h savewisdom.h pack.h 
memcpy_cell.h /usr/local/include/fftw3.h 
        $(CC) -c myserver.cpp $(CCOPTS) $(INCLUDES)

memcpy_cell.o:  memcpy_cell.c memcpy_cell.h
        $(C)  -c memcpy_cell.c $(CCOPTS) $(INCLUDES)

myfft.o:        myfft.cpp myfft.h memcpy_cell.h memcpy_cell.c
        $(CC) -c myfft.cpp $(CCOPTS) $(INCLUDES) 

savewisdom.o:   savewisdom.cpp savewisdom.h /usr/local/include/fftw3.h
        $(CC) -c savewisdom.cpp $(CCOPTS) $(INCLUDES) 

clean:
        rm -rf *o server


Not automated, but, it should work, I hope...

But, this is what I get as output.  Everything seems to compile ok... 
Linking seems to be an issue...

g++ -oserver -O3 -m64 -mcpu=970 -mtune=970 -D_FILE_OFFSET_BITS=64 -fopenmp 
-Wall -Wcast-qual -L/usr/local/lib -lfftw3 -lm  -I/usr/local/include 
-I/usr/lib/gcc/ppu/4.1.1/include -I/usr/lib/gcc/spu/4.1.1/include 
-I./include pack.o getflops.o myfft.o memcpy_cell.o savewisdom.o 
myserver.o
myfft.o:(.text+0x198): undefined reference to `memcpy_cell(void*, void 
const*, unsigned long)'
myfft.o:(.text+0x1ac): undefined reference to `memcpy_cell(void*, void 
const*, unsigned long)'
myfft.o:(.text+0x1c0): undefined reference to `memcpy_cell(void*, void 
const*, unsigned long)'
myserver.o:(.text+0xd58): undefined reference to `pack(unsigned char*, 
char*, ...)'
myserver.o:(.text+0xe90): undefined reference to `pack(unsigned char*, 
char*, ...)'
myserver.o:(.text+0xf74): undefined reference to `unpack(unsigned char*, 
char*, ...)'
myserver.o:(.text+0x1018): undefined reference to `unpack(unsigned char*, 
char*, ...)'
myserver.o:(.text+0x1154): undefined reference to `unpack(unsigned char*, 
char*, ...)'
myserver.o:(.text+0x1270): undefined reference to `unpack(unsigned char*, 
char*, ...)'
myserver.o:(.text+0x1378): undefined reference to `unpack(unsigned char*, 
char*, ...)'
myserver.o:(.text+0x14a0): more undefined references to `unpack(unsigned 
char*, char*, ...)' follow
collect2: ld returned 1 exit status
make: *** [server] Error 1

myfft.cpp has the following includes:
#include "memcpy_cell.h"

myserver.cpp has includes of:
#include <fftw3.h>
#include "getflops.h"
#include "myfft.h"
#include "savewisdom.h"
#include "pack.h"

If someone could help me out, I would greatly appreciate it!  I've 
successfully used fftw before, along with getflops.cpp, myfft.cpp, 
savewisdom.cpp, and memcpy_cell.c in another project I created and used 6 
months ago.

Help!
-Bruce







******************************
Neither the footer nor anything else in this E-mail is intended to or 
constitutes an <br>electronic signature and/or legally binding agreement in the 
absence of an <br>express statement or Autoliv policy and/or procedure to the 
contrary.<br>This E-mail and any attachments hereto are Autoliv property and 
may contain legally <br>privileged, confidential and/or proprietary 
information.<br>The recipient of this E-mail is prohibited from distributing, 
copying, forwarding or in any way <br>disseminating any material contained 
within this E-mail without prior written <br>permission from the author. If you 
receive this E-mail in error, please <br>immediately notify the author and 
delete this E-mail.  Autoliv disclaims all <br>responsibility and liability for 
the consequences of any person who fails to <br>abide by the terms herein. <br>
******************************

_______________________________________________
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/

Reply via email to