|
This thread is locked; no one can reply to it. |
1
2
|
2 newbie Makefile questions |
William Labbett
Member #4,486
March 2004
|
Hi, after some study of the manual I came up with this : 1
2#variables
3
4VPATH = C:\MinGW\lib
5
6objects = main.o load_screen.o
7
8linker_options = -lallegro-5.0
9
10
11
12f_rep_editor : $(objects)
13 gcc -o f_rep_editor $(objects) $(linker_options)
14
15
16main.o : colours.h load_screen.h
17
18
19load_screen.o : colours.h load_screen.h
It's the first makefile I've ever made. Got a couple of questions: 1. According to the manual mingw32-make looks for a file called Makefile I called my file Makefile.txt When I call mingw32-make, it says that no makefile file but when I call mingw32-make -f Makefile.txt it finds it. Wondering what I need to change Makefile.txt to, to get it to find it autometically. The other question is about getting the object files linked to libraries. I need to link to these files. C:\MinGW\lib\liballegro.dll.a; Can anyone help me with that ?
|
Arthur Kalliokoski
Second in Command
February 2005
|
William Labbett said: Wondering what I need to change Makefile.txt to, to get it to find it automatically. Either Makefile or makefile will do (no extension). They all watch too much MSNBC... they get ideas. |
William Labbett
Member #4,486
March 2004
|
cheers Arthur. How do I save it with no extension ?
|
Arthur Kalliokoski
Second in Command
February 2005
|
Windows automatically puts the .txt extension on it? Use quotes Save As -> "makefile" They all watch too much MSNBC... they get ideas. |
William Labbett
Member #4,486
March 2004
|
sweet EDIT : that's something we say in UK. Could have just said Thanks. Anyway, got the libraries linked now. Changed makefile to : 1#variables
2
3VPATH = C:\MinGW\lib\
4
5objects = main.o load_screen.o
6
7linker_options = -lallegro.dll -L C:\MinGW\lib\
8
9
10f_rep_editor : $(objects)
11 gcc -o f_rep_editor $(objects) $(linker_options)
12
13
14main.o : colours.h load_screen.h
15
16
17load_screen.o : colours.h load_screen.h
|
LennyLen
Member #5,313
December 2004
|
William Labbett said: How do I save it with no extension ? Don't use Notepad.
|
bamccaig
Member #7,536
July 2006
|
IIRC, Notepad can also save without an extention if you select "All files" first. -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
LennyLen
Member #5,313
December 2004
|
bamccaig said: IIRC, Notepad can also save without an extention if you select "All files" first. Nope, even then it still adds a .txt
|
Arthur Kalliokoski
Second in Command
February 2005
|
Obviously Windows knows best. They all watch too much MSNBC... they get ideas. |
torhu
Member #2,727
September 2002
|
IIRC, you can just add a dot at the end of the file name to disable the automatic extensions. |
Arthur Kalliokoski
Second in Command
February 2005
|
And don't you just love it when you want to edit it again, you can't just double-click it without an extension without getting the "Open with" dialog. Maybe it's just best to leave it as makefile.txt. They all watch too much MSNBC... they get ideas. |
Thomas Fjellstrom
Member #476
June 2000
|
IIRC If you also tell windows to display extensions for all file types notepad should allow you to enter the full filename after selecting "All Files". -- |
BAF
Member #2,981
December 2002
|
Just type in "Makefile." (with the quotes) like torhu said. Easy as that. You all love to hate on Windows, but in all reality, how often do most people need to save a file without an extension? It doesn't make sense not to add the default extension automatically - very few people actually want to know and type the correct extension whenever they save. |
Arthur Kalliokoski
Second in Command
February 2005
|
I suppose you could always get the make source and change it to accept makefile.txt as the default, since you can't get the Windows sources. Maybe one of those third party shells would know what to do with no extension though. They all watch too much MSNBC... they get ideas. |
bamccaig
Member #7,536
July 2006
|
BAF said: You all love to hate on Windows, but in all reality, how often do most people need to save a file without an extension? It doesn't make sense not to add the default extension automatically - very few people actually want to know and type the correct extension whenever they save. I don't even add an extension to text files. Why would I? That should be the default type assumed by the system. And as a general rule, file extensions shouldn't be trusted anyway. If I'm not sure what type of file I'm dealing with (very rare) then I just ask `file`. Windows can't even deal with files without extensions (it asks you every goddamn time to search through two or three dialogs to find an application to open it with). -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
Arthur Kalliokoski
Second in Command
February 2005
|
I see that even though Russia had the source code to Windows 7 to examine for months, they've decided to go with Linux after all. They all watch too much MSNBC... they get ideas. |
William Labbett
Member #4,486
March 2004
|
How would the bulk of the code for Windows 7 compare with a big triple A game ? eg Call of Duty Black ops
|
Thomas Fjellstrom
Member #476
June 2000
|
BAF said: You all love to hate on Windows, but in all reality, how often do most people need to save a file without an extension? It doesn't make sense not to add the default extension automatically - very few people actually want to know and type the correct extension whenever they save. The big problem for me is it adding a .txt extension even when I already GAVE the file an extension. Stupid windows. -- |
Arthur Kalliokoski
Second in Command
February 2005
|
It's also a huge security hole, i.e. "college_girls_gone_wild.jpg.exe" just shows up as "college_girls_gone_wild.jpg". Of course in Linux even a jpg extension could execute if it had the right permissions, but the user privileges had some thought put into them. They all watch too much MSNBC... they get ideas. |
bamccaig
Member #7,536
July 2006
|
Arthur Kalliokoski said: Of course in Linux even a jpg extension could execute if it had the right permissions, but the user privileges had some thought put into them. Also, from the command line (where I imagine most Linux users spend most of their time; I know I certainly do) you have to explicitly say what you want to happen (which is generally effortless). Even from the GUI, if a file is executable, Gnome always asks me: do I want to "display" this file (i.e., open it) or do I want to execute it? Of course, I almost never let any desktop environment implicitly carry out actions anyway. I generally open the context menu and select what I want to happen. -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
type568
Member #8,381
March 2007
|
Since it came down to text editors, I would like to add my 2 cents with notepad++, a text editor used for various programming languages.. Very easy to use, and does what is required to be done.
|
BAF
Member #2,981
December 2002
|
Thomas Fjellstrom said: The big problem for me is it adding a .txt extension even when I already GAVE the file an extension. Stupid windows. Use quotes around the filename. That's always been step one to getting the extension you want. Or, use a better editor than notepad. |
Thomas Fjellstrom
Member #476
June 2000
|
BAF said: Or, use a better editor than notepad. I choose to use a better OS -- |
Kthanid
Member #12,218
August 2010
|
The big mistake here is using notepad in the first place. Even being saddled with Windows is no excuse for not using Vim.
|
BAF
Member #2,981
December 2002
|
Thomas Fjellstrom said: I choose to use a better OS Oh yes, and instead of listening to a better radio station when I don't like what's playing, I buy a brand new car. |
|
1
2
|