Build system redirect

Embodiments may provide a makefile interposer, which enables a makefile to be used for building software for different platforms without modifying the makefile. In some embodiments, the interposer intercepts the commands run by makefile and automatically interposes the correct library files, dependencies, paths, and other information used by make to build the program for a particular platform. Additionally, calls that the invoked tools themselves make are intercepted and the interposer may redirect them to the platform-specific tools or file system locations including redirecting file descriptors. In some instances, when a tool is called that is not in the platform, the interposer may also fall back on the other system tools.

BACKGROUND

Embodiments of the invention relate to a software build tool. More specifically, embodiments of the invention relate to techniques and mechanisms to manage building of applications including redirecting calls to selected files.

Computer systems generally run software programs which carry out the desired functionality of users of the computer systems. The programs which run on the computer system are generally executable program files. An executable program file is generally a binary representation of machine instructions specific to the processor the program is intended to run on. An executable program file may also be a binary representation of the machine instructions for a virtual machine. It is very difficult for programmers to understand the binary representation of machine instructions. Even if the binary representation were to be translated to the machine instructions themselves, it would still be hard for programmers to read and understand the machine instructions. With modern computing, computer programs are now written by programmers in high-level, human readable instructions. These high level instructions are often referred to as “source code.” Examples of such high-level languages include C, C++, and JAVA.

Unfortunately, source code is often not directly executable by the computer system. The high-level source code is often translated into “object files” by a compiler. The compiler reads the high-level source code and creates object files which contain a machine code version of the source code. A program called a linker creates an executable file by taking the object files and linking them to the appropriate libraries, modules or routines need by the program. The executable file is now capable of being run on the computer system.

As user requirements have become more complex and varied, programs have also become more complex and varied. While a program may be created using only a single source code file, it is often easier to organize the code into separate source code files. These separate source code modules may each contain parts of the complete source code for the program and may often be organized such that they are logical representations of the overall structure of the program. Because of the separation of the complete source code into modules, some modules may use or “depend” on other modules. For example, a first module may require the functions, variables or objects defined in a second module, so in order to compile the first module, one would first have to compile the second module first. Such a relationship between the first module and the second module is called a “dependency.” These dependencies often complicate the compilation process as changes in one module may result in many other modules having to be recompiled.

In order to solve problems resulting from dependencies, a “make” utility is used to control the compiler. The make utility keeps track of the dependencies and controls the compiler to recompile not only source code modules that were modified, but also other modules which depend on the changed modules. The make utility is run every time changes are made to any module so that all dependent programs or modules are properly recompiled. A make utility requires that the source code programmer also compose a specialized control file, known as a “makefile”, which contains instructions or commands that the make function uses to control the compilation and linking of each of the source code modules when the make function is executed. The makefile typically includes a hierarchy of source modules that embody the dependencies found in the program. For example, a makefile may include a variety of elements such as a series of instructions containing “targets”, dependencies, and “shell commands” for updating the targets.

DETAILED DESCRIPTION

Many software programs are created using what is known as the make utility or some other equivalent utility. In general, each project for each platform may require its own makefile. For example, each project may have its own compiler, linker, libraries, file paths, options and dependencies specified in a makefile. In addition, there is generally one makefile for each platform the project may run on. This requires a lot of duplication and extra effort to build a project for other platforms. It often becomes difficult to track and maintain such a large number of make files. A small change in one makefile would require changing all of the makefiles for the same project on different platforms. Embodiments of the present disclosure can provide a more streamlined and efficient approach to using makefiles and can allow developers to use a fewer versions of a makefile for building their program. In some embodiments, the same makefile may be used to build programs across all targeted platforms without needing to modify it in any way. The makefile remains compatible with the original project. This can alleviate the need for developers to create and maintain a makefile for every platform they wish to build the program for, or to parameterize their makefiles and have large conditional statements to cover all the different platforms.

In build systems where other types of program build or install files are used, similar needs may exist where, for example a shell script in one UNIX environment such as a configuration or installation script may need to be ported to another UNIX environment. Other types of such build, installation and configuration specification files are known in the art.

FIG. 1Ashows a component diagram of a computer system110running an integrated development environment120. The computer system110is an example of a computing device running a particular set of hardware140, software and operating system130. The integrated development environment (IDE)120may run within the operating system130and may use operating system130to interface with the hardware140of the computer system. In on embodiment, the functionality of make utility and the makefile may reside within the IDE120. In another embodiment, the make utility and the makefile may be separate from IDE120. The make utility may use libraries150, source code160build tools170, or any other files and applications it needs to build a program according the commands in the makefile. The libraries150, source code160build tools170, or any other files and applications may be located in a memory on computer system110.

