error when creating libcouple.a

Hi all,

I tried to creat libcouple.a using “g++ -f Makefile.g++” under the folder /couple/library, but I got the following error:
“file not recognized, file format not recognized”.

Anyone knows how to solve this problem? The file Makefile.g++ is as follows:

# Makefile for coupling library

SHELL = /bin/sh

# System-specific settings

CC =		g++
CCFLAGS =	-g -O -DMPICH_IGNORE_CXX_SEEK
DEPFLAGS =	-M
LINK =		g++
LINKFLAGS =	-g -O
ARCHIVE =	ar
ARFLAGS =	-rc
SIZE =		size

# Files

LIB = 	libcouple.a
SRC =	$(wildcard *.cpp)
INC =	$(wildcard *.h)
OBJ = 	$(SRC:.cpp=.o)

# Targets

lib:	$(OBJ)
	$(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ)

clean:
	rm $(LIB) *.o *.d

# Compilation rules

%.o:%.cpp
	$(CC) $(CCFLAGS) -c $<

%.d:%.cpp
	$(CC) $(CCFLAGS) $(DEPFLAGS) $< > $@

# Individual dependencies

DEPENDS = $(OBJ:.o=.d)
include $(DEPENDS)

Thanks
Wenjing Zhou

Uhm, how about using "make" instead of g++ for invoking a Makefile.

Cheers
Christian

-------- Original-Nachricht --------

Thanks, Christian. It works.

Best regards
Wenjing Zhou