Here are some examples of pattern rules:
%.o: %.c
$(CC) -c $< -o $@
frammis cooker: frammis.o cooker.o
$(CC) -o $@ $^
clean:
rm -f *.o frammis cooker
This uses implicit pattern rules to compile .c files to .o, links the objects into the executables frammis and cooker, and defines a clean target to remove the object and executable files. The % wildcard allows make to recognize common filename patterns and apply the appropriate compilation/linking rules.
An Introduction to Makefile.
about 23 slides to present you a quick start to the make utility, its usage and working principles. Some tips/examples in order to understand and write your own
Makefiles.
In this presentation you will learn why this utility continues to hold its top position inĀ projectĀ build software, despite many younger competitors.
Visit Do you know Magazine : https://www.facebook.com/douknowmagazine
CMake is an open-source cross-platform build system. It is increasingly becoming the build system of choice for open source projects. The Qt project recently announced that Qbs, the replacement build system for qmake, will no longer be supported and future efforts will focus on CMake. It may become the default build system for Qt version 6.
CMake has offered support for building Qt applications for some time, and is supported within the Qt Creator IDE. In this webinar we will:
-Introduce you to CMake
-Cover its basic features and how to use it
-Show some CMake configurations including Qt-based applications
-Prove how easy it is to use Cmake with Qt so you'll be ready to use it for your C++ and Qt-based applications!
An Introduction to Makefile.
about 23 slides to present you a quick start to the make utility, its usage and working principles. Some tips/examples in order to understand and write your own
Makefiles.
In this presentation you will learn why this utility continues to hold its top position inĀ projectĀ build software, despite many younger competitors.
Visit Do you know Magazine : https://www.facebook.com/douknowmagazine
CMake is an open-source cross-platform build system. It is increasingly becoming the build system of choice for open source projects. The Qt project recently announced that Qbs, the replacement build system for qmake, will no longer be supported and future efforts will focus on CMake. It may become the default build system for Qt version 6.
CMake has offered support for building Qt applications for some time, and is supported within the Qt Creator IDE. In this webinar we will:
-Introduce you to CMake
-Cover its basic features and how to use it
-Show some CMake configurations including Qt-based applications
-Prove how easy it is to use Cmake with Qt so you'll be ready to use it for your C++ and Qt-based applications!
This is a introduction to Maven 2. For more information visit http://jpereira.eu/2012/05/03/an-introduction-to-maven-2/
If you want to download the editable presentation contact me (find my contacts on my blog)
we need to have a good amount of basic or in-depth knowledge on Linux Basics. This will help one's job easy in resolving the issues and supporting the projects.
Are you a system admin or database admin? Or working on any other technology which is deployed or implemented on linux/UNIX machines? Then you should be good with Linux basic concepts and commands. We will cover this section very clearly.
ā¢ Each SELinux access control model is simple, but actually
access control is more complex
ā¢ Red Hat puts a lot of effort into SELinux, policy and utils for
SELinux usability
ā Enlarging default policy modules
ā Encouraging Policy module system
ā Analyzing and generating policies from access violation log
Long thought to be relegated to the domain of fast, multithreaded desktop applications, race conditions have made their way into web applications. These bugs are often difficult to test for, and are becoming increasingly prevalent due to faster and faster clients, while server-side languages like Node.js and PHP are struggling to keep up. Race conditions are no longer just bugs- when they are found in critical components of web applications, they become a serious security vulnerability. If the proper checks and defensive measures are not in place, databases get confused, āone-time-useā becomes a relative term, and ālimitedā becomes āunlimitedā. This talk will detail specific examples where malicious users could cause damage or profit from a race-condition flaw in a web application. A custom open-source tool will also be introduced to help security researchers and developers easily check for this class of vulnerability in web applications.
Semantic Versioning (SemVer.org) allows you to communicate changes to your software to users through your version numbers. But how do you use it with GitFlow, pull requests or continuous delivery? What about easily creating alpha/beta packages? Do you need a nightly/CI feed? Donāt know how all these bits fit together? You want to see this talk then and get a holistic view of what it means to Semantically Version your software.
I will show you what SemVer is, the problems it solves, new ways it can be used (customer facing apps/sites?). I will cover the GitFlow versioning strategy, and the much simpler pull request model. When to use each, and how you can take advantage of conventions in these workflows to make Semantic Versioning an integral and easy part of your workflow from writing to releasing and maintaining your software!
The talk will also include many of the things that Simon Cropp, Andreas Ćhlund and I have learnt over the past 7 months while building the Open Source GitVersion command line tool by showing practical examples from multiple other open source projects, including nServiceBus and TestStack.White.
Not a .NET guy? No worries, everything in this talk is about SemVer, Git and releasing software irrespective of platform or language.
Kernel developers may have experience in writing makefiles for the linux kernel. In many cases, maybe just adding lines like
"obj-$(CONFIG_FOO) += foo.o" to a makefile. But, probably there
is not many people really know what's going on behind this cool
build system.
In this talk, Cao jin will dive into the Kbuild internals. Starting from
the basics of GNU Make, he will explain how Kbuild works, and in the end, produces vmlinux, bzImage, modules. The talk will also focus on some smart tricks used in Kbuild. At last, he will give a introduction about how Xen project is related with this config/build system.
Makefile actually is an old concept from UNIX development. Makefile is based upon compiling rules for a project and improve the project development efficiency. In a big project, there are many files in different folders. Of course you can write a DOS batch file to build whole project. But makefile can judge which steps should be done first, which steps can be ignored, and even more complicated goals. All of these are decided by the rules in makefile, instead of manually specified.
This is a introduction to Maven 2. For more information visit http://jpereira.eu/2012/05/03/an-introduction-to-maven-2/
If you want to download the editable presentation contact me (find my contacts on my blog)
we need to have a good amount of basic or in-depth knowledge on Linux Basics. This will help one's job easy in resolving the issues and supporting the projects.
Are you a system admin or database admin? Or working on any other technology which is deployed or implemented on linux/UNIX machines? Then you should be good with Linux basic concepts and commands. We will cover this section very clearly.
ā¢ Each SELinux access control model is simple, but actually
access control is more complex
ā¢ Red Hat puts a lot of effort into SELinux, policy and utils for
SELinux usability
ā Enlarging default policy modules
ā Encouraging Policy module system
ā Analyzing and generating policies from access violation log
Long thought to be relegated to the domain of fast, multithreaded desktop applications, race conditions have made their way into web applications. These bugs are often difficult to test for, and are becoming increasingly prevalent due to faster and faster clients, while server-side languages like Node.js and PHP are struggling to keep up. Race conditions are no longer just bugs- when they are found in critical components of web applications, they become a serious security vulnerability. If the proper checks and defensive measures are not in place, databases get confused, āone-time-useā becomes a relative term, and ālimitedā becomes āunlimitedā. This talk will detail specific examples where malicious users could cause damage or profit from a race-condition flaw in a web application. A custom open-source tool will also be introduced to help security researchers and developers easily check for this class of vulnerability in web applications.
Semantic Versioning (SemVer.org) allows you to communicate changes to your software to users through your version numbers. But how do you use it with GitFlow, pull requests or continuous delivery? What about easily creating alpha/beta packages? Do you need a nightly/CI feed? Donāt know how all these bits fit together? You want to see this talk then and get a holistic view of what it means to Semantically Version your software.
I will show you what SemVer is, the problems it solves, new ways it can be used (customer facing apps/sites?). I will cover the GitFlow versioning strategy, and the much simpler pull request model. When to use each, and how you can take advantage of conventions in these workflows to make Semantic Versioning an integral and easy part of your workflow from writing to releasing and maintaining your software!
The talk will also include many of the things that Simon Cropp, Andreas Ćhlund and I have learnt over the past 7 months while building the Open Source GitVersion command line tool by showing practical examples from multiple other open source projects, including nServiceBus and TestStack.White.
Not a .NET guy? No worries, everything in this talk is about SemVer, Git and releasing software irrespective of platform or language.
Kernel developers may have experience in writing makefiles for the linux kernel. In many cases, maybe just adding lines like
"obj-$(CONFIG_FOO) += foo.o" to a makefile. But, probably there
is not many people really know what's going on behind this cool
build system.
In this talk, Cao jin will dive into the Kbuild internals. Starting from
the basics of GNU Make, he will explain how Kbuild works, and in the end, produces vmlinux, bzImage, modules. The talk will also focus on some smart tricks used in Kbuild. At last, he will give a introduction about how Xen project is related with this config/build system.
Makefile actually is an old concept from UNIX development. Makefile is based upon compiling rules for a project and improve the project development efficiency. In a big project, there are many files in different folders. Of course you can write a DOS batch file to build whole project. But makefile can judge which steps should be done first, which steps can be ignored, and even more complicated goals. All of these are decided by the rules in makefile, instead of manually specified.
How to Make a Field invisible in Odoo 17Celine George
Ā
It is possible to hide or invisible some fields in odoo. Commonly using āinvisibleā attribute in the field definition to invisible the fields. This slide will show how to make a field invisible in odoo 17.
Palestine last event orientationfvgnh .pptxRaedMohamed3
Ā
An EFL lesson about the current events in Palestine. It is intended to be for intermediate students who wish to increase their listening skills through a short lesson in power point.
Synthetic Fiber Construction in lab .pptxPavel ( NSTU)
Ā
Synthetic fiber production is a fascinating and complex field that blends chemistry, engineering, and environmental science. By understanding these aspects, students can gain a comprehensive view of synthetic fiber production, its impact on society and the environment, and the potential for future innovations. Synthetic fibers play a crucial role in modern society, impacting various aspects of daily life, industry, and the environment. ynthetic fibers are integral to modern life, offering a range of benefits from cost-effectiveness and versatility to innovative applications and performance characteristics. While they pose environmental challenges, ongoing research and development aim to create more sustainable and eco-friendly alternatives. Understanding the importance of synthetic fibers helps in appreciating their role in the economy, industry, and daily life, while also emphasizing the need for sustainable practices and innovation.
A Strategic Approach: GenAI in EducationPeter Windle
Ā
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
Honest Reviews of Tim Han LMA Course Program.pptxtimhan337
Ā
Personal development courses are widely available today, with each one promising life-changing outcomes. Tim Hanās Life Mastery Achievers (LMA) Course has drawn a lot of interest. In addition to offering my frank assessment of Success Insiderās LMA Course, this piece examines the courseās effects via a variety of Tim Han LMA course reviews and Success Insider comments.
Francesca Gottschalk - How can education support child empowerment.pptxEduSkills OECD
Ā
Francesca Gottschalk from the OECDās Centre for Educational Research and Innovation presents at the Ask an Expert Webinar: How can education support child empowerment?
Acetabularia Information For Class 9 .docxvaibhavrinwa19
Ā
Acetabularia acetabulum is a single-celled green alga that in its vegetative state is morphologically differentiated into a basal rhizoid and an axially elongated stalk, which bears whorls of branching hairs. The single diploid nucleus resides in the rhizoid.
Operation āBlue Starā is the only event in the history of Independent India where the state went into war with its own people. Even after about 40 years it is not clear if it was culmination of states anger over people of the region, a political game of power or start of dictatorial chapter in the democratic setup.
The people of Punjab felt alienated from main stream due to denial of their just demands during a long democratic struggle since independence. As it happen all over the word, it led to militant struggle with great loss of lives of military, police and civilian personnel. Killing of Indira Gandhi and massacre of innocent Sikhs in Delhi and other India cities was also associated with this movement.
16. Environment Variables
ā¢ CC C compiler command
ā¢ CFLAGS C compiler flags
ā¢ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
ā¢ LIBS libraries to pass to the linker, e.g. -l<library>
ā¢ CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
ā¢ CPP C preprocessor (gcc -E)
ā¢ CXX C++ compiler command
ā¢ CXXFLAGS C++ compiler flags
ā¢ CXXCPP C++ preprocessor
#example
#example
myprog:Ā Ā Ā Ā $(OBJS)
myprog:Ā Ā Ā Ā $(OBJS)
Ā Ā Ā Ā Ā Ā Ā Ā $(CC)Ā -oĀ $@Ā $^Ā $(LDFLAGS)Ā $(LIBS)
Ā Ā Ā Ā Ā Ā Ā Ā $(CC)Ā -oĀ $@Ā $^Ā $(LDFLAGS)Ā $(LIBS)
Use these variables to override the choices made by `configure' or to help
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
it to find libraries and programs with nonstandard names/locations.
3-16
Embedded Linux Course
20. cross.make
# Tool names
# Tool names
CROSS_COMPILE = arm-linux-
CROSS_COMPILE = arm-linux-
AS
AS = $(CROSS_COMPILE)as
= $(CROSS_COMPILE)as
AR
AR = $(CROSS_COMPILE)ar
= $(CROSS_COMPILE)ar
CC
CC = $(CROSS_COMPILE)gcc
= $(CROSS_COMPILE)gcc
CPP
CPP = $(CC) -E
= $(CC) -E
LD
LD = $(CROSS_COMPILE)ld
= $(CROSS_COMPILE)ld
NM
NM = $(CROSS_COMPILE)nm
= $(CROSS_COMPILE)nm
OBJCOPY
OBJCOPY = $(CROSS_COMPILE)objcopy
= $(CROSS_COMPILE)objcopy
OBJDUMP
OBJDUMP = $(CROSS_COMPILE)objdump
= $(CROSS_COMPILE)objdump
RANLIB
RANLIB = $(CROSS_COMPILE)ranlib
= $(CROSS_COMPILE)ranlib
READELF
READELF = $(CROSS_COMPILE)readelf
= $(CROSS_COMPILE)readelf
SIZE
SIZE = $(CROSS_COMPILE)size
= $(CROSS_COMPILE)size
STRINGS
STRINGS = $(CROSS_COMPILE)strings
= $(CROSS_COMPILE)strings
STRIP
STRIP = $(CROSS_COMPILE)strip
= $(CROSS_COMPILE)strip
export AS AR CC CPP LD NM OBJCOPY OBJDUMP RANLIB READELF
export AS AR CC CPP LD NM OBJCOPY OBJDUMP RANLIB READELF
SIZE STRINGS STRIP
SIZE STRINGS STRIP
Note: export these values so that subsequent Makefiles called
Note: export these values so that subsequent Makefiles called
by this Makefile will use the same names
by this Makefile will use the same names 3-20
Embedded Linux Course
25. ā¢ Note: By declaring the subdirectories as phony
targets (you must do this as the subdirectory
obviously always exists; otherwise it won't be
built)
3-25
Embedded Linux Course
26. Internal Definitions
ā¢ For convenience in constructing rules based on
targets and dependencies, it is possible to use
predefined macros and establish implicit rules
that make can use to convert one file type to
another.
3-26
Embedded Linux Course
27. Pattern Rules
ā¢ Many programs that read one file type and
output another conform to standard conventions
ā .c ==> .o , .S ==> .o
ā¢ These conventions allow make to simplify rule
creation by recognizing common filename
patterns and providing built-in rules for
processing them
ā¢ The built-in rules are all instances of pattern
rules %.o: %.c
%.o: %.c
# commands to execute (built-in):
# commands to execute (built-in):
$(COMPILE.c) $(OUTPUT_OPTION) $<
$(COMPILE.c) $(OUTPUT_OPTION) $<
OUTPUT_OPTION = -o $@
COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c 3-27
Embedded Linux Course
28. Looking at Predefined Rules and Macros
ā¢ A large number of implicit rules are built into
make (make -p)
%.o: %.S
%.o: %.S
# commands to execute (built-in):
# commands to execute (built-in):
$(COMPILE.S) -o $@ $<
$(COMPILE.S) -o $@ $<
# there is a special rule to generate a file with no suffix (always an executable)
# there is a special rule to generate a file with no suffix (always an executable)
%: %.o
%: %.o
# commands to execute (built-in):
# commands to execute (built-in):
$(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@
$(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@
%: %.c
%: %.c
# commands to execute (built-in):
# commands to execute (built-in):
$(LINK.c) $^ $(LOADLIBES) $(LDLIBS) -o $@
$(LINK.c) $^ $(LOADLIBES) $(LDLIBS) -o $@
3-28
Embedded Linux Course
29. ā¢ The % in a pattern rule is roughly equivalent to *
in a Unix shell
ā represents any number of any characters.
ā¢ The % can be placed anywhere within the
pattern but can occur only once.
ā¢ Characters other than % match literally within a
filename
cooker: cooker.c cooker.h
cooker.o: cooker.c cooker.h
cooker <----- cooker.c
% : %.c
cooker.o <-------- cooker.c
%.o : %.c
3-29
Embedded Linux Course
31. Suffix Rules
CC = gcc
CFLAGS = -g # define a suffix rule for .c -> .o
LD = $(CC) .c.o :
LDFLAGS = $(CC) $(CFLAGS) -c $<
RM = rm
# default target by convention is ``all''
EXE = mainx all : $(EXE)
SRCS = main.c sub1.c sub2.c sub3.c
OBJS = ${SRCS:.c=.o} $(EXE) : $(OBJS)
$(LD) -o $@ $(OBJS)
# list only those we use
.SUFFIXES: .o .c $(OBJS) : proj.h
clean :
-$(RM) -f $(EXE) $(OBJS)
3-31
Embedded Linux Course
32. # Make rules
# Make rules
all: daemon
all: daemon
.PHONY : :install clean distclean
.PHONY install clean distclean
.c.o:
.c.o:
$(CC) $(CFLAGS) $(HEADER_OPS) -c $<
$(CC) $(CFLAGS) $(HEADER_OPS) -c $<
daemon: ${OBJS}
daemon: ${OBJS}
$(CC) -o $(EXEC_NAME) ${OBJS} $(LDFLAGS)
$(CC) -o $(EXEC_NAME) ${OBJS} $(LDFLAGS)
#Copy the executable file into a directory that users typically search for
#Copy the executable file into a directory that users typically search for
##commands;
commands;
install: daemon
install: daemon
test -d $(INSTALL_DIR) ||||$(INSTALL) -d -m 755 $(INSTALL_DIR)
test -d $(INSTALL_DIR) $(INSTALL) -d -m 755 $(INSTALL_DIR)
$(INSTALL) -m 755 $(EXEC_NAME) $(INSTALL_DIR)
$(INSTALL) -m 755 $(EXEC_NAME) $(INSTALL_DIR)
clean:
clean:
rm -f *.o $(EXEC_NAME) core
rm -f *.o $(EXEC_NAME) core
##distclean might be defined to delete more files than `clean' does.
distclean might be defined to delete more files than `clean' does.
distclean:
distclean:
rm -f *~
rm -f *~
rm -f *.o $(EXEC_NAME) core
rm -f *.o $(EXEC_NAME) core
3-32
Embedded Linux Course
33. Built-in Functions
ā¢ GNU make has a couple dozen built-in functions
for working with variables and their contents
ā¢ $(function-name arg1[, argn])
3-33
Embedded Linux Course
34. $(shell command)
ā¢ The shell function accepts a single argument
that is expanded (like all arguments) and passed
to a subshell for execution.
ā¢ The standard output of the command is then
read and returned as the value of the function.
Sequences of newlines in the output are
collapsed to a single space. Any trailing newline
is deleted.
ā¢ The standard error is not returned, nor is any
program exit status
3-34
Embedded Linux Course
36. $(wildcard pattern . . . )
sources := $(wildcard *.c *.h)
ā¢ The wildcard function accepts a list of patterns
and performs expansion on each one.
ā¢ If a pattern does not match any files, the empty
string is returned.
ā¢ As with wildcard expansion in targets and
prerequisites, the normal shell globbing
characters are supported: ~, *, ?, [...], and [^...].
3-36
Embedded Linux Course
37. ā¢ Another use of wildcard is to test for the
existence of a file in conditionals.
ā¢ When used in conjunction with the if function
(described shortly) you often see wildcard
function calls whose argument contains no
wildcard characters at all.
dot-emacs-exists := $(wildcard ~/.emacs)
will return the empty string if the user's home directory
does not contain a .emacs file
3-37
Embedded Linux Course
39. if-condition
if-condition
text if the condition is true
else
text if the condition is false
endif
ā¢ The if-condition can be one of:
ifdef variable-name
ifndef variable-name
ifeq test
ifneq test
3-39
Embedded Linux Course
41. ifeq (a, a)
# These are equal
endif
ifeq ( ābā, ābā )
# These are not equal - 'b' != 'b '
endif
ifeq "a" "a"
# These are equal
endif
ifeq 'b' 'b'
# So are these
endif
3-41
Embedded Linux Course
44. GNU Build System
ā¢ The GNU build system (aka, autotools )
provides an environment to a computer
programmer which allows them to write cross-
platform software
ā¢ It also makes the build process easier on the
user, allowing the user to usually just run a
small set of commands to build the program
from its source code and install it.
3-44
Embedded Linux Course
45. GNU Autotools
ā¢ Autotools comprises the GNU utility programs
Autoconf, Automake, and Libtool.
ā¢ Other related tools frequently used with the GNU
build system are GNUās make, GNU gettext,
pkg-config, and the GNU gcc.
ā¢ The utilities used by the GNU build system are
only required to be on the developerās
workstation
3-45
Embedded Linux Course
46. autoconf
and * * *
automake
*
*
*
a. * means executable
b. template file, customarily ending in ".inā, āacā
3-46
Embedded Linux Course
47. GNU Autoconf
ā¢ Autoconf is a tool for producing shell scripts that
automatically configure software source code
packages to adapt to many kinds of UNIX-like
systems.
ā¢ Autoconf makes use of GNU m4 to transform a
user-written 'configure.ac' file to a portable
'configureā script.
ā¢ The 'configure' generates customized headers
and makefiles derived from pre-written
templates.
3-47
Embedded Linux Course
48. GNU Autoconf (cont.)
ā¢ The Autoconf approach to portability is to test
whether a particular feature is supported or not
ā¢ it also allows user to have the āconfigureā script
to customize.
3-48
Embedded Linux Course
49. GNU Automake
ā¢ Automake aims to allow the programmer to write
a makefile in a higher-level language, rather
than having to write the whole makefile manually
ā¢ Automake helps to create portable Makefile,
which are in turn processed with the make utility.
ā¢ Must be used with GNU autoconf
3-49
Embedded Linux Course
50. GNU Automake (cont.)
ā¢ Automake contains two commands:
ā aclocal : a program for autoconf users
ā Automake
ā¢ In simple cases, it suffices to give:
ā a line that declares the name of the program to build
ā a list of source files
ā a list of command-line options to be passed to the gcc (namely,
in which directories header files will be found)
ā a list of command-line options to be passed to the ld (which
libraries the program needs and in what directories they are to
be found).
3-50
Embedded Linux Course
51. GNU Libtool
ā¢ Libtool helps manage the creation of static and
dynamic libraries on various Unix-like operating
systems.
ā¢ Libtool accomplishes this by abstracting the
library creation process, hiding differences
between various systems
3-51
Embedded Linux Course
53. Configure Script
ā¢ āconfigureā attempts to guess correct values for various
system-dependent variables used during compilation.
It uses those values to create a `Makefile' in each
directory of the package.
ā¢ It may also create one or more `.h' files containing
system-dependent definitions.
In new development, library dependency checking has been done in great
part using pkg-config
pkg-config is a helper tool used when compiling applications and libraries. It
helps you insert the correct compiler options on the command line.
3-53
Embedded Linux Course
55. The Output from āconfigureā
ā¢ A script config.status that you can run in the
future to recreate the current configuration
ā¢ A file config.cache that saves the results of its
tests to speed up reconfiguring, and
ā¢ A file config.log containing compiler output,
useful for debugging `configureā
make distclean
make realclean
remove the files that `configure' created (so you can compile the
package for a different kind of computer),
3-55
Embedded Linux Course
56. ā¢ If you need to do unusual things to compile the
package, please try to figure out how `configure'
could check whether to do them
ā¢ If at some point config.cache contains results
you don't want to keep, you may remove or edit
it.
ā¢ You only need configure.ac if you want to
change it or regenerate `configure' using a
newer version of autoconf.
3-56
Embedded Linux Course
57. Compilers and Options
ā¢ Some systems require unusual options for
compilation or linking that the `configure' script
does not know about
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
ā¢ The 'configure' script can be given a number of
options to enable and disable various features.
For a complete list, type:
./configure --help
3-57
Embedded Linux Course
58. Specifying the System Type
ā¢ There may be some features `configure' can not figure
out automatically, but needs to determine by the type of
host the package will run on
System types:
--build=BUILD configure for building on BUILD [guessed]
--host=HOST cross-compile to build programs to run on
HOST [BUILD]
ā type format: CPU-OS
ā See the file `config.sub' for the possible values of each field .
ā¢ If you are building compiler tools for cross-compiling, you
can will need āhost=CPU-OS
3-58
Embedded Linux Course
60. Examples for configure
Step1 : Export your toolchain path firstly
ā export PATH=/usr/local/arm/3.4.1/bin:$PATH
Step 2 : Execute configure script,
ā CC=arm-linux-gcc ./configure --host=arm-linux
ā CC=mips-uclibc-gcc ./configure --host=mips-linux
ā CC=arm-elf-gcc ./configure --target=arm-linux --endian-mode=littile
Normally, you will need to execute ā./configure - - helpā to enable or disable
some features supported by this software package
3-60
Embedded Linux Course
61. Cross-compiling Applications
āCC=arm-linux-gcc ./configure āhost=arm-linux ā
Unluckily enough, you need to go through the following..
Step 1: ā./configureā
this will create a Makefile for your x86 linux.
Step 2: include <SDK>/filesystem/make.def
Include make.def at the top of your Makefile
Step 3: Edit Makefile appropriately
For example,
# CC=gcc
# AR=ar
-I<the_path_to_your_toolchain_include_path>
-L<the_path_to_your_toolchain_library_path>
3-61
Embedded Linux Course
62. Test Your Program
Download your code to board for testing
ā¢ Ifconfig eth0 192.168.2.x
ā¢ cd /var;
ā¢ tftp āg ār <executable> <tftp_server>
ā¢ chmod +x <executable>
ā¢ ./ <executable>
3-62
Embedded Linux Course
64. Cross-compiling Kernel modules
ā¢ Building the kernel module will need the properly
configured kernel sources
ā¢ During the build process of this package the
kernel Makefile and the current kernel
configuration will be used
ā¢ The modules should be compiled with the same
compiler version.
Some kernel modules are only supported with recent kernel versions. That
means that compilation of these drivers might fail with older kernel versions.
3-64
Embedded Linux Course
68. References
ā¢ GNU Manuals Online
ā http://www.gnu.org/software/make/manual/
ā Managing Projects with GNU Makeā by Robert
Mecklenburg
ā O'Reilly, Nov 19, 2004
3-68
Embedded Linux Course