2004-10-27 02:28:35 +04:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2004-11-22 04:38:40 +03:00
|
|
|
# Copyright (c) 2004-2005 The Trustees of Indiana University.
|
|
|
|
# All rights reserved.
|
|
|
|
# Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
|
|
|
# All rights reserved.
|
|
|
|
# $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 02:28:35 +04:00
|
|
|
#
|
|
|
|
|
2004-10-29 02:21:20 +04:00
|
|
|
gen_base = ${topdir}/src/win32/generated_include
|
|
|
|
copy_base = ${topdir}/src/mca/
|
2004-11-01 17:44:14 +03:00
|
|
|
install_dir = ${prefix}
|
2004-10-27 02:28:35 +04:00
|
|
|
|
|
|
|
# list of components to build with the c compiler
|
|
|
|
C_SUBDIRS = \
|
|
|
|
allocator/bucket \
|
|
|
|
coll/basic \
|
|
|
|
llm/hostfile/src \
|
|
|
|
ns/proxy/src \
|
2004-10-29 02:21:20 +04:00
|
|
|
gpr/proxy/ \
|
2004-10-27 02:28:35 +04:00
|
|
|
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 = \
|
2004-10-28 22:13:43 +04:00
|
|
|
ptl/tcp/src \
|
|
|
|
oob/tcp/ \
|
|
|
|
pml/teg/src \
|
2004-10-29 02:21:20 +04:00
|
|
|
ns/replica/src \
|
|
|
|
gpr/replica/
|
2004-10-27 02:28:35 +04:00
|
|
|
|
|
|
|
#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 \
|
2004-11-01 17:44:14 +03:00
|
|
|
/DOMPI_SYSCONFDIR="\"${install-dir}/share\"" \
|
2004-10-28 22:13:43 +04:00
|
|
|
/nologo \
|
2004-10-27 02:28:35 +04:00
|
|
|
/c
|
|
|
|
|
|
|
|
CPPFLAGS = \
|
|
|
|
/DWIN32 \
|
2004-11-01 17:44:14 +03:00
|
|
|
/DOMPI_SYSCONFDIR="\"${install-dir}/share\"" \
|
2004-10-27 02:28:35 +04:00
|
|
|
/c \
|
|
|
|
/TP \
|
2004-10-28 22:13:43 +04:00
|
|
|
/nologo \
|
2004-10-27 02:28:35 +04:00
|
|
|
/EHsc
|
|
|
|
|
|
|
|
# link with ompi.lib to resolve external symbols
|
|
|
|
OMPILIB = \
|
2004-10-28 22:13:43 +04:00
|
|
|
"${topdir}/src/libmpi.lib"
|
2004-10-27 02:28:35 +04:00
|
|
|
|
|
|
|
LINK = link
|
|
|
|
|
|
|
|
LINKFLAGS = \
|
|
|
|
/DLL \
|
2004-10-28 22:13:43 +04:00
|
|
|
/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
|
2004-10-27 02:28:35 +04:00
|
|
|
|
|
|
|
all: \
|
|
|
|
clibs \
|
|
|
|
cpplibs
|
|
|
|
|
2004-10-29 02:21:20 +04:00
|
|
|
prebuild:
|
2004-11-02 17:00:31 +03:00
|
|
|
@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/'
|
2004-10-29 02:21:20 +04:00
|
|
|
|
|
|
|
|
|
|
|
clibs: ${C_SUBDIRS} prebuild
|
2004-10-27 02:28:35 +04:00
|
|
|
@for dirs in ${C_SUBDIRS}; do \
|
2004-11-01 17:44:14 +03:00
|
|
|
(libname=`echo mca_$${dirs}.dll | sed 's/\/src[\/]*//g' | sed 's/\//_/g' | sed 's/_\./\./g'` ; cd $$dirs; ${CC} ${CFLAGS} ${INCL} *.c; ${LINK} ${LINKFLAGS} ${ADDLIBS} /OUT:$${libname} *.obj); \
|
2004-10-27 02:28:35 +04:00
|
|
|
done
|
|
|
|
|
2004-10-29 02:21:20 +04:00
|
|
|
cpplibs: ${CPP_SUBDIRS} prebuild
|
2004-10-27 02:28:35 +04:00
|
|
|
@for dirs in ${CPP_SUBDIRS}; do \
|
2004-11-01 17:44:14 +03:00
|
|
|
(libname=`echo mca_$${dirs}.dll | sed 's/\/src[\/]*//g' | sed 's/\//_/g' | sed 's/_\./\./g'` ; cd $$dirs; ${CC} ${CPPFLAGS} ${INCL} *.c; ${LINK} ${LINKFLAGS} ${ADDLIBS} /OUT:$${libname} *.obj); \
|
2004-10-27 02:28:35 +04:00
|
|
|
done
|
|
|
|
|
2004-11-01 17:44:14 +03:00
|
|
|
install:
|
|
|
|
@echo -n "Installing components ......................."
|
|
|
|
@for dirs in ${CPP_SUBDIRS}; do \
|
|
|
|
(dll=`echo mca_$${dirs}.dll | sed 's/\/src//g' | sed 's/\//_/g'`; exp=`echo $${dll} | sed 's/dll/exp/g`; lib=`echo $${dll} | sed 's/dll/lib/g`; \
|
|
|
|
install -c ${CURDIR}/$${dirs}/$${dll} ${install_dir}/$${dll}; \
|
|
|
|
if test -f ${CURDIR}/$${dirs}/$${lib}; then install -c ${CURDIR}/$${dirs}/$${lib} ${install_dir}/$${lib}; fi; \
|
|
|
|
if test -f ${CURDIR}/$${dirs}/$${exp}; then install -c ${CURDIR}/$${dirs}/$${exp} ${install_dir}/$${exp}; fi;); \
|
|
|
|
done
|
|
|
|
@for dirs in ${C_SUBDIRS}; do \
|
|
|
|
(dll=`echo mca_$${dirs}.dll | sed 's/\/src//g' | sed 's/\//_/g'`; exp=`echo $${dll} | sed 's/dll/exp/g`; lib=`echo $${dll} | sed 's/dll/lib/g`; \
|
|
|
|
install -c ${CURDIR}/$${dirs}/$${dll} ${install_dir}/$${dll}; \
|
|
|
|
if test -f ${CURDIR}/$${dirs}/$${lib}; then install -c ${CURDIR}/$${dirs}/$${lib} ${install_dir}/$${lib}; fi; \
|
|
|
|
if test -f ${CURDIR}/$${dirs}/$${exp}; then install -c ${CURDIR}/$${dirs}/$${exp} ${install_dir}/$${exp}; fi;); \
|
|
|
|
done
|
|
|
|
@echo "done"
|
|
|
|
|
2004-10-27 02:28:35 +04:00
|
|
|
.PHONY: clean
|
|
|
|
|
|
|
|
clean:
|
|
|
|
@for dirs in ${C_SUBDIRS}; do \
|
|
|
|
(echo "Entering $$dirs"; cd $$dirs; rm -rf *.lib *.obj *.exp;); \
|
|
|
|
done
|
2004-10-28 22:13:43 +04:00
|
|
|
@for dirs in ${CPP_SUBDIRS}; do \
|
2004-10-27 02:28:35 +04:00
|
|
|
(echo "Entering $$dirs"; cd $$dirs; rm -rf *.lib *.obj *.exp;); \
|
|
|
|
done
|