zoukankan      html  css  js  c++  java
  • 一个完整的Makefile文件举例

    # 设置 C 语言的编译器                                                                             
    CC = gcc                                                                                          
                                                                                                      
    # -g 增加调试信息                                                                                 
    # -Wall 打开大部分警告信息                                                                        
    CFLAGS = -g -Wall                                                                                 
                                                                                                      
    # 整理一下 main 依赖哪些目标文件                                                                  
    MAINOBJS = main.o array.o 
     
    .PHONY: clean                                                                                     
                                                                                                      
    main: $(MAINOBJS)                                                                                 
            $(CC) $(CFLAGS) -o main $(MAINOBJS)                                                       
                                                                                                      
    array.o: array.c array.h                                                                          
            $(CC) $(CFLAGS) -c -o array.o array.c                                                     
                                                                                                      
    main.o: main.c array.h                                                                            
            $(CC) $(CFLAGS) -c -o main.o main.c                                                       
                                                                                                      
    clean:                                                                                            
            rm -f $(MAINOBJS) main  
  • 相关阅读:
    centos5&6的启动过程
    linux之目录知识
    js动画
    js操作高级
    js操作
    JS基础
    跨域问题
    MySQL存储引擎
    MySQL索引管理
    MySQL操作命令
  • 原文地址:https://www.cnblogs.com/candyYang/p/10592854.html
Copyright © 2011-2022 走看看