Ticket #1557: patch-preview.txt

File patch-preview.txt, 1.7 KB (added by marco.schmidt@…, 4 years ago)

Added by email2trac

Line 
1
2[aimk changes needed for cygwin compile
3Marco Schmidt <marco.schmidt@gmail.com>**20150918104850
4 Ignore-this: 6d2cbcbcc3fd2633cca2ee3895a71fcf
5] hunk ./source/aimk 1631
6    if ($GPROFFED == 1) then
7       set DEBUG_FLAG = "$DEBUG_FLAG -pg"
8    endif
9+   # in cygwin add tirpc include path and library
10+   set CFLAGS = "$CFLAGS -I/usr/include/tirpc"
11+   set LIBS = "$LIBS -ltirpc"
12    # For now, kludge by treating Cygwin as "LINUX" and special-casing
13    # where necessary
14    set CFLAGS = "$OFLAG -Wall -Wstrict-prototypes -DLINUX -D_GNU_SOURCE -DGETHOSTBYNAME -DGETHOSTBYADDR -DHAVE_XDR_H=1 $DEBUG_FLAG $CFLAGS"
15hunk ./source/aimk 1649
16    set XINCD    = "$XMTINCD $XINCD -I/usr/X11R6/include"
17    set XCFLAGS  = "-Wno-strict-prototypes -Wno-error $XMTDEF $XINCD"
18    set XLIBS    = "-lXm -lXt -lXext -lXmu -lX11 -lSM -lICE"
19-   set SHARED_LFLAGS = "$SHARED_LFLAGS -L."
20+   # without the -shared flag, linking all dynamic libs (*.dll) complain about missing "main"
21+   set SHARED_LFLAGS = "$SHARED_LFLAGS -L. -shared"
22    set CFLAGS = "$CFLAGS -D_FILE_OFFSET_BITS=64"
23    set SHAREDEXT = .dll
24    set HWLOC = 1
25hunk ./source/aimk 2649
26 
27    set SGE_LIBS = "-lsge -lpthread"
28 
29-   if ( "$COMPILE_ARCH" == "WIN32_X86" ) then
30-      set SGE_LIBS = "$SGE_LIBS $WINGRIDLIB"
31-   endif
32+   switch ( $COMPILE_ARCH )
33+      case WIN32_X86:
34+         set SGE_LIBS = "$SGE_LIBS $WINGRIDLIB"
35+         breaksw
36+      case CYGWIN_X86:
37+      case CYGWIN_X86_64:
38+      # Cygwin needs the tirpc libs which are defined in the common Cygwin part
39+         set SGE_LIBS = "$SGE_LIBS $LIBS"
40+         breaksw
41+   endsw
42 
43    if ( ! -d $SOURCE/3rdparty/qtcsh/$COMPILE_ARCH || \
44        ! -r $SOURCE/3rdparty/qtcsh/$COMPILE_ARCH/Makefile ) then
45