minimum c++ make file for linux

后端 未结 11 1795
眼角桃花
眼角桃花 2020-12-23 17:32

I\'ve looking to find a simple recommended \"minimal\" c++ makefile for linux which will use g++ to compile and link a single file and h file. Ideally the make file will not

11条回答
  •  礼貌的吻别
    2020-12-23 18:14

    a fairly small GNU Makefile, using predefined rules and auto-deps:

    CC=c++
    CXXFLAGS=-g -Wall -Wextra -MMD
    LDLIBS=-lm
    program: program.o sub.o
    clean:
        $(RM) *.o *.d program
    -include $(wildcard *.d)
    

提交回复
热议问题