Welcome! Log In Create A New Profile

Advanced

How can i make my own makefile?

Posted by Snt4ll 
How can i make my own makefile?
April 08, 2009 07:40PM
Hi there.
How can i make my own makefile? I open it with notepad,but i dont know how what i have to do to make it compatible,for example with the library wiilight.

The one what i open is devkitpro\examples\wii\makefile.

How can i make my own?

Thanks.

*Sorry if you dont understand something,english is not my main languaje.
But i whink i speak it prety good :-)



Edited 1 time(s). Last edit at 04/08/2009 07:46PM by Snt4ll.
Re: How can i make my own makefile?
April 08, 2009 09:42PM
Of course you can make your own makefile!

(However, its easiest just to edit the one devkitPRO provides you)



Edited 1 time(s). Last edit at 04/08/2009 09:42PM by Arikado.
Re: How can i make my own makefile?
April 09, 2009 01:03AM
Or look at any of the others from other projects out there.
Re: How can i make my own makefile?
April 09, 2009 09:42AM
SUBDIRS:= `ls | egrep -v '^(CVS)$$'`

DATESTRING	:=	$(shell date +%Y)$(shell date +%m)$(shell date +%d)

all:
	@for i in $(SUBDIRS); do if test -e $$i/Makefile ; then $(MAKE) -C $$i || { exit 1;} fi; done;

clean:
	@rm -f *.bz2
	@for i in $(SUBDIRS); do if test -e $$i/Makefile ; then $(MAKE) -C $$i clean || { exit 1;} fi; done;

dist: clean
	@tar --exclude=*CVS* -cvjf wii-examples-$(DATESTRING).tar.bz2 *

That's the wii/example.
What can i modify?
Re: How can i make my own makefile?
April 09, 2009 09:57AM
Heh. No, don't use THAT makefile. Open up the folder labelled "template" inside. That is a sample project, with a sample Makefile.
Re: How can i make my own makefile?
April 09, 2009 10:21AM
ah ok,thank all you.

one other question:

In "LIBDIRS" can be like this: LIBDIRS C:\devkitPro\libogc\include C:\devkitPro\libogc\lib\wii



Edited 3 time(s). Last edit at 04/09/2009 10:32AM by Snt4ll.
Re: How can i make my own makefile?
April 09, 2009 01:51PM
How about reading the info pages for make? They explain all about the syntax and the super fun tricks you can pull off. In addition, reading the manual for the compiler will provide you with tons of completely useless information and maybe, just enough information to make it do something fun too.
Re: How can i make my own makefile?
April 09, 2009 02:40PM
Where can i found thet pages?
I wanna know if "LIBDIRS" can be like this: LIBDIRS C:\devkitPro\libogc\include C:\devkitPro\libogc\lib\wii no "super fun tricks"... ;-)
Re: How can i make my own makefile?
April 09, 2009 03:13PM
http://www.gnu.org/software/make/manual/

At a shell prompt (at least on Linux):
info make
man make

If you use the Emacs editor, you can get the info and man pages while you edit with:
C-h i (then select the make entry ), M-x man (then type make)

Michael
Sorry, only registered users may post in this forum.

Click here to login