1
1
openmpi/src/mca/win_makefile

119 строки
3.0 KiB
Plaintext
Исходник Обычный вид История

#!/bin/sh
#
# 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
#
topdir = `echo $(CURDIR) | sed 's/^\//C:\/cygwin\//g' | sed 's/\/src\/mca//g'`
gen_base = ${topdir}/src/win32/generated_include
copy_base = ${topdir}/src/mca/
# list of components to build with the c compiler
C_SUBDIRS = \
allocator/bucket \
coll/basic \
llm/hostfile/src \
ns/proxy/src \
gpr/proxy/ \
pcmclient/env \
pcmclient/seed \
pcmclient/singleton \
topo/unity/src
# list of components to build with the cpp compiler
# (because of the problem with OBJ_CLASS_INSTANCE)
CPP_SUBDIRS = \
ptl/tcp/src \
oob/tcp/ \
pml/teg/src \
ns/replica/src \
gpr/replica/
#list of components that are not working as yet
CPP_EXCLUDE = \
ptl/tcp/src \
pcm/wmi
CC = cl
INCL = \
/I"${topdir}/src/win32/generated_include" \
/I"${topdir}/src/win32/" \
/I"${topdir}/src" \
/I"${topdir}/include"
CFLAGS = \
/DWIN32 \
/DOMPI_SYSCONFDIR \
/nologo \
/c
CPPFLAGS = \
/DWIN32 \
/DOMPI_SYSCONFDIR \
/c \
/TP \
/nologo \
/EHsc
# link with ompi.lib to resolve external symbols
OMPILIB = \
"${topdir}/src/libmpi.lib"
LINK = link
LINKFLAGS = \
/DLL \
/DEFAULTLIB:${OMPILIB} \
/nologo
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
all: \
clibs \
cpplibs
prebuild:
cp ${gen_base}/coll-basic-version.h ${copy_base}/coll/basic/
cp ${gen_base}/io-romio-version.h ${copy_base}/io/romio/
cp ${gen_base}/pcmclient-env-version.h ${copy_base}/pcmclient/env/
cp ${gen_base}/pcmclient-seed-version.h ${copy_base}/pcmclient/seed/
cp ${gen_base}/pcmclient-singleton-version.h ${copy_base}/pcmclient/singleton/
cp ${gen_base}/llm-hostfile-version.h ${copy_base}/llm/hostfile/
cp ${gen_base}/topo-unity-version.h ${copy_base}/topo/unity/
clibs: ${C_SUBDIRS} prebuild
@for dirs in ${C_SUBDIRS}; do \
(echo "Entering $${dirs}"; cd $$dirs; ${CC} ${CFLAGS} ${INCL} *.c; ${LINK} ${LINKFLAGS} ${ADDLIBS} *.obj); \
done
cpplibs: ${CPP_SUBDIRS} prebuild
@for dirs in ${CPP_SUBDIRS}; do \
(echo "Entering $${dirs}"; cd $$dirs; ${CC} ${CPPFLAGS} ${INCL} *.c; ${LINK} ${LINKFLAGS} ${ADDLIBS} *.obj); \
done
.PHONY: clean
clean:
@for dirs in ${C_SUBDIRS}; do \
(echo "Entering $$dirs"; cd $$dirs; rm -rf *.lib *.obj *.exp;); \
done
@for dirs in ${CPP_SUBDIRS}; do \
(echo "Entering $$dirs"; cd $$dirs; rm -rf *.lib *.obj *.exp;); \
done