# file: mingw.def I. Henry and G. Moody 11 February 2005 # Last revised: 8 March 2017 # # This file contains default 'make' definitions for compiling the WFDB Software # Package under MS Windows using the free Mininmalist GNU for Windows (MinGW) # gcc ANSI C compiler, availble from http://www.mingw.org/ and from # http://www.cygwin.com/. To use this successfully, you need to have installed # MinGW # # Choose a value for WFDBROOT to determine where the WFDB Software Package will # be installed. One of the following is usually a reasonable choice. # Installing in /usr generally requires root permissions, but will be easiest # for future software development (no special -I or -L options will be needed # to compile software with the WFDB library, since the *.h files and the # library will be installed in the standard directories). WFDBROOT = /usr # Installing in /usr/local usually requires root permissions. On a multi-user # system where it is desirable to keep the OS vendor's software separate from # other software, this is a good choice. Another common choice in such cases # is /opt . # WFDBROOT = /usr/local # To install without root permissions, a good choice is to set WFDBROOT to the # name of your home directory, as in the example below (change as needed). # WFDBROOT = /home/frodo # LC and LL are used to determine C compiler and linker options needed to # enable NETFILES (code that allows applications linked to the WFDB library to # read input from HTTP and FTP servers, in addition to the standard filesystem # support available without NETFILES). The WFDB library can use either # libcurl (recommended) or libwww to provide NETFILES support. To use libcurl, # set LC to `curl-config --cflags` (note the backquotes) and LL to # `curl-config --libs`. Otherwise, to use libwww, set LC to # `libwww-config --cflags` and LL to `libwww-config --libs`. If neither # libcurl nor libwww is available, LC and LL should be empty (and NETFILES # will be disabled). LC = LL = # BINDIR specifies the directory in which the applications will be installed; # it should be a directory in the PATH of those who will use the applications. BINDIR = $(WFDBROOT)/bin # DBDIR specifies the name of a directory in which to install the contents # of the `data' directory. DBDIR = $(WFDBROOT)/database # INCDIR specifies the name of a directory in which to install the WFDB # library's #include <...> files. INCDIR = $(WFDBROOT)/include # INFODIR is the GNU info directory (optional, needed to `make info'). INFODIR = $(WFDBROOT)/info # LIBDIR specifies the name of a directory in which to install the WFDB # library. Under Windows, this is the same as BINDIR (above). LIBDIR = $(WFDBROOT)/bin # MANDIR is the root of the man page directory tree. On most systems, this is # something like /usr/man or /usr/local/man (type 'man man' to find out). MANDIR = $(WFDBROOT)/man # PSPDIR specifies the name of a directory in which to install the PostScript # prolog (*.pro) files from the 'app' directory. PSPDIR = $(WFDBROOT)/lib/ps # CC is the name of your C compiler. The WFDB library can be compiled with K&R # C compilers (`cc' on most if not all UNIX systems) as well as with ANSI C # compilers such as GNU C (`gcc'). CC = gcc NOCYGWIN # On systems where `gcc' is the standard C compiler, `gcc' may also be known as # `cc'; in such cases, it doesn't matter if CC is cc or gcc. # CCDEFS is the set of C compiler options needed to set preprocessor variables # while compiling the WFDB Software Package. CCDEFS should always include # VDEFS. Add the following options to CCDEFS as appropriate (separating them # by spaces if you use more than one): # -DISPRINTF if you do not have `stdlib.h' and your `sprintf' returns an # int (see wfdblib.h) # -DMSDOS if the target platform is MS-DOS or MS-Windows without a # POSIX compatibility layer such as Cygwin # -DNETFILES if you have libwww and want to be able to access WFDB files # remotely via http or ftp (as well as local files) # -DNOSTRTOK if your standard C library does not include function `strtok' # (see wfdbio.c) # -DNOTIME if you do not have `time.h' (see signal.c) # -DNOVALUES_H if you do not have `values.h' (see psd/log10.c) # -DOLDC if you have neither `stdarg.h' nor `varargs.h' (see wfdbio.c) # If your C compiler fails to compile `signal.c', add -DBROKEN_CC to CCDEFS # and try again (see signal.c). CCDEFS = $(VDEFS) -DMSDOS -DNOVALUES_H -DNOMKSTEMP # MFLAGS is the set of architecture-dependent (-m*) compiler options, which # is usually empty. See the gcc manual for information about gcc's -m options. MFLAGS = # CFLAGS is the set of C compiler options. CFLAGS should always include # CCDEFS. CFLAGS = $(MFLAGS) -g -O $(CCDEFS) $(LC) -I$(DESTDIR)$(INCDIR) # LDFLAGS is appended to the C compiler command line to specify loading the # WFDB library. LDFLAGS = -L$(DESTDIR)$(LIBDIR) -lwfdb $(LL) # WFDBLIB is the name of the standard WFDB library. In order to access it via # `-lwfdb', WFDBLIB should be `libwfdb.a'. WFDBLIB = libwfdb.a # If your system requires indexed libraries, uncomment the next line. RANLIB = ranlib # Otherwise, uncomment the next line. # RANLIB = : # AR is the name of the command used to build a standard library from `.o' # files, and ARFLAGS is the set of options used when doing so. AR and ARFLAGS # are usually `make' builtins and need not be defined here; under HP UX, and # perhaps other versions of UNIX, however, you will need to define these # variables by uncommenting the next two lines. # AR = ar # ARFLAGS = rv # BUILDLIB is the command that creates the static WFDB library once its # components have been compiled separately; the list of *.o files that # make up the library will be appended to BUILDLIB. BUILDLIB = $(AR) $(ARFLAGS) $(WFDBLIB) # PRINT is the name of the program used to produce listings (including any # options for the desired formatting). PRINT = lpr # SETPERMISSIONS is the command needed to make the installed files accessible # to those who will use them. The value given below makes them readable by # everyone, and writeable by the owner only. (If you perform the installation # as `root', `root' is the owner of the installed files.) SETPERMISSIONS = chmod 644 # SETDPERMISSIONS is similarly used to make directories created during the # installation accessible. SETDPERMISSIONS = chmod 755 # SETLPERMISSIONS is the command needed to make the WFDB library usable by # programs linked to it. SETLPERMISSIONS = chmod 644 # SETXPERMISSIONS is the command needed to make the applications accessible. SETXPERMISSIONS = $(SRCDIR)/conf/exechmod 755 # STRIP is the command used to compact the compiled binaries by removing their # symbol tables. 'exestrip' is a script that appends the '.exe' suffix to the # files in its argument list before passing their names to 'strip' itself. STRIP = $(SRCDIR)/conf/exestrip # To retain the symbol tables for debugging, comment out the previous line, and # uncomment the next line. # STRIP = : # RM is the command used to delete binaries. 'exerm' is a script that appends # the '.exe' suffix to the files in its argument list before deleting. RM = $(SRCDIR)/conf/exerm # ........................................................................... # This section of definitions is used only when compiling WAVE, which is # possible only if the XView and Xlib libraries and include files have been # installed. This is not currently possible using mingw, and is unlikely to # become possible in the future, although it can be done using cygwin. # OPENWINHOME specifies the root directory of the OpenWindows hierarchy. # This is usually /usr/openwin. OPENWINHOME = /usr/openwin # OWINCDIR is the directory in which the `xview' directory containing XView # *.h files is found. OWINCDIR = $(OPENWINHOME)/include # OWLIBDIR is the directory in which the XView library is found. OWLIBDIR = $(OPENWINHOME)/lib # XHOME specifies the root directory of the X11 hierarchy. # This is usually /usr/X11R6 (or /usr/X11). XHOME = /usr/X11R6 # XINCDIR is the directory in which the 'X11' directory containing X11 *.h # files is found. This is usually /usr/X11R6/include, although there is often # a link connecting /usr/include/X11 to this directory. XINCDIR = $(XHOME)/include # XLIBDIR is the directory in which the X11 libraries are found. XLIBDIR = $(XHOME)/lib # WCFLAGS is the set of C compiler options to use when compiling WAVE. WCFLAGS = $(CFLAGS) -I$(OWINCDIR) -I$(XINCDIR) # HELPOBJ can be set to "help.o" if you wish to recompile the XView spot help # functions in "wave/help.c" (recommended under Linux). # HELPOBJ = help.o # Otherwise, use the version in libxview by uncommenting the next line: HELPOBJ = # WLDFLAGS is the set of loader options appended to the C compiler command line # to specify loading the WFDB, XView, and Xlib libraries. WLDFLAGS = $(LDFLAGS) -L$(OWLIBDIR) -L$(XLIBDIR) -lxview -lolgx -lX11 # ........................................................................... # `make' (with no target specified) will be equivalent to `make all'. make-all: all # `make lib-post-install' should be run after installing the WFDB library. lib-post-install: echo "Nothing to be done for lib-post-install" lib-post-uninstall: echo "Nothing to be done for lib-post-uninstall" # _____________________________________________________________________________