FIG. 1Ashows another component diagram of a computer system110running an integrated development environment120. The computer system110is an example of a computing device running a particular set of hardware140, software and operating system130. The IDE120may run within the operating system130and may use operating system130to interface with the hardware140of the computer system. In on embodiment, the functionality of make utility and the makefile may reside within the IDE120. In another embodiment, the make utility and the makefile may be separate from IDE120. The make utility illustrated inFIG. 1Bmay use libraries150, source code160build tools170, or any other files and applications it needs to build a program according the commands in the makefile. The libraries150, source code160build tools170, or any other files and applications may be located on another computer system and are accessed via a network “cloud”145which may represent a local area network (LAN), a wide area network (WAN), the Internet, or another connection service.

In other embodiments, a shell program may be invoked or another program such as Perl may be invoked to execute an installation or configuration script.

FIG. 2Ais a component diagram of an embodiment. Makefile210may include commands that may be used by the make utility to build a program for a first platform. The makefile interposer220may process the makefile210. Interposing can be used to redirect commands invoked by tools in a specified platform during compilation, and may fall back to other system tools if a platform-specific tool isn't found.

In some embodiments, redirect commands invoked by make to invoke tools in a specified platform. For example, for a platform A, which has its own compiler, assembler, and linker, a developer may pass a path to construct and set an environment variable, which is picked up by makefile interposer220. Interposer220may intercept the system calls that make uses to execute build tools, such as open( ) and execve( ), as well as other system calls. Therefore, with interposer220, an execve call to cc may call Platform A's cc instead of /usr/bin/cc.

In addition, calls that the invoked tools themselves make are intercepted and interposer220may redirect them to the platform-specific tools or file system locations (including redirecting file descriptors). Hence, when cc calls execve( ) or open( ) to invoke a linker, for example, interposer220may pick up the linker from Platform A.

In some instances, when a tool is called that is not in the platform, interposer220may fall back on the other system tools. This enables platform developers to sparsely provide the tools, for example, that are modified for their platform. Furthermore, system calls like access( ) or mmap( ) that take a path or file descriptor can be intercepted and checked for a platform-relative equivalent location, falling back to the original path or file descriptor if a platform-relative one is not found.

Accordingly, without any changes to the makefile, and without the makefile or the developer knowing anything about interposing or which tools are defined in the platform, a makefile project can now be built for any platform with which its source is compatible. In other words, a developer may not need to alter the makefiles or make a new set of platform-specific makefiles. Instead, a different flag on the command line can be passed that is recognized by makefile interposer220.

This is merely one example of the usage of interposing to support platform development for makefile projects. Other examples and implementations of this interposing mechanism are also part of embodiments of the present invention.

The above-described interposition mechanism may for example be used to interpose system library calls made by Perl, Python or other interpreted language, or a shell interpreter while executing an installation or configuration script in a shell language or in an interpreted language such as Perl or Python. Such interposition may then redirect calls made by the shell or script interpreter to customize the execution of the shell script or interpreted program for a particular platform and/or environment. In one embodiment, the makefile interpose may be used to allow shell scripts, Perl scripts or other utilities to be used on multiple platforms. For example, a particular set of libraries may need to be built on a platform before it can be used. Generally, when the library source files are obtained, there is an installer script that will build and install the library files. The makefile interpose may allows the installer script to run on another platform by interposing all calls made by the installer script so that the script can run on another platform.

Referring now back toFIG. 2A, makefile interposer220may check an environment variable260to determine which platform the program may be built for. In this example, the environment variable260may specify that the program is to be built for a second platform. The environment variable260may include a name or any information which may be used to identify a platform. The original compiler for platform one is specified in makefile210. The makefile interposer220may intercept the command which calls the compiler, and it may interpose (i.e. change or substitute) the call to the compiler for the first platform240with a call to the compiler for the second platform250. In one embodiment, the make file interposer220may run the command specified in the makefile210. Make may call the compiler for the first platform and the makefile interposer220may intercept the call to the compiler for the first platform240, and redirect that call to the compiler for the second platform250. This interception and redirection is done when the compiler for the first platform is called. The makefile interposer220may intercept any access to system resources and redirect them to the appropriate location. In one embodiment, the makefile interposer may redirect file access made by any tool. For example, when running a makefile created for platform1to build an application for platform2, any attempts to access /usr/lib/libOpenGL.dylib, which is used by platform1, are redirected to /MacOSX/Libraries/libOpenGL.dylib which is used by platform2. In another embodiment, the makefile interposer220may analyze the command and then interpose the compiler for the second platform250before calling the compiler.

