Revision 057de21703a1c1e664e49aec23f254f3b771954d authored by Philippe Canal on 27 January 2016, 23:15:58 UTC, committed by Philippe Canal on 27 January 2016, 23:16:29 UTC
1 parent 768daac
Makefile.win64gcc
# -*- mode: makefile -*-
#
# Makefile of ROOT for Windows with gcc compiler in Cygwin environment
PLATFORM = linux
DEBUGFLAGS = -g
OPTFLAGS = -O2 -DNDEBUG
ifeq (debug,$(findstring debug,$(ROOTBUILD)))
OPT = $(DEBUGFLAGS)
NOOPT =
else
OPT = $(OPTFLAGS)
NOOPT =
endif
ifeq ($(CXX14),yes)
CXX11FLAGS = -std=gnu++1y
else
CXX11FLAGS = -std=gnu++11
endif
# Compiler:
CXX = g++
CC = gcc
CXXFLAGS = $(CXX11FLAGS) -pipe -Wshadow -Wall -Woverloaded-virtual $(EXTRA_CXXFLAGS) \
-I/usr/X11R6/include $(USERCONF_CXXFLAGS)
CFLAGS = -pipe -Wshadow -Wall $(EXTRA_CFLAGS) -I/usr/X11R6/include $(USERCONF_CFLAGS)
COMPILER = gnu
# Linker:
LD = $(ROOT_SRCDIR)/build/unix/wingcc_ld.sh
LDFLAGS = $(OPT) -Wl,--enable-auto-import \
-Wl,--enable-runtime-pseudo-reloc \
-L/usr/X11R6/lib \
$(EXTRA_LDFLAGS)
SOFLAGS = -shared -Wl,--export-all-symbols -Wl,--enable-auto-image-base \
-Wl,-soname=
# that's what cygwin ld looks for when searching for shared libs
SOEXT = dll
EXEEXT = .exe
FORCELINK = yes
# System libraries:
SYSLIBS = -lm $(OSTHREADLIBDIR) $(OSTHREADLIB) $(ALLOCLIBDIR) $(ALLOCLIB)
XLIBS = $(XPMLIBDIR) $(XPMLIB) $(X11LIBDIR) -lXext -lX11
CILIBS = -lm
CRYPTLIBS = -lcrypt
# Fortran:
ifneq ($(findstring gfortran, $(F77)),)
ifeq ($(F77),)
# only needed to get default compiler in ./configure
F77 = gfortran
endif
F77FLAGS = -std=legacy
F77LIBS := $(shell $(F77) -print-file-name=libgfortran.a)
F77LIBS += $(shell $(F77) -print-file-name=libgfortranbegin.a)
endif
ifneq ($(findstring g77, $(F77)),)
ifeq ($(F77),)
# only needed to get default compiler in ./configure
F77 = g77
endif
F77FLAGS =
F77LIBS = -lg2c
endif
# transform cygwin version 1.2.3-4 into integer
# each of the four version parts but the first gets two digits,
# filled up with 0 if necessary (i.e. if a version part only
# has one digit), and removing ".", "-"
# thus, 1.2.3-4 becomes 1020304, 12.3.45-67 becomes 12034567
CYGWINVERSION = $(shell cygcheck -c cygwin | egrep '^cygwin' \
| sed 's,^[^[:digit:]]\+\([^[:space:]]\+\).*$$,\1,' \
| sed 's,[.-]\([[:digit:]]\)\($$\|[^[:digit:]]\),0\1,g' \
| sed 's,[.-],,g' )
# test whether the cygwin version is newer than 1051201 (i.e. 1.5.12-1)
CYGVER1051201 = $(shell test $(CYGWINVERSION) -ge 1051201 \
&& echo $(CYGWINVERSION) )
# Extras
ifeq ($(CYGVER1051201),)
POSTBIN += rebase
endif
Computing file changes ...