bug-make
[Top][All Lists]
Advanced

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

Re: Paths above current/working directory don't work with suffix rules


From: Adam Tuja
Subject: Re: Paths above current/working directory don't work with suffix rules
Date: Mon, 24 Jan 2022 21:27:43 +0100

Thanks for an answer. With your help I was able to come up with this piece:

--

PROG = ab
LD = $(CC)

SRCS = a.c b.c ../c-1up.c
OBJS = $(SRCS:.c=.o)

.c.o:
        $(CC) $(CFLAGS) -c -o $@ $<
.cpp.o:

        $(CXX) $(CXXFLAGS) -c -o $@ $<

all: $(PROG)

$(PROG): $(OBJS)
$(LD) -o $@ $(OBJS) $(LIBS)

--


Now, when I understand it, it works. It's not the same thing as objects are placed beside source files but step forward nevertheless.

I will check VPATH later.

Regards
Adam



reply via email to

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