2004-10-27 18:52:04 +04:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2005-11-05 22:57:48 +03:00
|
|
|
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
|
|
|
# University Research and Technology
|
|
|
|
# Corporation. All rights reserved.
|
|
|
|
# Copyright (c) 2004-2005 The University of Tennessee and The University
|
|
|
|
# of Tennessee Research Foundation. All rights
|
|
|
|
# reserved.
|
2004-11-28 23:09:25 +03:00
|
|
|
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
# University of Stuttgart. All rights reserved.
|
2005-03-24 15:43:37 +03:00
|
|
|
# Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
# All rights reserved.
|
2004-11-22 04:38:40 +03:00
|
|
|
# $COPYRIGHT$
|
|
|
|
#
|
|
|
|
# Additional copyrights may follow
|
|
|
|
#
|
2004-11-22 03:37:56 +03:00
|
|
|
# $HEADER$
|
|
|
|
#
|
|
|
|
# This is a simple makefile for windows which makes all the components
|
|
|
|
# which are required for super computing. Too lazy to open up visual
|
|
|
|
# studio each and every time to compile a component, so just adding
|
|
|
|
# this to the svn repository
|
2004-10-27 18:52:04 +04:00
|
|
|
#
|
|
|
|
|
2005-01-25 23:01:06 +03:00
|
|
|
topdir := $(shell cygpath -m $(CURDIR))/..
|
|
|
|
prefix = ${topdir}/src/Debug
|
|
|
|
installdir = ${prefix}
|
2004-11-01 17:44:14 +03:00
|
|
|
pkgdatadir = ${prefix}/share
|
|
|
|
sysconfdir = ${prefix}/etc
|
|
|
|
pkglibdir = ${prefix}/lib
|
2004-10-27 18:52:04 +04:00
|
|
|
|
|
|
|
# list of components to build with the c compiler
|
|
|
|
C_SUBDIRS = \
|
|
|
|
attribute \
|
|
|
|
class \
|
|
|
|
communicator \
|
|
|
|
datatype \
|
|
|
|
errhandler \
|
|
|
|
event \
|
|
|
|
event/WIN32-Code \
|
2005-05-02 19:27:54 +04:00
|
|
|
dps \
|
2004-10-27 18:52:04 +04:00
|
|
|
file \
|
|
|
|
group \
|
|
|
|
info \
|
2004-10-28 22:13:43 +04:00
|
|
|
util \
|
2004-10-27 18:52:04 +04:00
|
|
|
mpi/c \
|
2004-10-28 22:13:43 +04:00
|
|
|
mpi/runtime \
|
|
|
|
threads \
|
2004-10-27 18:52:04 +04:00
|
|
|
op \
|
|
|
|
proc \
|
|
|
|
request \
|
|
|
|
runtime \
|
|
|
|
mca/base \
|
|
|
|
mca/allocator/base \
|
|
|
|
mca/coll/base \
|
|
|
|
mca/gpr/base \
|
2005-05-02 19:27:54 +04:00
|
|
|
mca/gpr/base/data_type_support \
|
2005-05-12 00:21:10 +04:00
|
|
|
mca/gpr/base/pack_api_cmd \
|
|
|
|
mca/gpr/base/unpack_api_response \
|
2004-10-27 18:52:04 +04:00
|
|
|
mca/io/base \
|
2005-01-25 23:01:06 +03:00
|
|
|
mca/iof/base \
|
2005-04-11 08:47:58 +04:00
|
|
|
mca/errmgr/base \
|
2005-04-11 09:07:57 +04:00
|
|
|
mca/rml/base \
|
|
|
|
mca/rmgr/base \
|
2005-05-02 19:27:54 +04:00
|
|
|
mca/rmgr/base/data_type_support \
|
2005-04-13 06:29:33 +04:00
|
|
|
mca/rmaps/base \
|
2005-04-11 09:12:33 +04:00
|
|
|
mca/soh/base \
|
2005-05-02 19:27:54 +04:00
|
|
|
mca/soh/base/data_type_support \
|
2004-10-27 18:52:04 +04:00
|
|
|
mca/mpool/base \
|
|
|
|
mca/ns/base \
|
2005-05-02 19:27:54 +04:00
|
|
|
mca/ns/base/data_type_support \
|
2004-10-27 18:52:04 +04:00
|
|
|
mca/oob/base \
|
|
|
|
mca/pml/base \
|
|
|
|
mca/ptl/base \
|
2005-06-22 02:48:57 +04:00
|
|
|
mca/pls/base \
|
|
|
|
mca/pls/fork \
|
|
|
|
mca/pls/proxy \
|
|
|
|
mca/pls/rsh \
|
|
|
|
mca/ras/base \
|
|
|
|
mca/ras/host \
|
|
|
|
mca/rds/base \
|
|
|
|
mca/rds/hostfile \
|
|
|
|
mca/rds/resfile \
|
2004-10-27 18:52:04 +04:00
|
|
|
mca/topo/base \
|
2005-05-02 19:27:54 +04:00
|
|
|
mca/schema/base \
|
2004-10-27 18:52:04 +04:00
|
|
|
win32/generated_source \
|
|
|
|
win \
|
2005-01-25 23:01:06 +03:00
|
|
|
win32
|
2004-11-02 16:14:34 +03:00
|
|
|
|
2005-01-25 23:01:06 +03:00
|
|
|
EXTRA_DIRS =
|
2004-10-27 18:52:04 +04:00
|
|
|
|
2005-02-28 19:00:55 +03:00
|
|
|
#
|
|
|
|
# Files included by the dist that we don't want to compile
|
2005-03-01 19:02:10 +03:00
|
|
|
#
|
2005-04-12 23:02:55 +04:00
|
|
|
EXCLUDE_FILES = dt_arch.c \
|
|
|
|
epoll.c \
|
|
|
|
epoll_sub.c \
|
|
|
|
kqueue.c \
|
2005-02-28 19:00:55 +03:00
|
|
|
llm_base_parse_hostfile_lex.c \
|
2005-04-12 23:02:55 +04:00
|
|
|
misc.c \
|
|
|
|
poll.c \
|
|
|
|
rtsig.c \
|
2005-05-13 19:05:07 +04:00
|
|
|
stacktrace.c \
|
|
|
|
condition_spinlock.c
|
2005-02-28 19:00:55 +03:00
|
|
|
|
2004-10-27 18:52:04 +04:00
|
|
|
#
|
|
|
|
# A small function to extract the list of all files in these directories
|
|
|
|
#
|
2005-01-25 23:01:06 +03:00
|
|
|
SOURCE_FILES = $(foreach dir, ${C_SUBDIRS}, $(wildcard ${dir}/*.[c]))
|
|
|
|
OBJECT_FILES = $(SOURCE_FILES:.c=.obj)
|
|
|
|
DEBUG = Debug
|
|
|
|
LINKED_SOURCE = $(foreach dir, ${DEBUG}, $(wildcard ${dir}/*.[c]))
|
|
|
|
LINKED_OBJS = $(LINKED_SOURCE:.c=.obj)
|
2004-10-27 18:52:04 +04:00
|
|
|
|
2005-01-25 23:01:06 +03:00
|
|
|
.SUFFIXES: .c .obj
|
2004-10-27 18:52:04 +04:00
|
|
|
CC = cl
|
2005-01-25 23:01:06 +03:00
|
|
|
CXX = $(CC)
|
2004-10-27 18:52:04 +04:00
|
|
|
|
|
|
|
INCL = \
|
|
|
|
/I"${topdir}/src/win32/generated_include" \
|
2005-01-25 23:01:06 +03:00
|
|
|
/I"${topdir}/src/win32" \
|
|
|
|
/I"${topdir}/include" \
|
2004-10-27 18:52:04 +04:00
|
|
|
/I"${topdir}/src" \
|
2005-01-25 23:01:06 +03:00
|
|
|
/I"${topdir}/src/event/compat/" \
|
|
|
|
/I"${topdir}/src/event" \
|
2005-03-01 19:57:03 +03:00
|
|
|
/I"${topdir}/src/event/WIN32-Code/"
|
2004-10-27 18:52:04 +04:00
|
|
|
|
|
|
|
CFLAGS = \
|
|
|
|
/DWIN32 \
|
2004-11-01 17:44:14 +03:00
|
|
|
/DOMPI_SYSCONFDIR="\"${sysconfdir}\"" \
|
|
|
|
/DOMPI_PKGLIBDIR="\"${pkglibdir}\"" \
|
|
|
|
/DOMPI_PKGDATADIR="\"${pkgdatadir}\"" \
|
2004-10-27 18:52:04 +04:00
|
|
|
/DHAVE_CONFIG_H \
|
|
|
|
/D_WINDLL \
|
|
|
|
/EHsc \
|
2005-01-27 03:13:44 +03:00
|
|
|
/ML \
|
2004-10-29 02:21:20 +04:00
|
|
|
/W0 \
|
2004-10-27 18:52:04 +04:00
|
|
|
/Wp64 \
|
|
|
|
/TC \
|
|
|
|
/D_MBCS \
|
|
|
|
/Fo"${topdir}/src/Debug/" \
|
|
|
|
/nologo \
|
|
|
|
/c
|
|
|
|
|
2005-01-25 23:01:06 +03:00
|
|
|
STATIC_LIBS = \
|
|
|
|
allocator \
|
|
|
|
coll\
|
|
|
|
ns\
|
|
|
|
gpr \
|
|
|
|
topo\
|
2005-04-11 08:47:58 +04:00
|
|
|
errmgr \
|
2005-04-11 09:07:57 +04:00
|
|
|
rml \
|
|
|
|
rmgr \
|
2005-04-13 06:29:33 +04:00
|
|
|
rmaps \
|
2005-04-11 09:12:33 +04:00
|
|
|
soh \
|
2005-01-25 23:01:06 +03:00
|
|
|
ptl\
|
|
|
|
oob\
|
|
|
|
pml\
|
2005-06-22 02:48:57 +04:00
|
|
|
pls\
|
|
|
|
ras \
|
|
|
|
rds \
|
2005-05-02 19:27:54 +04:00
|
|
|
schema \
|
2005-01-25 23:01:06 +03:00
|
|
|
iof
|
|
|
|
|
|
|
|
CXXFLAGS = $(CFLAGS) $(INCL)
|
|
|
|
|
2004-10-28 22:13:43 +04:00
|
|
|
LINK = link
|
|
|
|
|
|
|
|
LINKFLAGS = \
|
|
|
|
/DLL \
|
2005-01-27 03:13:44 +03:00
|
|
|
/OPT:NOICF \
|
|
|
|
/OPT:NOREF \
|
2004-10-28 22:13:43 +04:00
|
|
|
/IMPLIB:libmpi.lib\
|
2004-10-29 19:38:48 +04:00
|
|
|
/nologo \
|
|
|
|
/OUT:libmpi.dll
|
2004-10-28 22:13:43 +04:00
|
|
|
|
|
|
|
ADDLIBS = \
|
|
|
|
ws2_32.lib \
|
|
|
|
kernel32.lib \
|
|
|
|
user32.lib \
|
|
|
|
gdi32.lib \
|
|
|
|
winspool.lib \
|
|
|
|
comdlg32.lib \
|
|
|
|
advapi32.lib \
|
|
|
|
shell32.lib \
|
|
|
|
ole32.lib \
|
|
|
|
oleaut32.lib \
|
|
|
|
uuid.lib \
|
|
|
|
odbc32.lib \
|
|
|
|
odbccp32.lib
|
2004-10-29 02:21:20 +04:00
|
|
|
|
2005-01-25 23:01:06 +03:00
|
|
|
.c.obj:
|
|
|
|
$(CXX) $(CXXFLAGS) $*.c
|
|
|
|
|
2005-02-28 19:00:55 +03:00
|
|
|
all: libmpi
|
2004-10-27 18:52:04 +04:00
|
|
|
|
|
|
|
prebuild:
|
|
|
|
@echo "Creating mca_base_parse_paramfile_lex.c"
|
|
|
|
@/usr/bin/flex -t -Pmca_base_yy "${topdir}/src/mca/base/mca_base_parse_paramfile_lex.l" \
|
|
|
|
>"${topdir}/src/mca/base/mca_base_parse_paramfile_lex.c" 2>/dev/null
|
2005-06-22 02:48:57 +04:00
|
|
|
@echo "Creating mca_rds_hostfile_lex.c"
|
|
|
|
@/usr/bin/flex -t -Porte_rds_hostfile_ "${topdir}/src/mca/rds/hostfile/rds_hostfile_lex.l" \
|
|
|
|
> "${topdir}/src/mca/rds/hostfile/rds_hostfile_lex.c" 2>/dev/null
|
2004-10-27 18:52:04 +04:00
|
|
|
@echo "Creating show_help_lex.c"
|
2005-07-04 06:38:44 +04:00
|
|
|
@/usr/bin/flex -t -Popal_show_help_yy "${topdir}/src/opal/util/show_help_lex.l" \
|
|
|
|
> "${topdir}/src/opal/util/show_help_lex.c" 2>/dev/null
|
2004-11-02 16:14:34 +03:00
|
|
|
@for dirs in ${STATIC_LIBS}; do \
|
2005-04-11 08:47:58 +04:00
|
|
|
(dir="mca/$${dirs}/base"; echo "Making Static components in $${dirs}"; comp_name="$${dirs}_static-components.h"; cp "${topdir}/src/win32/generated_include/$${comp_name}" "$${dir}/static-components.h";); \
|
2004-11-02 16:14:34 +03:00
|
|
|
done
|
2005-06-22 02:48:57 +04:00
|
|
|
@echo "Creating Version Headers"
|
|
|
|
@cp "${topdir}/src/win32/generated_include/pls-fork-version.h" "${topdir}/src/mca/pls/fork/pls-fork-version.h";
|
|
|
|
@cp "${topdir}/src/win32/generated_include/pls-proxy-version.h" "${topdir}/src/mca/pls/proxy/pls-proxy-version.h";
|
|
|
|
@cp "${topdir}/src/win32/generated_include/pls-rsh-version.h" "${topdir}/src/mca/pls/rsh/pls-rsh-version.h";
|
2004-10-27 18:52:04 +04:00
|
|
|
@for dirs in ${C_SUBDIRS}; do \
|
2005-02-24 22:00:26 +03:00
|
|
|
(echo "Entering $${dirs}"; cd $$dirs; if test -f .compile_files; then (more .compile_files| xargs -i'{}' ln -f '{}' ${topdir}/src/Debug/'{}'); else (ls *.c 2>/dev/null | xargs -i'{}' ln -f '{}' ${topdir}/src/Debug/'{}'); fi); \
|
2004-10-27 18:52:04 +04:00
|
|
|
done
|
2005-02-28 19:00:55 +03:00
|
|
|
@for file in ${EXCLUDE_FILES}; do \
|
|
|
|
(echo "Removing $${file}"; cd ${topdir}/src/Debug/; rm -f $${file}); \
|
|
|
|
done
|
2005-01-25 23:01:06 +03:00
|
|
|
@echo "done"
|
|
|
|
|
2004-10-27 18:52:04 +04:00
|
|
|
|
2005-01-25 23:01:06 +03:00
|
|
|
libmpi: $(LINKED_OBJS)
|
|
|
|
${LINK} ${LINKFLAGS} ${ADDLIBS} $(LINKED_OBJS)
|
2004-10-28 22:13:43 +04:00
|
|
|
|
2004-10-29 19:38:48 +04:00
|
|
|
install:
|
2004-11-02 16:14:34 +03:00
|
|
|
@echo -n "Installing libmpi and include file ................"
|
2005-01-25 23:01:06 +03:00
|
|
|
@install -d ${topdir}/src ${installdir}/lib
|
|
|
|
@install -p ${topdir}/src/libmpi.lib ${installdir}/lib/libmpi.lib
|
|
|
|
@install -p ${topdir}/src/libmpi.exp ${installdir}/lib/libmpi.exp
|
|
|
|
@install -p ${topdir}/src/libmpi.dll ${installdir}/lib/libmpi.dll
|
|
|
|
@install -d ${topdir}/include ${installdir}/include/
|
|
|
|
@install -p ${topdir}/include/ompi_config_bottom.h \
|
|
|
|
${installdir}/include/ompi_config_bottom.h
|
|
|
|
@install -p ${topdir}/src/win32/generated_include/ompi_config.h \
|
|
|
|
${installdir}/include/ompi_config.h
|
|
|
|
@install -p ${topdir}/include/mpi.h ${installdir}/include/mpi.h
|
|
|
|
@install -p ${topdir}/include/ompi_stdint.h ${installdir}/include/ompi_stdint.h
|
|
|
|
@install -d ${topdir}/src/win32 ${installdir}/include/win32
|
|
|
|
@install -p ${topdir}/src/win32/win_compat.h ${installdir}/include/win32/win_compat.h
|
2004-11-02 16:14:34 +03:00
|
|
|
@echo "done"
|
2004-10-29 19:38:48 +04:00
|
|
|
|
2004-10-27 18:52:04 +04:00
|
|
|
.PHONY: clean
|
|
|
|
|
|
|
|
clean:
|
|
|
|
@for dirs in ${C_SUBDIRS}; do \
|
|
|
|
(echo "Entering $$dirs"; cd $$dirs; rm -rf *.lib *.obj *.exp;); \
|
|
|
|
done
|
|
|
|
@for dirs in ${C_PPSUBDIRS}; do \
|
|
|
|
(echo "Entering $$dirs"; cd $$dirs; rm -rf *.lib *.obj *.exp;); \
|
|
|
|
done
|
2005-01-25 23:01:06 +03:00
|
|
|
@echo "Entering ${topdir}/src/Debug ... "; cd ${topdir}/src/Debug; rm -rf *.lib *.obj *.exp *.c;
|