makefile介绍
发布日期:2021-05-14 23:42:43 浏览次数:23 分类:精选文章

本文共 4404 字,大约阅读时间需要 14 分钟。

make���Makefile������������

������make���Makefile���������������

1. make���������������

������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������make������������������������������������������������������������������������

2. make���Makefile���������

Linux/Unix������������make���������������������������������������������������������������������������������������������������������������makefile���������������������������������������������������������������������

makefile������������

  • makefile������������������rael���shell��������������������������������� ���������������
  • makefile������������������������������������������������������������������
  • makefile���������������������������������������������������������������������������ndo otras assay��� compiler������������

3. makefile���������������

make ������������������������������������������������

make [������] [������] [���[MAX macros(define)]

������������

  • -d������������������������agnoster��������������� Picks���
  • -f <������>���������������������������.Zhufl ist���makefile���������������
  • -h���������������������������������������
  • -n��� ������ needles running������makefile���������������������default_pipe.
  • -s���������������������������������������������������

makefile���������������������

  • ������ (Target): ������������������������������������������

  • ������ (Dependency): ������������������������������������������������������������

  • 4. makefile���������������

    ���������������: ������������ (-) ���������������

    • ���������������Objective List���: ������������������������������������������������������
    • ��� SidderaX���������Dependency List���������������������������������������������������������������������������sxg file���������������

    ���������������: ������([]): ������������������������������������������������_compile_������������

    ������-tips���

    • ���������������������������������������������������������macro���������������������������������������������
    • ������������������������������������������������������ " ���������������

    ���������������: ������������������

    • ������os(optimizer.
    • ������������ ( wildcards).
    • ��������� ( macros.

    ������1: ���������makefile

    power: power.o
    @gcc -o power power.o
    power.o: power.c
    @gcc -o power.o -c power.c

    indic��� ������������������:

    • ������ power ��������� power.o���
    • power.o ��������� power.c���

    ������2: ���������source������

    power: power.o compute.o
    @gcc -o power power.o compute.o
    power.o: power.c
    @gcc -o power.o -c power.c
    compute.o: compute.c
    @gcc -o compute.o -c compute.c

    5. makefile������������ (Variables)

    makefile���������������������������������

    • ������ ( Define ):

      Vars := "value"

      ������������������������������������������

    • ������ ( Append ):

      Vars += "value"

      ���������:

      Vars := "value" "������value"
    • ������(������)( Reference):

      $(Vars)

      Use only for variables with names lasting at least two characters.

    • ������������ (Built-in Variables): make ������������������������������:

      • $@��� ������������������������
      • $<��� ��� SidderaX���������������������TARGET.
      • $$��� ���������������.

    6. ���_target ( Phantom Targets)

    ���������������������������������������make��������������������������������� ���������������������

    ���������������������

    • all: ������������ petitioner ������
    • clean: ���������������������
    • install: ���������������������
    • uninstall: ���������������������

    ���������������������

    • ������������������������������
    • ������make commands ���������������

    7. ������������

    make������������������������������������������������������������������������files���:

    • .DEFAULT: ������������������������������������������������������������.
    • .IGNORE: ��������������� currency���
    • .PHONY: ������������������������.
    • .SILENT: ������source��� ������ude instructions.
    • .SUFFIXES: ���������������������.

    8.������������������ (Default Rules)

    make���������������������������zum ���:

    %.o : %.c
    @gcc -c $?
    .a : .s
    @gcc -o $?

    make���������������������������������������������������

    ������������ ( Next Steps)

    ������������make���Makefile������������������������������ ������������������������������ading������������������olesco

    • comprehension: ������������ Mammary���������������������������
    • ������ading: from ������������������������������������.

    ���������������������������������������������������������make���Makefile���������������������

    上一篇:C语言_常用排序算法
    下一篇:C语言高质量编码规范

    发表评论

    最新留言

    初次前来,多多关照!
    [***.217.46.12]2025年04月15日 20时34分00秒