Migrating makefiles from Unix to Windows

In summary, TylerH. found that he needed to use Cygwin in order to use make on Windows Vista, and he found that make works just fine.
  • #1
zevik
5
0
How do I use a Unix-originated makefile on Windows Vista? Is there any simple guidelines for migrating the makefile such that it works?
 
Technology news on Phys.org
  • #2
Um... it depends... 1st thing I'd try would be Cygwin. That would probably be the only thing I'd try under Windows. Migrating... just no! Without a POSIX subsystem(like Cygwin/Interix), there just isn't a feasible way to do it.

The problem comes from the fact that Windows and *nix are totally different, and almost completely incompatible. The makefile is likely to depend on certain executable that come standard on *nix being on your system, but they won't be there.

Basically, if your going to use *nix tools, it's easiest to install a *nix. There are Linux distros for people who are used to Windows. I think "Mint" is a special made distro for Win-converts. Anyway, point is, you CAN have both.
 
  • #3
TylerH said:
Um... it depends... 1st thing I'd try would be Cygwin. That would probably be the only thing I'd try under Windows. Migrating... just no! Without a POSIX subsystem(like Cygwin/Interix), there just isn't a feasible way to do it.

The problem comes from the fact that Windows and *nix are totally different, and almost completely incompatible. The makefile is likely to depend on certain executable that come standard on *nix being on your system, but they won't be there.

Basically, if your going to use *nix tools, it's easiest to install a *nix. There are Linux distros for people who are used to Windows. I think "Mint" is a special made distro for Win-converts. Anyway, point is, you CAN have both.

Thanks TylerH.

In my case, I made sure that I have all the tools: ld, sed, compiler, make. but it still didn't work, so I was thinking that maybe the make itself (or some other tool) is using some slightly different syntax or something like that, and I was wondering - maybe there are some basic differences in sytax etc. that are common knowledge for people here..

It eems that I will have to use Cygwin like you're saying, or some virtualization, but I still have some hope..
 
  • #5
It works like a charm.
Thanks story645 - this is a great collection.
 

What is a makefile and why is it used?

A makefile is a special type of file used in software development to automate the process of compiling and linking source code into an executable program. It contains instructions for the compiler and linker, as well as rules for dependencies between source files.

What are the main differences between Unix and Windows makefiles?

The main differences between Unix and Windows makefiles are the syntax and the commands used. Unix makefiles use the make utility, while Windows makefiles use the nmake utility. Additionally, the path names and commands may differ between the two platforms.

How do I convert a Unix makefile to a Windows makefile?

The conversion process from a Unix makefile to a Windows makefile involves replacing Unix-specific commands and syntax with their Windows equivalents. This may include changing the path names, using different compiler and linker commands, and updating any platform-specific flags or options.

Can I use the same makefile for both Unix and Windows?

In most cases, it is not recommended to use the same makefile for both Unix and Windows. This is because the two platforms have different commands and syntax, and the makefiles may need to be customized for each platform. It is best to create separate makefiles for each platform.

Are there any tools or resources available to help with migrating makefiles?

Yes, there are several tools and resources available to assist with migrating makefiles from Unix to Windows. These include online guides, conversion scripts, and tools that can automatically convert makefiles between platforms. It is also helpful to consult with other developers who have experience with makefiles and the specific platforms.

Similar threads

  • Programming and Computer Science
Replies
12
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
895
  • General Discussion
Replies
12
Views
853
  • Programming and Computer Science
Replies
11
Views
1K
  • Programming and Computer Science
Replies
1
Views
520
  • Programming and Computer Science
Replies
4
Views
2K
  • Programming and Computer Science
Replies
4
Views
413
  • Programming and Computer Science
Replies
13
Views
3K
  • Programming and Computer Science
Replies
10
Views
1K
  • Programming and Computer Science
Replies
13
Views
2K
Back
Top