0

I read OS detecting makefile, but I'd rather have two different Makefile, one for Windows and one for Linux, and source them from inside the main Makefile. Something like:

ifeq ($(OS),Windows_NT)
    # run the commands in the MakefileWin file
else
    # run the commands in the MakefileLinux file
endif

Is it possible without a shell script, just using make commands? Thanks

mg979
  • 43
  • 5

1 Answers1

4

Why not just use include?

ifeq ($(OS),Windows_NT)
  include Makefilewin
else
  include MakefileLinux
endif

?

MadScientist
  • 92,819
  • 9
  • 109
  • 136