In one embodiment, the makefile interposer may interpose calls made by other build systems. Make is a common build system that is often used by software developers. There are a variety of other build systems used by software developers including but not limited to Ant, GNU Autoconf and SCons. All calls made by such build systems may be interposed by the makefile interposer. In another embodiment, interposition may be applied to process that launches subcommands and that reads or writes files in the file system.

In one embodiment, the makefile may use a variable to represent which compiler to call. The makefile interposer220may read the value of the variable, analyze the interposer specification230, and determine if the compiler specified by the variable is appropriate for the second platform. If the compiler specified it not appropriate, the makefile interposer may use the appropriate compiler for the second platform specified in the interposer specification230and interpose that compiler on the call. If no compiler is specified for the second platform in the interposer specification230, the makefile interposer220may use a default compiler. In another embodiment, the makefile may explicitly call a compiler for the first platform. The makefile interposer220may analyze the compiler specified, analyze the interposer specification230, and determine if the compiler specified is appropriate for the second platform. If the compiler specified is not appropriate, the makefile interposer may use the appropriate compiler for the second platform specified in the interposer specification230and interpose that compiler on the call. If no compiler is specified for the second platform in the interposer specification230, the makefile interposer220may use a default compiler.

In one embodiment, the makefile interposer220may not only interpose the call to the compiler for different platforms, the makefile interposer220may also interpose to the compiler for the same platform the makefile220was written for. For example, the makefile may specify that version 4.0 of the compiler be used when building the program. However, a new version of the compiler 4.1 with needed fixes may be released. Rather then change all the makefiles that call version 4.0 of the compiler, the interposer may simply intercept all of the calls to the older 4.0 version of the compiler and interpose the newer 4.1 version of the compiler onto those calls.

FIG. 2Bis a component diagram of another embodiment. Makefile210may include commands that may be used by the make utility to build a program for a first platform. The makefile interposer220may process the makefile210. It may check an environment variable260to determine which platform the program may be built for. In this example, the environment variable260may specify that the program is to be built for a second platform. The environment variable260may include a name or any information which may be used to identify a platform. Library files241are specified for platform one in makefile210. The makefile interposer220may analyze the command which lists the library files241, and it may interpose (i.e. change or substitute) the library files for the first platform241with the library files for the second platform251. In one embodiment, the make file interposer220may run the command specified in the makefile210. Make may call the libraries for the first platform241and the makefile interposer220may intercept the call to the libraries for the first platform241, and redirect that call to the libraries for the second platform251. In another embodiment, the makefile interposer220may analyze the command and then interpose the libraries for the second platform251before making the call to the libraries.

In one embodiment, the makefile may use a variable to represent which libraries are used. The makefile interposer220may read the value of the variable, analyze the interposer specification230, and determine if the libraries specified by the variable are appropriate for the second platform. If the libraries specified are not appropriate, the makefile interposer may use the appropriate libraries for the second platform specified in the interposer specification230and interpose those libraries. If no libraries are specified for the second platform in the interposer specification230, the makefile interposer220may use a default set of libraries. In another embodiment, the makefile may explicitly list the libraries for the first platform. The makefile interposer220may analyze the libraries specified, analyze the interposer specification230, and determine if the specified libraries are appropriate for the second platform. If the libraries specified are not appropriate, the makefile interposer may use the appropriate libraries for the second platform specified in the interposer specification230and interpose those libraries. If no libraries are specified for the second platform in the interposer specification230, the makefile interposer220may use a default set of libraries.

FIG. 2Cis a component diagram of another embodiment. Makefile210may include commands that may be used by the make utility to build a program for a first platform. The makefile interposer220may process the makefile210. It may check an environment variable260to determine which platform the program may be built for. In this example, the environment variable260may specify that the program is to be built for a second platform. The environment variable260may include a name or any information which may be used to identify a platform. A utility program242used for building the program is specified for platform one in makefile210. The makefile interposer220may analyze the command which calls the utility program242, and it may interpose (i.e. change or substitute) the utility program for the first platform242with the library files for the second platform252. In one embodiment, the make file interposer220may run the command specified in the makefile210. Make may call the utility program for the first platform242and the makefile interposer220may intercept the call to the utility program for the first platform242, and redirect that call to the utility program for the second platform252. In another embodiment, the makefile interposer220may analyze the command and then interpose the utility program for the second platform252before making the call to the libraries.

