# -*- mode: makefile -*- # # Makefile of ROOT for Windows with gcc compiler in Cygwin environment PLATFORM = linux DEBUGFLAGS = -g OPTFLAGS = -O2 ifeq (debug,$(findstring debug,$(ROOTBUILD))) OPT = $(DEBUGFLAGS) NOOPT = else OPT = $(OPTFLAGS) NOOPT = endif # Compiler: CXX = g++ CC = gcc CXXFLAGS = -pipe -Wall -Woverloaded-virtual $(EXTRA_CXXFLAGS) \ -I/usr/X11R6/include CFLAGS = -pipe -Wall $(EXTRA_CFLAGS) -I/usr/X11R6/include CINTCXXFLAGS = -pipe -Wall -Woverloaded-virtual $(EXTRA_CXXFLAGS) \ -DG__REGEXP -DG__UNIX -DG__SHAREDLIB \ -DG__OSFDLL -DG__ROOT -DG__REDIRECTIO -DG__CYGWIN \ -DG__NEWSTDHEADER CINTCFLAGS = -pipe -Wall $(EXTRA_CFLAGS) \ -DG__REGEXP -DG__UNIX -DG__SHAREDLIB \ -DG__OSFDLL -DG__ROOT -DG__REDIRECTIO -DG__CYGWIN \ -DG__NEWSTDHEADER 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