A library file supports specific functionality. You might want to eliminate calls to library files that are not needed. For example, if your target-device memory is particularly small, you might want to delete library files that contain functionality that your application does not use. Follow this guidance:
- Configuration settings - You can change configuration settings in projects files or makefiles. Generally, modifying flags in the configuration header file ansi_prefix.CF.size.h is sufficient to modify the working set. Sometimes, however, you must also modify the ansi_prefix.CF.h header file.
- Projects - The easiest way to create a new project is to start from a copy of a project file that is compliant with the rules and standards you want for your project. Turning off flags, such as the flag for floating point support, forces you to remove some files from the project file list. But this is appropriate, as your project will not need those files. Although changing the basic configuration can require editing all targets of all project files, usually modifying the single targets your application uses is sufficient.
- Makefiles - Makefile targets already are set up to build any library; the CFLAGS macro defines the basic configuration. Target all does not include all targets, but a commented variation of all these targets is present in every makefile.