In one embodiment, the makefile may use a variable to represent the utility program to be called. The makefile interposer220may read the value of the variable, analyze the interposer specification230, and determine if the utility program specified by the variable is appropriate for the second platform. If the utility program specified is not appropriate, the makefile interposer may use the appropriate utility program for the second platform specified in the interposer specification230and interpose the utility program into the call. If no utility program is specified for the second platform in the interposer specification230, the makefile interposer220may use a default utility program. In another embodiment, the makefile may explicitly list the utility program for the first platform. The makefile interposer220may analyze the utility program specified, analyze the interposer specification230, and determine if the specified utility program is appropriate for the second platform. If the specified utility program specified is not appropriate, the makefile interposer may use the appropriate utility program for the second platform specified in the interposer specification230and interpose those libraries. If no utility program is specified for the second platform in the interposer specification230, the makefile interposer220may use a default set of libraries.

For example, a program may use an OpenGL module in order to display visual images correctly. This OpenGL module may need to be compiled using a different compiler than the compiler used to build the program for a particular platform. A makefile may have a command which compiles the OpenGL module first, and then uses the compiled OpenGL module to build the final program. In one embodiment, a different OpenGL compiler may be used for each platform. The makefile interposer would intercept the call to the OpenGL compiler and interpose the correct compiler for the platform into the call. In another embodiment, the makefile interposer may not only intercept a call to a particular utility program or build tool, but it may also modify the parameters that are passed to the utility program or build tool. For example, not only may a different OpenGL compiler be used for the OpenGL module depending on the platform, but there may be a parameter for each platform specifying whether or not to optimize the compilation of the OpenGL module. The makefile interposer may also interpose the parameters to the utility program in addition to the call to the utility program itself.

In one embodiment, the interposer may be used to enforce usage of specific utilities or parameters regardless of whether or not the makefile is being used for another platform. For example, a build file may be written for a particular platform, but due to licensing issues, the makefile interposer may interpose a compiler for which the developers have a license for, even though the makefile is still being used for its original intended platform. This example may apply regardless of whether or not the makefile is being used for a different platform. In another example, the makefile interposer may be used to enforce a particular parameter for a call. Developers may want all compiler warnings to be ignored even though the original makefile specified otherwise.

In another embodiment, even the source code itself may be interposed. For example, a makefile may require that a file “class1.c” be compiled. The developers may now want to use “class1-fix1.c” because the newer source code file contains an essential fix. The original makefile may still be used to build the program, and the makefile interposer may simply interpose the newer source code file into the call to the compiler.

In another embodiment, the makefile interposer may dynamically determine the intended target platform for the program without using the environment variable. For example, the makefile may refer to a specific set of libraries which are only used for a specific platform. The makefile interposer may recognize the use of the set of libraries and infer that the program is intended for the specific platform which uses those libraries.

FIG. 2Dillustrates another embodiment. In this embodiment, makefile210calls a utility tool243for platform1. Utility tool1in turn calls utility tool2for the first platform. Makefile interposer220may check an environment variable260to determine which platform the program may be built for. In this example, the environment variable260may specify that the program is to be built for a second platform. Environment variable260may include a name or any information which may be used to identify a platform. Makefile interposer220may intercept the call made by utility tool1to utility tool2for the first platform253. It may interpose the call to utility tool2for the first platform253and redirect the call to utility tool2for the second platform263.

FIG. 2Eillustrates a fifth embodiment. Makefile210may include commands that may be used by the make utility to build a program for a first platform. The makefile interposer220may process the makefile210. It may check an environment variable260to determine which platform the program may be built for. In this example, the environment variable260may specify that the program is to be built for a second platform. The environment variable260may include a name or any information which may be used to identify a platform. In this embodiment, there are no library files specified for platform two in interposer specification230. Makefile interposer220will then interpose default libraries256when the libraries for the first platform244are called. In this embodiment, makefile interpose220is able to fall back onto default applications, tools, libraries etc. if it is unable to find the information it needs in interposer specification230.

FIG. 3Ais a flow diagram of an interposing process300according to a first embodiment. The process starts at step304where the make utility may first open and read the makefile. It reads one command at step308. At step310, the make utility runs the command. Then at step312, the makefile interposer may check the interposer specification and an environment variable that indicates which platform the program is intended to run on. The makefile interposer then retrieves the required information from the interposer specification. At step316, the command is interposed with the appropriate information for the target platform. Once the command has been interposed, the command is executed at step320. The interposer then checks if the end of the makefile has been reached at step324. If there are still more commands to run, the process then loops back to step308. If there are no more commands to run, then process ends at step328.

