Commit 13bbd580 authored by gsell's avatar gsell

src/Makefile.am

	- if parallel is enabled, only this version will be builded
	- parallel/non-parallel macros merged
	- the library name is now "libH5Part.h" for non-parallel and 
	  parallel. 
parent 792ae9a5
......@@ -2,26 +2,22 @@
# PATH SETTING (IMPORTED FROM CONFIGURE)
HDF5ROOT = @HDF5ROOT@
PHDF5ROOT = @PHDF5ROOT@
# COMPILERS
CC = @CC@
MPICC = @MPICC@
# COMPILER FLAGS
CFLAGS = @CFLAGS@
PCFLAGS = $(CFLAGS) -DPARALLEL_IO -DH5_HAVE_PARALLEL -DMPICH_IGNORE_CXX_SEEK
#INCLUDES
HDFINC = -I$(HDF5ROOT)/include
PHDFINC = -I$(PHDF5ROOT)/include
PINC = $(PHDFINC) $(MPIINC)
INC = $(HDFINC)
MPIINC = @MPIINC@
INC = $(HDFINC) ${MPIINC}
# H5Part header file location
H5PINC = -I@prefix@/include
# COMPILER FLAGS
CFLAGS = @CFLAGS@ ${INC}
# H5Part compiled library location
H5PLIB = -L@prefix@/lib
......@@ -41,10 +37,10 @@ nodist_include_HEADERS = @UNDERSCORE_H@
lib_LIBRARIES = @MTARGET@
# Listing of all possible targets that I may build.
EXTRA_LIBRARIES = libH5Part.a libH5PartF.a libpH5Part.a libpH5PartF.a
EXTRA_LIBRARIES = libH5Part.a libH5PartF.a
# Header files that I wish to install in $(prefix)/include
include_HEADERS = H5Part.inc H5Part.h H5Part.hh @UNDERSCORE_H@
include_HEADERS = H5Part.inc H5Part.h @UNDERSCORE_H@
# Listing of all possible headers that I may include
EXTRA_HEADERS = H5Part.inc H5Part.h H5Part.hh Underscore.h
......@@ -54,10 +50,6 @@ libH5Part_a_SOURCES = H5Part.c H5Block.c
libH5PartF_a_SOURCES = H5Part.c H5PartF.c H5Block.c
libpH5Part_a_SOURCES = H5Part.c H5Block.c
libpH5PartF_a_SOURCES = H5Part.c H5PartF.c H5Block.c
H5Part.inc: H5PartF90.inc
grep "INTEGER.* FUNCTION" $< | while read type func name rest; do echo " $$type $$name"; done > $@
......@@ -70,34 +62,23 @@ libH5Part.a: H5Part.o H5Block.o
libH5PartF.a: H5Part.o H5PartF.o H5Block.o
${AR} rucs $@ $^
H5Part.o: H5Part.c H5Part.h H5PartPrivate.h H5PartTypes.h
%.o : %.c
$(CC) $(CFLAGS) $(INC) -c $<
H5Part.o: H5Part.c H5Part.h H5PartPrivate.h H5PartTypes.h
H5Block.o: H5Block.c H5Part.h H5PartPrivate.h H5PartTypes.h H5Block.h H5BlockTypes.h
$(CC) $(CFLAGS) $(INC) -c $<
H5PartF.o: H5PartF.c Underscore.h H5Part.h
$(CC) $(CFLAGS) $(INC) -w -c $<
# ----------- Build Parallel H5Part Stuff ------------
libpH5Part.a: pH5Part.o pH5Block.o
${AR} rucs $@ $^
libpH5PartF.a: pH5Part.o pH5PartF.o pH5Block.o
${AR} rucs $@ $^
pH5Part.o: H5Part.c H5Part.h H5PartPrivate.h H5PartTypes.h
$(MPICC) $(CFLAGS) $(INC) -c $< -o $@
pH5Block.o: H5Block.c H5Part.h H5PartPrivate.h H5PartTypes.h H5Block.h H5BlockTypes.h
$(MPICC) $(CFLAGS) $(INC) -c $< -o $@
pH5PartF.o: H5PartF.c Underscore.h H5Part.h
$(MPICC) $(PCFLAGS) $(PINC) -w -c $< -o $@
libpH5Part.a: libH5Part.a
${RM} $@
ln -s $^ $@
libpH5PartF.a: libH5PartF.a
${RM} $@
ln -s $^ $@
clean:
rm -f *~ *.o *.a *.so
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment