ebmDevMag.com home
ebm Developer's Magazine
links

developer's mag
main page

article
part 1
part 2
part 3
part 4
part 5
part 6
part 7
part 8


2 - The Makefile

The magic that determines these compilation details is the makefile. One of the big advantages of an IDE is that it maintains the makefile for you, avoiding the messy details. Although in the ebm environment we have to manage it ourselves, the good news is that we usually only need to duplicate someone else's. Taking the standard makefile that comes with many Franklin apps (or are included with all of this site's example source code), we only need to change two lines near the beginning of the file:

APPNAME = myprogram

SRCS_CPP = myprogram.cpp myforms.cpp

The SRCS_CPP entry lists your program's .cpp files, and the APPNAME entry refers to what the final file will be named when compiled (ignoring the extension). In this example, there are two sources files, since we are using the output of the Form Editor for one (myforms.cpp), and myprogram.cpp contains the additional form 'glue' code.

There's more to makefiles than that (books have been written on the subject), and modifying them will be discussed in detail in another column, but these two changes will suffice for most projects.

Previous Section
Next Section

Copyright © 2001-2006 ebmDevMag.com - Legal Notice