Makefiles

The Lightfoot SDK provides a set of Makefile templates that make building applications very easy. The majority of Lightfoot makefiles are only 4 lines long, the templates providing all the rules for building the application.

General makefile

All makefiles must include the main template makefile, lfmake.mk

include $(LF_HOME)/inc/lfmake.mk

Java application makefile

The following variables control the building of Java applications.
jmain
The name of the main class for the application
project
The name of the project. This controls the name of the produced files.
jfiles
The name of other classes to build
java_libs
The names of java libraries to include
java_platform
The name of the Java platform to use. This defaults to dct_cldc, but can be changed to dct_cldc_no_float to remove floating point support.
cfiles
The names of all C files to build
asmfiles
The names of all ASM files to build
JAVA_NATIVE
Set to 1 to build native method stubs in the native subdirectory.

The following line must be added to the end of your makefile to build the java application.

include $(MAKEJAVA)

C application makefile

The following variables control the building of C applications.
cfiles
The names of all the C files to build
asmfiles
The names of all the ASM files to build
project
The name of the project. This controls the name of the produced files.
libs
The names of libraries to link with.

The following line must be added to the end of your makefile to build the C application.

include $(MAKEPROG)

Library makefile

The following variables control the building of libraries.
cfiles
The names of all the C files to build
asmfiles
The names of all the ASM files to build
jfiles
The names of all the Java files to build
java_dir
The directory where Java files can be found.
project
The name of the project. This controls the name of the produced library
JAVA_NATIVE
Set to 1 to build native method stubs in the native subdirectory.
   
The following line must be added to the end of your makefile to build the library.

include $(MAKELIB)

Make process

The make process consists of many steps as described below.