GP32 making Makefiles...


nerd of nerds

w00t!!!!
Joined
Feb 25, 2003
Messages
838
Does anyone have any good links that explain how to make a makefile? I have no idea how to make one :unsure: thanks
 
Thanks, but what do i use to make the file? notepad, and if so how do is save it as just a file with no extension :unsure: . Sorry if these are stupid questions but i am just learning c\c++ and all this makefile stuff is new to me :(
 
yes, you can use any text editor you like.
notepad is good. then you save the file with no extension as you said : ex "makefile"

you can use visualmin-gw in minigp32 package wich create automaticly a makefile for your project.
there is a tuto on installing it on www.gp32news.com --> tutorial-->installing GCC under windows.

in it you will find all link you need for a ready to use GCC environement.

You can also look to the link below in order to know much about makefile

have a good code.
 
Sorry - I'm in the same position - I'm, just starting to learn C/C++. Sorry to sound dull as hell, but can someone explain to me what a makefile actually IS?

Would appreciate it :)
 
It's a set of rules that lead to the production of your program.

For example an EXE is built from OBJs linked together, and each OBJ is built from a C source file ... for a basic application.

For GP32, for example, the FXE is made from the GXB, which is made from objects, which are compiled from C... but also assembler needs to be compiled and linked in too. Using makefiles you can also tell 'make' (the app that does the jobs) to convert your bitmaps to C source files, compile and link those in too, all in one file.

It's better than batch, as you can tell 'make' to do the same job for every .c file in the directory, or compile it with various options (e.g. debug mode) and so on. Read up on it.

- Rico
 
Only one thing that might be important: make sure that the editor you use makes "real" tabs and not spaces. AFAIR make requires the "real" tabs (ascii $9) before the command. I remember having a lot of trouble with that back in the days of Dos Navigator.
 
Yes, every other Unix utility ignores whitespace, but make -requires- a tab. Anything else, it reports a bizarre error. You need tabs preceding 'command lines':

foo.fxe: foo.gxb
[tab] b2fxe -t "FooBar" -b "res\icon.bmp" -a "Rico" -r "GPL" foo.gxb foo.fxe

For example.

- Rico
 
Back
Top