bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ?????? ?????? Implicit rule for linking multiple object files


From: ljh
Subject: Re: ?????? ?????? Implicit rule for linking multiple object files
Date: Fri, 12 Aug 2022 03:58:53 +0800

Hi Paul,

I use some example code which uses C++20 modules.

There are five .cpp files, e.g:
main.c  depends on a.c b.c c.c d.c
b.c d.c depends on c.c
a.c     depends on b.c
d.c     depends on a.c

I update my Makefile like the following. Is it correct and guaranteed to work
under parallel make?

CXXFLAGS = -std=c++2a -fmodules-ts
CC       = $(CXX)

# executable
main : a.o b.o c.o d.o main.o

# order of compiling object files
main.o : a.o b.o c.o d.o
b.o d.o : c.o
a.o : b.o
d.o : a.o


Thanks


reply via email to

[Prev in Thread] Current Thread [Next in Thread]