FIG. 3Bis a flow diagram of an interposing process350according to a second embodiment. The process starts at step354where the make utility may first open and read the makefile. The make utility then reads one command at step358. At step360, the make utility runs the command. Then at step362, the makefile interposer may check to see if the information that needs to interposed has been previously accessed and buffered. If the information that needs to be interposed has been buffered, the process may move onto step374. If the information has not been buffered, the process then proceeds to step366where the makefile interposer may check the interposer specification and an environment variable that indicates which platform the program is intended to run on. The makefile interposer then retrieves the required information from the interposer specification. At step370, the makefile interposer may store the retrieved information in a buffer for possible future use. At step374, the command is interposed with the appropriate information for the target platform. Once the command has been interposed, the command is executed at step378. The make utility then checks if the end of the makefile has been reached at step382. If there are still more commands to run, the process then loops back to step358. If there are no more commands to run, then process ends at step386.

FIG. 3Cis a flow diagram of an interposing process300according to a third embodiment. The process starts at step304where the makefile interposer may first open and read the makefile. It reads one command at step308. Then at step312, the makefile interposer may check the interposer specification and an environment variable that indicates which platform the program is intended to run on. The makefile interposer then retrieves the required information from the interposer specification. At step316, the command is interposed with the appropriate information for the target platform. Once the command has been interposed, the command is executed at step320. The interposer then checks if the end of the makefile has been reached at step324. If there are still more commands to run, the process then loops back to step308. If there are no more commands to run, then process ends at step328.

FIG. 3Dis a flow diagram of an interposing process350according to a fourth embodiment. The process starts at step354where the makefile interposer may first open and read the makefile. It reads one command at step358. Then at step362, the makefile interposer may check to see if the information that needs to interposed has been previously accessed and buffered. If the information that needs to be interposed has been buffered, the process may move onto step374. If the information has not been buffered, the process then proceeds to step366where the makefile interposer may check the interposer specification and an environment variable that indicates which platform the program is intended to run on. The makefile interposer then retrieves the required information from the interposer specification. At step370, the makefile interposer may store the retrieved information in a buffer for possible future use. At step374, the command is interposed with the appropriate information for the target platform. Once the command has been interposed, the command is executed at step378. The interposer then checks if the end of the makefile has been reached at step382. If there are still more commands to run, the process then loops back to step358. If there are no more commands to run, then process ends at step386. In one embodiment, the makefile interposer may read each command in the makefile and interpose as it reads each command. In another embodiment, the make file interposer may read all of the commands in the makefile and then interpose all of the commands after they have all been read.

Because hardware, software and operating systems are constantly being changed and update, new platforms are constantly created and older platforms are constantly modified. As a result the makefile interposer may also include an interposer specification. The interposer specification may contain information or macros which the makefile interposer may use when interposing commands in the makefile. The interposer specification may be updated as new platforms are added and older platforms are modified, thereby allowing the same makefile to be used for new platforms and older platforms that have been updated.

In one embodiment, the makefile interposer may be integrated with an IDE. The makefile interposer may be used to provide information regarding dependencies to the IDE which may be displayed to the developer. For example, a particular set of modules may need to be precompiled before the program may be built because the program uses those modules. The makefile would normally take care of building the modules first and then building the program after. This information may not be readily apparent within an IDE as generally only source code and class or object hierarchies are displayed. The makefile interposer would identify these dependencies to the IDE and the IDE may displays these dependencies to the developer in a separate user interface.

FIG. 4is a block diagram illustrating an example of one of the computing systems110which may use embodiments as illustrated inFIGS. 1A-3D. The computing system400includes a processor430that is in communication with a memory440and a network interface450. The network interface450may receive signals according to wired technologies including but not limited to Ethernet, telephone (e.g., POTS), and fiber optic systems, and/or wireless technologies including but not limited a code division multiple access (CDMA or CDMA2000) communication system, a GSM/GPRS (General Packet Radio Service)/EDGE (enhanced data GSM environment) or an IEEE 802.11b system. The system400may also include one or more of an output device420such as a visual display and a user input device410such as a keypad, touch screen, or other suitable tactile input device.

Referring toFIG. 4, the computing system400is represented as a series of interrelated functional blocks that may represent functions implemented by, for example the processor430, software, some combination thereof, or in some other manner as taught herein. For example, the processor430may facilitate user input via the input device410.

FIG. 5Aillustrates an example mobile device500. The mobile device500can be, for example, a handheld computer, a personal digital assistant, a cellular telephone, a network appliance, a camera, a smart phone, an enhanced general packet radio service (EGPRS) mobile phone, a network base station, a media player, a navigation device, an email device, a game console, or a combination of any two or more of these data processing devices or other data processing devices.

In some implementations, the mobile device500includes a touch-sensitive display502. The touch-sensitive display502can be implemented with liquid crystal display (LCD) technology, light emitting polymer display (LPD) technology, or some other display technology. The touch-sensitive display502can be sensitive to haptic and/or tactile contact with a user.

