Re: make & nmake, cl & gcc
- From: Tim Prince <timothyprince@xxxxxxxxxxxxx>
- Date: Fri, 30 Nov 2007 14:27:03 GMT
Khookie wrote:
I'm required to write an app that can compile on both Windows (cl/
nmake) & Linux (gcc/make) targets, so I was wondering whether anyone
has any guidelines on how to do it properly.
I'd continue the traditional way, just supply a (gnu) Makefile for each
compiler. nmake is pointless, as support for it was cut way back on
current Windows systems. A Makefile I set up yesterday starts out
CCIFLAGS = -O3 -Qrestrict -Qopenmp -Qopenmp-lib:compat -Qansi_alias -QxW
CCMFLAGS = /Ox /EHsc /GL- /Drestrict= /favor:EM64T /openmp
CXXM = cl
CXXI = icl
CCM = cl
CCI = icl
FC = ifort
..SUFFIXES: .obj
...
If you don't need to support 2 brands of C in the same Makefile, or you
have a smarter method, it can be a lot cleaner.
By the way, the gcc/g++/gfortran Makefile works for all of Windows-32
and linux32/64.
.
- References:
- make & nmake, cl & gcc
- From: Khookie
- make & nmake, cl & gcc
- Prev by Date: Re: about string and character
- Next by Date: conditional compile...
- Previous by thread: Re: make & nmake, cl & gcc
- Next by thread: LDBL_MAX -1.#QNAN0e+000 with MinGW?
- Index(es):
Relevant Pages
|