Parallel makefile requires dependency ordering

后端 未结 5 657
青春惊慌失措
青春惊慌失措 2021-02-03 23:21

I have the following piece of makefile:

CXXFLAGS = -std=c++0x -Wall
SRCS     = test1.cpp test2.cpp
OBJDIR   = object
OBJS     = $(SRCS:%.cpp=$(OBJDIR)/%.o)

all:         


        
5条回答
  •  悲哀的现实
    2021-02-03 23:33

    My preference is for

    release:
        $(MAKE) clean
        $(MAKE) test1
    

    This forces the two targets to be made consecutively without disturbing their inner parallelism (if any).

提交回复
热议问题