2004-10-27 02:28:35 +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 02:28:35 +04:00
|
|
|
#
|
|
|
|
|
2005-01-25 23:01:06 +03:00
|
|
|
topdir := $(shell cygpath -m $(CURDIR))/../..
|
2004-10-29 02:21:20 +04:00
|
|
|
gen_base = ${topdir}/src/win32/generated_include
|
|
|
|
copy_base = ${topdir}/src/mca/
|
2005-01-26 22:43:39 +03:00
|
|
|
prefix = ${topdir}/src/Debug
|
2005-01-27 03:13:44 +03:00
|
|
|
installdir = ${topdir}/src/Debug/lib
|
2004-10-27 02:28:35 +04:00
|
|
|
|
|
|
|
# list of components to build with the c compiler
|
|
|
|
C_SUBDIRS = \
|
|
|
|
allocator/bucket \
|
|
|
|
coll/basic \
|
2005-05-09 20:23:00 +04:00
|
|
|
topo/unity
|
2004-10-27 02:28:35 +04:00
|
|
|
|
|
|
|
# list of components to build with the cpp compiler
|
|
|
|
# (because of the problem with OBJ_CLASS_INSTANCE)
|
|
|
|
CPP_SUBDIRS = \
|
2005-01-26 22:21:13 +03:00
|
|
|
allocator/basic \
|
|
|
|
ptl/self \
|
2005-06-14 01:41:25 +04:00
|
|
|
ptl/tcp \
|
2005-01-26 22:43:39 +03:00
|
|
|
oob/tcp \
|
2004-10-29 02:21:20 +04:00
|
|
|
ns/replica/src \
|
2005-05-02 19:27:54 +04:00
|
|
|
ns/proxy/src \
|
2005-05-13 20:55:14 +04:00
|
|
|
gpr/proxy
|
2004-10-27 02:28:35 +04:00
|
|
|
|
|
|
|
#list of components that are not working as yet
|
2005-01-25 23:01:06 +03:00
|
|
|
CPP_EXCLUDE = pcm/wmi
|
2004-10-27 02:28:35 +04:00
|
|
|
|
|
|
|
CC = cl
|
|
|
|
|
|
|
|
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 02:28:35 +04:00
|
|
|
/I"${topdir}/src" \
|
2005-01-25 23:01:06 +03:00
|
|
|
/I"${topdir}/src/event/compat/" \
|
|
|
|
/I"${topdir}/src/event" \
|
|
|
|
/I"${topdir}/src/event/WIN32-Code/"
|
2004-10-27 02:28:35 +04:00
|
|
|
|
|
|
|
CFLAGS = \
|
|
|
|
/DWIN32 \
|
2005-01-25 23:01:06 +03:00
|
|
|
/DHAVE_CONFIG_H \
|
|
|
|
/DOMPI_SYSCONFDIR="\"${installdir}/share\"" \
|
2005-05-09 20:23:00 +04:00
|
|
|
/DOMPI_BUILDING_WIN_DSO=1 \
|
2005-01-25 23:01:06 +03:00
|
|
|
/EHsc \
|
2005-01-27 03:13:44 +03:00
|
|
|
/ML \
|
2005-01-25 23:01:06 +03:00
|
|
|
/W0 \
|
|
|
|
/Wp64 \
|
|
|
|
/TC \
|
|
|
|
/D_MBCS \
|
2005-01-27 03:13:44 +03:00
|
|
|
/LD\
|
2004-10-28 22:13:43 +04:00
|
|
|
/nologo \
|
2005-01-25 23:01:06 +03:00
|
|
|
/c
|
2004-10-27 02:28:35 +04:00
|
|
|
|
|
|
|
CPPFLAGS = \
|
|
|
|
/DWIN32 \
|
|
|
|
/TP \
|
2005-01-25 23:01:06 +03:00
|
|
|
/DHAVE_CONFIG_H \
|
|
|
|
/DOMPI_SYSCONFDIR="\"${installdir}/share\"" \
|
2005-05-09 20:23:00 +04:00
|
|
|
/DOMPI_BUILDING_WIN_DSO=1 \
|
2005-01-25 23:01:06 +03:00
|
|
|
/EHsc \
|
2005-01-27 03:13:44 +03:00
|
|
|
/ML \
|
2005-01-25 23:01:06 +03:00
|
|
|
/W0 \
|
|
|
|
/Wp64 \
|
|
|
|
/D_MBCS \
|
2005-01-27 03:13:44 +03:00
|
|
|
/LD \
|
2004-10-28 22:13:43 +04:00
|
|
|
/nologo \
|
2005-01-25 23:01:06 +03:00
|
|
|
/c
|
2004-10-27 02:28:35 +04:00
|
|
|
|
|
|
|
# link with ompi.lib to resolve external symbols
|
2005-01-27 03:13:44 +03:00
|
|
|
#OMPILIB = \
|
2005-05-09 20:23:00 +04:00
|
|
|
# "${topdir}/vcproj/ompi/Debug/libmpi.lib"
|
2005-01-27 03:13:44 +03:00
|
|
|
|
2004-10-27 02:28:35 +04:00
|
|
|
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 \
|
2005-01-26 22:21:13 +03:00
|
|
|
/OPT:NOICF \
|
|
|
|
/OPT:NOREF \
|
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 \
|
2005-05-13 20:55:14 +04:00
|
|
|
cpplibs \
|
|
|
|
special
|
2004-10-27 02:28:35 +04:00
|
|
|
|
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}/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 \
|
2005-06-14 01:41:25 +04:00
|
|
|
(libname=`echo mca_$${dirs}.dll | sed 's/\/src[\/]*//g' | sed 's/\//_/g' | sed 's/_\./\./g'` ; \
|
|
|
|
cd $$dirs; \
|
|
|
|
echo ${CC} ${CPPFLAGS} ${INCL} *.c; \
|
|
|
|
${CC} ${CFLAGS} ${INCL} *.c; \
|
|
|
|
echo ${LINK} ${LINKFLAGS} ${ADDLIBS} /OUT:$${libname} *.obj; \
|
|
|
|
${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 \
|
2005-06-14 01:41:25 +04:00
|
|
|
(libname=`echo mca_$${dirs}.dll | sed 's/\/src[\/]*//g' | sed 's/\//_/g' | sed 's/_\./\./g'` ; \
|
|
|
|
cd $$dirs; \
|
|
|
|
echo ${CC} ${CPPFLAGS} ${INCL} *.c; \
|
|
|
|
${CC} ${CPPFLAGS} ${INCL} *.c; \
|
|
|
|
echo ${LINK} ${LINKFLAGS} ${ADDLIBS} /OUT:$${libname} *.obj; \
|
|
|
|
${LINK} ${LINKFLAGS} ${ADDLIBS} /OUT:$${libname} *.obj); \
|
2004-10-27 02:28:35 +04:00
|
|
|
done
|
|
|
|
|
2005-05-13 20:55:14 +04:00
|
|
|
special: prebuild
|
2005-06-14 01:41:25 +04:00
|
|
|
(cd gpr/replica/api_layer; echo ${CC} ${CPPFLAGS} ${INCL} *.c; ${CC} ${CPPFLAGS} ${INCL} *.c);
|
|
|
|
(cd gpr/replica/communications; echo ${CC} ${CPPFLAGS} ${INCL} *.c; ${CC} ${CPPFLAGS} ${INCL} *.c);
|
2005-05-13 20:55:14 +04:00
|
|
|
(cd gpr/replica/functional_layer; echo ${CC} ${CPPFLAGS} ${INCL} *.c; ${CC} ${CPPFLAGS} ${INCL} *.c);
|
|
|
|
(cd gpr/replica/transition_layer; echo ${CC} ${CPPFLAGS} ${INCL} *.c; ${CC} ${CPPFLAGS} ${INCL} *.c);
|
2005-06-14 01:41:25 +04:00
|
|
|
(cd gpr/replica; echo ${CC} ${CPPFLAGS} ${INCL} *.c; ${CC} ${CPPFLAGS} ${INCL} *.c; \
|
|
|
|
echo ${LINK} ${LINKFLAGS} ${ADDLIBS} /OUT:$${libname} *.obj; ${LINK} ${LINKFLAGS} ${ADDLIBS} /OUT:mca_gpr_replica *.obj transition_layer/*.obj functional_layer/*.obj communications/*.obj api_layer/*.obj);
|
2005-05-13 20:55:14 +04:00
|
|
|
|
2005-01-26 22:43:39 +03:00
|
|
|
install: win_makefile
|
2004-11-01 17:44:14 +03:00
|
|
|
@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`; \
|
2005-01-26 22:43:39 +03:00
|
|
|
install -d ${CURDIR}/$${dirs}/ ${installdir}; \
|
|
|
|
install -p ${CURDIR}/$${dirs}/$${dll} ${installdir}/$${dll}; \
|
|
|
|
if test -f ${CURDIR}/$${dirs}/$${lib}; then install -p ${CURDIR}/$${dirs}/$${lib} ${installdir}/$${lib}; fi; \
|
|
|
|
if test -f ${CURDIR}/$${dirs}/$${exp}; then install -p ${CURDIR}/$${dirs}/$${exp} ${installdir}/$${exp}; fi;); \
|
2004-11-01 17:44:14 +03:00
|
|
|
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`; \
|
2005-01-26 22:43:39 +03:00
|
|
|
install -d ${CURDIR}/$${dirs}/ ${installdir}; \
|
|
|
|
install -p ${CURDIR}/$${dirs}/$${dll} ${installdir}/$${dll}; \
|
|
|
|
if test -f ${CURDIR}/$${dirs}/$${lib}; then install -p ${CURDIR}/$${dirs}/$${lib} ${installdir}/$${lib}; fi; \
|
|
|
|
if test -f ${CURDIR}/$${dirs}/$${exp}; then install -p ${CURDIR}/$${dirs}/$${exp} ${installdir}/$${exp}; fi;); \
|
2004-11-01 17:44:14 +03:00
|
|
|
done
|
|
|
|
@echo "done"
|
2005-05-12 00:21:10 +04:00
|
|
|
|
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
|