In some implementations, the touch-sensitive display502may include a multi-touch-sensitive display502. A multi-touch-sensitive display502can, for example, process multiple simultaneous touch points, including processing data related to the pressure, degree, and/or position of each touch point. Such processing facilitates gestures and interactions with multiple fingers, chording, and other interactions. Other touch-sensitive display technologies can also be used, e.g., a display in which contact is made using a stylus or other pointing device. Some examples of multi-touch-sensitive display technology are described in U.S. Pat. Nos. 6,323,846, 6,570,557, 6,677,932, and 6,888,536, each of which is incorporated by reference herein in its entirety.

In some implementations, the mobile device500can display one or more graphical user interfaces on the touch-sensitive display502for providing the user access to various system objects and for conveying information to the user. In some implementations, the graphical user interface can include one or more display objects504,506. In the example shown, the display objects504,506, are graphic representations of system objects. Some examples of system objects include device functions, applications, windows, files, alerts, events, or other identifiable system objects.

In some implementations, the mobile device500can implement multiple device functionalities, such as a telephony device, as indicated by a Phone object510; an e-mail device, as indicated by the Mail object512; a map devices, as indicated by the Maps object514; a Wi-Fi base station device (not shown); and a network video transmission and display device, as indicated by the Web Video object516. In some implementations, particular display objects504, e.g., the Phone object510, the Mail object512, the Maps object514, and the Web Video object516, can be displayed in a menu bar518. In some implementations, device functionalities can be accessed from a top-level graphical user interface, such as the graphical user interface illustrated inFIG. 5A. Touching one of the objects510,512,514, or516can, for example, invoke a corresponding functionality.

In some implementations, the mobile device500can implement a network distribution functionality. For example, the functionality can enable the user to take the mobile device500and provide access to its associated network while traveling. In particular, the mobile device500can extend Internet access (e.g., Wi-Fi) to other wireless devices in the vicinity. For example, mobile device500can be configured as a base station for one or more devices. As such, mobile device500can grant or deny network access to other wireless devices.

In some implementations, upon invocation of a device functionality, the graphical user interface of the mobile device500changes, or is augmented or replaced with another user interface or user interface elements, to facilitate user access to particular functions associated with the corresponding device functionality. For example, in response to a user touching the Phone object510, the graphical user interface of the touch-sensitive display502may present display objects related to various phone functions; likewise, touching of the Mail object512may cause the graphical user interface to present display objects related to various e-mail functions; touching the Maps object514may cause the graphical user interface to present display objects related to various maps functions; and touching the Web Video object516may cause the graphical user interface to present display objects related to various web video functions.

In some implementations, the top-level graphical user interface environment or state ofFIG. 5Acan be restored by pressing a button520located near the bottom of the mobile device500. In some implementations, each corresponding device functionality may have corresponding “home” display objects displayed on the touch-sensitive display502, and the graphical user interface environment ofFIG. 5Acan be restored by pressing the “home” display object.

In some implementations, the top-level graphical user interface can include additional display objects506, such as a short messaging service (SMS) object530, a Calendar object532, a Photos object534, a Camera object536, a Calculator object538, a Stocks object540, a Address Book object542, a Media object544, a Web object546, a Video object548, a Settings object550, and a Notes object (not shown). Touching the SMS display object530can, for example, invoke an SMS messaging environment and supporting functionality; likewise, each selection of a display object532,534,536,538,540,542,544,546,548, and550can invoke a corresponding object environment and functionality.

Additional and/or different display objects can also be displayed in the graphical user interface ofFIG. 5A. For example, if the device500is functioning as a base station for other devices, one or more “connection” objects may appear in the graphical user interface to indicate the connection. In some implementations, the display objects506can be configured by a user, e.g., a user may specify which display objects506are displayed, and/or may download additional applications or other software that provides other functionalities and corresponding display objects.

In some implementations, the mobile device500can include one or more input/output (I/O) devices and/or sensor devices. For example, a speaker560and a microphone562can be included to facilitate voice-enabled functionalities, such as phone and voice mail functions. In some implementations, an up/down button584for volume control of the speaker560and the microphone562can be included. The mobile device500can also include an on/off button582for a ring indicator of incoming phone calls. In some implementations, a loud speaker564can be included to facilitate hands-free voice functionalities, such as speaker phone functions. An audio jack566can also be included for use of headphones and/or a microphone.

In some implementations, a proximity sensor568can be included to facilitate the detection of the user positioning the mobile device500proximate to the user's ear and, in response, to disengage the touch-sensitive display502to prevent accidental function invocations. In some implementations, the touch-sensitive display502can be turned off to conserve additional power when the mobile device500is proximate to the user's ear.

