Host-i686-pc-cygwin/fixdocumdes/makefile Analysis

Source: Internet
Author: User

Happy shrimp

Http://blog.csdn.net/lights_joy/

Lights@hb165.com

 

 

 

This article applies

Gcc- 4.3.1

Configure-target = bfin-uClinux-GNU

Blackfin series DSPs

Cygwin gcc 3.4.4

 

 

 

Reprinted, but keep the author information

 

 

In cygwin gcc 3.4.4 When building the cross-compiler bfin-uClinux-GCC in the environment, the first thing to execute is the configure-target = bfin-uClinux-GNU command, and then execute the make operation, which will create the host-i686-pc-cygwin/fixgatedes subdirectory, call the fixdocumdes/configure script to generate the makefile, and then call make in the master makefile to generate the target. At this time, the target passed in is all.

This article analyzes this dynamically generated host-i686-pc-cygwin/fixdocumdes/makefile.

The dependencies of all targets are:

ALL: oneprocess fixinc. Sh mkheaders

 

1.1 oneprocess

This dependency is defined:

Oneprocess: Full-Stamp

Full-Stamp: $ (allobj) $ (libiberty)

$ (CC) $ (cflags) $ (ldflags)-o $ (FI) $ (allobj) $ (libiberty)

$ (STAMP) $ @

Here libiberty is defined:

Libiberty = ../libiberty.

Because libiberty. A has been generated before this target, this dependency can be skipped.

The value of allobj variable is:

Allobj = fixincl. O fixtests. O fixfixes. O server. O procopen. O/

Fixlib. O fixopts. o

In this makefile, no explicit rules are defined for these files, but a general rule is defined:

. C. O:

$ (CC)-C $ (cflags) $ (warn_cflags) $ (cppflags) $ (fixinc_cflags) $ <

In this rule, pay attention to the definition of fixinc_cflags:

Primary des =- I. -I $ (srcdir)-I ../include-I $ (srcdir)/../include

Fixinc_cflags =-dhave_config_h $ (primary des)

After the generated. ofile is generated, the oneprocessfield links them to fixincl.exe. Then a file with the full-stamp content being null is generated.

FI is defined:

FI = fixincl.exe

Of course, this goal cannot be generated in vs2005.

1.2 fixinc. Sh

This goal is defined:

Fixinc. sh: fixinc. In mkfixinc. Sh makefile

Srcdir = "$ (srcdir)" $ (Shell) $ (srcdir)/mkfixinc. Sh $ (target)

Here, both fixinc. In And mkfixinc. Sh are gcc- 4.3.1 Files in the/fixdocumdes directory.

The script for this target will generate a fixinc. Sh script under the host-i686-pc-cygwin/fixdocumdes directory.

 

1.3 mkheaders

This goal is defined:

Mkheaders: mkheaders. Almost $ (srcdir)/./GCC/BASE-VER

Sed-E's/@ gcc_version @/$ (gcc_version)/'<$ <>$ @ t

MV-F $ @ T $ @

Mkheaders. Almost: $ (srcdir)/mkheaders. In config. Status

Config_files = mkheaders. Almost: mkheaders. In/

Config_headers =./config. Status

The script for this target will generate a mkheaders script under the host-i686-pc-cygwin/fixgatedes directory.

 

 

 

References

Host-i686-pc-cygwin/libiberty/makefile Parsing( 2008-8-19 )

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.