summaryrefslogtreecommitdiff
path: root/lib/make/known-architectures/cygwin
blob: a35b397afe89f5ed7043423c28955ba45c9e03b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
#! /bin/sh
# /*@@
#   @file      cygwin
#   @date      Thu Jun 24 22:56:51 1999
#   @author    Tom Goodale
#   @desc 
#   First stab at a know architecture file for cygwin from
#   examination of Joan's changes.
#   @enddesc 
#   @version $Header$
# @@*/

if test "$CCTK_CONFIG_STAGE" = "preferred-compilers" ; then

  if test -z "$CC"; then
    echo Setting C compiler to cl
    CC="cl"
  fi

  if test -z "$CXX"; then
    echo Setting C++ compiler to cl
    CXX="cl /TP"
  fi

  if test -z "$LD"; then
    echo Setting linker to f90
    LD="f90"
  fi

else

# /Gd means use __cdecl, it's /Gz for __stdcall

  if test -z "$CFLAGS"; then
    CFLAGS="/nologo /Oxy- /Gd"
  fi

  if test -z "$CXXFLAGS" ; then 
    CXXFLAGS="/nologo /Oxy- /Gd"
  fi

  if test -z "$F90FLAGS" ; then 
    F90FLAGS="/fast /iface:cref"
  fi

  CCOMPILEONLY="/c /Fo"
  FCOMPILEONLY="/compile_only /object:"

  CREATEEXE="-exe:"

  SYS_INC_DIRS="/PROGRA~/MICROS~1/VC98/INCLUDE"

  DIRSEP="\\\\"

  OPTIONSEP="# not even a single a single space under cygwin"

# Convert //a to a: 
  GET_WD="pwd | sed 's,^//\(.\)/,\1:/,' | sed 's,/,\\\\\\,g' "

  C_DEPEND='$(CPP) -E -MM -nostdinc $(CPPFLAGS) '

  CXX_DEPEND='$(CPP) -E -MM -nostdinc $(CPPFLAGS) '

  MKDIR="mkdir "
  MKDIRFLAGS=" -p "

  CACTUSLIBLINKLINE='$(addsuffix .a,$(addprefix $(subst /,$(DIRSEP),$(CCTK_LIBDIR))$(DIRSEP)lib,$(notdir $(ALLCACTUSLIBS))))'

# Windows libraries have to explicitly appear on the link line with full name
# So ignore the LIBDIRS variable and don't put flags on.

  GENERAL_LIBRARIES='$(LIBS)' 

# The Windows file system requires perl backup files to be made when
# doing inplace editing
  PERL_BACKUP_NECESSARY='yes'

  cat >> cctk_Archdefs.h <<EOF;

/* WIN stuff */
#define WIN32

EOF

  if test "x$cross_compiling" = "xyes" ; then
    case "$host_cpu" in
      i?86)
        ENDIAN=little
        SIZEOF_LONG_LONG=8
        SIZEOF_LONG_INT=4
        SIZEOF_INT=4
        SIZEOF_SHORT_INT=2

        SIZEOF_LONG_DOUBLE=8
        SIZEOF_DOUBLE=8
        SIZEOF_FLOAT=4

        SIZEOF_POINTER=4
      ;;
      ia64)
        ENDIAN=little
        SIZEOF_LONG_LONG=8
        SIZEOF_LONG_INT=8
        SIZEOF_INT=4
        SIZEOF_SHORT_INT=2

        SIZEOF_LONG_DOUBLE=8
        SIZEOF_DOUBLE=8
        SIZEOF_FLOAT=4

        SIZEOF_POINTER=8
      ;;
      *)
        echo "Don't know details for cross-compilation to $host_cpu"
    esac
  fi

# MPI stuff
#
# Linux has no native MPI, so we don't set any NATIVE_MPI_XXX variables.
# This is caught by lib/make/extras/MPI/NATIVE then.

fi