Re: make & nmake, cl & gcc



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.
.



Relevant Pages

  • Re: vcbuild usage questions
    ... and .vcproj files will be created and put somewhere, ... command lines in my nmake makefiles to use vcbuild. ... which means I "can't get nmake to invoke vcbuild only when the ... nmake makefile to build the ProjectName project? ...
    (microsoft.public.vc.language)
  • Build for Windows Mobile Failed
    ... I successfully ran configure.bat (without an architecture type as ... I ran nmake and he complaint following: ... Copyright Microsoft Corp 1988-1998. ... Opened the makefile in my editor and look up the line. ...
    (comp.lang.ruby)
  • Window not visible
    ... But compiling with VC6 my application window is invisible. ... Nmake -f makefile ... Attached are the source code and ... the makefile I am using to compile code. ...
    (microsoft.public.vc.ide_general)
  • VS7, nmake, standard includes
    ... and included makefile for VS7 nmake under Windows. ... installation of VS7, but I used the company's install system (seems to ... test program with associated makefile for nmake, ...
    (microsoft.public.vstudio.general)
  • Re: nmake not creating object files
    ... so i created a makefile and use nmake to compile the ... i don't have to recompile both debug and release by the ... the problem i have is out of nowhere nmake won't compile an object ... May 30 2008 20:17:40 Makefile ...
    (microsoft.public.vc.language)