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

2022-01-24 Thread Adam Tuja
Hello,I had this problem trying to compile a source with relative paths above current/working directory level. I took me hours of frustration to make work and, it eventually didn't.Then, by a chance I realised that when I use a path within current working directory it more or less works.It doesn't

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

2022-01-24 Thread Adam Tuja
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, w