Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Origin

NMAKE vs. MAKE - Compatibility?

This topic is 5600 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is it possible to write cross-platform makefiles that work both with Unix make utilites (like GNU make) and Mirosoft nmake? I have this simple test which determines which macro definitions to load:
Platform = Win32

ifeq ($(OSTYPE),linux)
    Platform = Linux
endif

ifeq ($(OSTYPE),linux-gnu)
    Platform = Linux
endif

ifeq ($(OSTYPE),Linux)
    Platform = Linux
endif

include ../Makefile.$(Platform).cfg  
However, Microsoft nmake doesn't want to parse that file. It can't understand the ifeq/endif directives. The corresponding file working with nmake looks like that:
Platform = Win32

!if "$(OSTYPE)" == "linux"
    Platform = Linux
!endif

!if "$(OSTYPE)" == "linux-gnu"
    Platform = Linux
!endif

!if "$(OSTYPE)" == "Linux"
    Platform = Linux
!endif

include Makefile.$(Platform).cfg  
Is it possible to overcome these incompatibilities? Maybe you wouldn't even support the Microsoft tool, just the standard make syntax? Tell me more... Thanks. [edited by - Origin on January 22, 2003 3:01:21 PM]

Share this post


Link to post
Share on other sites
Advertisement
Well, considering gmake exists on windows platforms, I''d say the incompatibilities are fairly easy to overcome

Share this post


Link to post
Share on other sites
quote:
Original post by CmndrM
Well, considering gmake exists on windows platforms, I''d say the incompatibilities are fairly easy to overcome
That was not the answer I intended to get.

Share this post


Link to post
Share on other sites
quote:
Original post by Origin
That was not the answer I intended to get.

Well, that''s the answer you got

Seriously, though, I don''t know too much about nmake makefiles, so I can''t help you out there. I still say the easiest solution to cross-platformability is to use gmake makefiles for all systems, since gmake exists on every platform that I''ve ever heard of.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!