Why makefiles

Pages: 12
I don't understand why.
closed account (Dy7SLyTq)
from what i understand, they are for set up mostly
? What do they help set up? I just don't see whats the benefit in them
Last edited on
closed account (Dy7SLyTq)
so lets say you download sfml online. you run the make file and it moves all of the files and directories to where they are supposed to be so you can use them
So in other words, they make a copy of the library and place it in the directory that you can use said copy in an application? Why not have the library be organized so all you have to do is copy paste then?
closed account (Dy7SLyTq)
so that way you dont have to copy and paste. usually if your using a make file then its going to have a lot of files that need to go to the proper place. sfml has over a 1000. so you could manually move them and risk making a mistake, or let the make file do it for you
i think i understand now, it automates that task, which can be useful for a large project. But then though, what if the library was organized into one folder, where you just could used the code in that one folder? Makefile still seems a bit adhoc to me. But I understand, when you are moving code around and files around when you are developing I see how that could be somewhat useful.
Basically... makefiles are essentially "project files" for Make. MSVS uses cxproj files.... Code::Blocks uses cbp files... and Make uses makefiles.

Make is a build manager for people that don't like IDEs. A makefile allows you to organize multiple source files and compile then with a single command (usually just "make" from the commandline).

Without it you'd have to invoke your compiler manually - or write a batch/bash script to do it. But Make is generally easier than batch and is more portable.
closed account (Dy7SLyTq)
ok... obviously u dont understand the *nix system. you cant have it in one folder. once again continuing the sfml example, you need to have the .hpps in the include folder. im pretty sure the .dlls in another. if its the python interpreter, there are a bunch of files that need to go all over the place
closed account (3qX21hU5)
DTS I don't think you even know what a makefile is used for so why are you giving advice on how it works? Listen to Disch and check out the link firedraco gave that will give you most of the information you need on what Make Files are used for.
Yes now that I'm reading DTSCode's replies more closely, he does not seem to be describing what makefiles do at all.
Thanks disch. lol, and they have IDEs for linux too, so I'd be better off organizing code first then including them in the IDE to get compiled. But make file allows monitoring, hm.
Last edited on
If you are using an IDE, you do not need to deal with makefiles at all.

makefiles are only significant if you are using Make.
closed account (Dy7SLyTq)
two things. one) my last comment was aimed at "i think i understand now, it automates that task, ... somewhat useful." which was the last post at the time, before you guys came in. and as i said, i think i knew what a make file is. so i was more defending the idea of a setup file than anything
Everytime someone says "*nix" instead of Unix, I feel like punching them. I swear. Not kidding.

Just saying UNIX!!!!
But they're not referencing just Unix.
Any "Unix-like" then. Just say "Unix-like OS, like Mac, Linux, etc.".

Saying *nix is so fudging annoying that I feel boiling inside me when I see it....
closed account (Dy7SLyTq)
its unix and linux bro. hence *nix
*nix is perfectly acceptable. It compasses all entities ending in the string "nix".
Pages: 12