Other sensors can also be used. For example, in some implementations, an ambient light sensor570can be utilized to facilitate adjusting the brightness of the touch-sensitive display502. In some implementations, an accelerometer572can be utilized to detect movement of the mobile device500, as indicated by the directional arrow574. Accordingly, display objects and/or media can be presented according to a detected orientation, e.g., portrait or landscape. In some implementations, the mobile device500may include circuitry and sensors for supporting a location determining capability, such as that provided by the global positioning system (GPS) or other positioning systems (e.g., systems using Wi-Fi access points, television signals, cellular grids, Uniform Resource Locators (URLs)). In some implementations, a positioning system (e.g., a GPS receiver) can be integrated into the mobile device500or provided as a separate device that can be coupled to the mobile device500through an interface (e.g., port device590) to provide access to location-based services.

In some implementations, a port device590, e.g., a Universal Serial Bus (USB) port, or a docking port, or some other wired port connection, can be included. The port device590can, for example, be utilized to establish a wired connection to other computing devices, such as other communication devices500, network access devices, a personal computer, a printer, a display screen, or other processing devices capable of receiving and/or transmitting data. In some implementations, the port device590allows the mobile device500to synchronize with a host device using one or more protocols, such as, for example, the TCP/IP, HTTP, UDP and any other known protocol.

The mobile device500can also include a camera lens and sensor580. In some implementations, the camera lens and sensor580can be located on the back surface of the mobile device500. The camera can capture still images and/or video.

The mobile device500can also include one or more wireless communication subsystems, such as an 802.11b/g communication device586, and/or a Bluetooth™ communication device588. Other communication protocols can also be supported, including other 802.x communication protocols (e.g., WiMax, Wi-Fi, 3G), code division multiple access (CDMA), global system for mobile communications (GSM), Enhanced Data GSM Environment (EDGE), etc.

FIG. 5Billustrates another example of configurable top-level graphical user interface of device500. The device500can be configured to display a different set of display objects.

In some implementations, each of one or more system objects of device500has a set of system object attributes associated with it; and one of the attributes determines whether a display object for the system object will be rendered in the top-level graphical user interface. This attribute can be set by the system automatically, or by a user through certain programs or system functionalities as described below.FIG. 5Bshows an example of how the Notes object552(not shown inFIG. 5A) is added to and the Web Video object516is removed from the top graphical user interface of device500(e.g. such as when the attributes of the Notes system object and the Web Video system object are modified).

FIG. 6is a block diagram600of an example implementation of a mobile device (e.g., mobile device500). The mobile device can include a memory interface602, one or more data processors, image processors and/or central processing units604, and a peripherals interface606. The memory interface602, the one or more processors604and/or the peripherals interface606can be separate components or can be integrated in one or more integrated circuits. The various components in the mobile device can be coupled by one or more communication buses or signal lines.

Sensors, devices, and subsystems can be coupled to the peripherals interface606to facilitate multiple functionalities. For example, a motion sensor610, a light sensor612, and a proximity sensor614can be coupled to the peripherals interface606to facilitate the orientation, lighting, and proximity functions described with respect toFIG. 5A. Other sensors616can also be connected to the peripherals interface606, such as a positioning system (e.g., GPS receiver), a temperature sensor, a biometric sensor, or other sensing device, to facilitate related functionalities.

A camera subsystem620and an optical sensor622, e.g., a charged coupled device (CCD) or a complementary metal-oxide semiconductor (CMOS) optical sensor, can be utilized to facilitate camera functions, such as recording photographs and video clips.

Communication functions can be facilitated through one or more wireless communication subsystems624, which can include radio frequency receivers and transmitters and/or optical (e.g., infrared) receivers and transmitters. The specific design and implementation of the communication subsystem624can depend on the communication network(s) over which the mobile device is intended to operate. For example, a mobile device can include communication subsystems624designed to operate over a GSM network, a GPRS network, an EDGE network, a Wi-Fi or WiMax network, and a Bluetooth™ network. In particular, the wireless communication subsystems624may include hosting protocols such that the mobile device may be configured as a base station for other wireless devices.

An audio subsystem626can be coupled to a speaker628and a microphone66to facilitate voice-enabled functions, such as voice recognition, voice replication, digital recording, and telephony functions.

The I/O subsystem640can include a touch screen controller642and/or other input controller(s)644. The touch-screen controller642can be coupled to a touch screen646. The touch screen646and touch screen controller642can, for example, detect contact and movement or break thereof using any of a plurality of touch sensitivity technologies, including but not limited to capacitive, resistive, infrared, and surface acoustic wave technologies, as well as other proximity sensor arrays or other elements for determining one or more points of contact with the touch screen646.

