|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)
$(CC) $(CFLAGS) -c -o $@ $<
$(CXX) $(CXXFLAGS) -c -o $@ $<
$(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.
|[Prev in Thread]||Current Thread||[Next in Thread]|