667
edits
Changes
→Resources
[[Dive into Real World Mozilla]] > [[Dive into Real World Mozilla Day 2]] > Makefile Lab
== Overview ==
# Write targets and rules for each of the object files and the final executable
# Write a '''clean''' target in order to delete all .obj and .exe files
# You will know you are done when the following commands result in nled.exe being produced:
$ make
$ make clean
or, if you want to combine this into one line:
$ make && make clean
== Hints ==
* [http://msdn2.microsoft.com/en-us/library/8we9bhf4(VS.80).aspx CL /-c option]* [http://msdn2.microsoft.com/en-us/library/yb8e9b8y(VS.80).aspx CL /-Fo option]* The default extension for object files on win32 is '''.obj''' vs. .o on Unix* To create the executable (nled.extexe) you must link all .obj files ''and''and''' user32.lib'''* Running make with the '''-n''' option will show you all the commands make is going to run, which is helpful when debugging makefiles: $ make -n
== Resources ==
* [http://benjamin.smedbergs.us/blog/2007-01-12/mozillabuild-rc1/ MozillaBuild RC1 for Win32]
* [http://webtoolswww.mozillagnu.org/buildsoftware/configmake/manual/ GNU Make Manual] * [http://www.eng.hawaii.edu/Tutor/Make/ Make Tutorial]* [[Makefile.cgi MOZCONFIG Build Configuratorin Template for In-Tree Extensions]]