The other input controller(s)644can be coupled to other input/control devices648, such as one or more buttons, rocker switches, thumb-wheel, infrared port, USB port, and/or a pointer device such as a stylus. The one or more buttons (not shown) can include an up/down button for volume control of the speaker628and/or the microphone66.

In one implementation, a pressing of the button for a first duration may disengage a lock of the touch screen646; and a pressing of the button for a second duration that is longer than the first duration may turn power to the mobile device on or off. The user may be able to customize a functionality of one or more of the buttons. The touch screen646can, for example, also be used to implement virtual or soft buttons and/or a keyboard.

In some implementations, the mobile device can present recorded audio and/or video files, such as MP3, AAC, and MPEG files. In some implementations, the mobile device can include the functionality of an MP3 player, such as an iPod™. The mobile device may, therefore, include a 32-pin connector that is compatible with the iPod™. Other input/output and control devices can also be used.

The memory interface602can be coupled to memory650. The memory650can include high-speed random access memory and/or non-volatile memory, such as one or more magnetic disk storage devices, one or more optical storage devices, and/or flash memory (e.g., NAND, NOR). The memory650can store an operating system652, such as Darwin, RTXC, LINUX, UNIX, OS X, WINDOWS, or an embedded operating system such as VxWorks. The operating system652may include instructions for handling basic system services and for performing hardware dependent tasks. In some implementations, the operating system652can be a kernel (e.g., UNIX kernel).

The memory650may also store communication instructions654to facilitate communicating with one or more additional devices, one or more computers and/or one or more servers. The memory650may include graphical user interface instructions656to facilitate graphic user interface processing; sensor processing instructions658to facilitate sensor-related processing and functions; phone instructions660to facilitate phone-related processes and functions; electronic messaging instructions662to facilitate electronic-messaging related processes and functions; web browsing instructions664to facilitate web browsing-related processes and functions; media processing instructions666to facilitate media processing-related processes and functions; GPS/Navigation instructions668to facilitate GPS and navigation-related processes and instructions; camera instructions670to facilitate camera-related processes and functions; and/or other software instructions672to facilitate other processes and functions, e.g., access control management functions. The memory650may also store other software instructions (not shown), such as web video instructions to facilitate web video-related processes and functions; and/or web shopping instructions to facilitate web shopping-related processes and functions. In some implementations, the media processing instructions666are divided into audio processing instructions and video processing instructions to facilitate audio processing-related processes and functions and video processing-related processes and functions, respectively. An activation record and International Mobile Equipment Identity (IMEI)674or similar hardware identifier can also be stored in memory650.

The above detailed description of certain embodiments presents various descriptions of specific embodiments. However, the invention can be embodied in a multitude of different ways as defined and covered by the claims. In this description, reference is made to the drawings wherein like parts are designated with like numerals throughout.

The terminology used in the description presented herein is not intended to be interpreted in any limited or restrictive manner, simply because it is being utilized in conjunction with a detailed description of certain specific embodiments. Furthermore, embodiments may include several novel features, no single one of which is solely responsible for its desirable attributes or which is essential to practicing the inventions herein described.

The system may include various modules, tools, and applications as discussed in detail below. As can be appreciated by one of ordinary skill in the art, each of the modules may include various sub-routines, procedures, definitional statements and macros. Each of the modules are typically separately compiled and linked into a single executable program. Therefore, the following description of each of the modules is used for convenience to describe the functionality of the preferred system. Thus, the processes that are undergone by each of the modules may be arbitrarily redistributed to one of the other modules, combined together in a single module, or made available in, for example, a shareable dynamic link library.

The system modules, tools, and applications may be written in any programming language such as, for example, C, C++, BASIC, Visual Basic, Pascal, Ada, Java, HTML, XML, or FORTRAN, and executed on an operating system, such as variants of Windows, Macintosh, UNIX, Linux, VxWorks, or other operating system. C, C++, BASIC, Visual Basic, Pascal, Ada, Java, HTML, XML and FORTRAN are industry standard programming languages for which many commercial compilers can be used to create executable code.

The above-described method may be realized in a program format to be stored on a computer readable recording medium that includes any kinds of recording devices for storing computer readable data, for example, a CD-ROM, a DVD, a magnetic tape, memory card, and a disk, and may also be realized in a carrier wave format (e.g., Internet transmission or Bluetooth transmission).

While specific blocks, sections, devices, functions and modules may have been set forth above, a skilled technologist may realize that there are many ways to partition the system, and that there are many parts, components, modules or functions that may be substituted for those listed above.

While the above detailed description has shown, described, and pointed out the fundamental novel features as applied to various embodiments, it may be understood that various omissions and substitutions and changes in the form and details of the system illustrated may be made by those skilled in the art, without departing from the intent of the invention.