Hi,
I'm trying to convert a batch-files/perl-scripts build system
to regular GNU-makefiles. One problem of me is that while there
are several directories und sub-directoris holding the source
files, there is only one directory (called OBJDIR below) which
holds the object files:
SRCS = ../src1/Sae.cpp \
../src1/SaeSysAgentNotifier.cpp \
../sra1/SaeEtelObserver.cpp \
../sra2/SaeGprsAvailabilityObs.cpp \
../src2/SaeDosObserver.cpp \
../src2/SaeConnMonObs.cpp
Now, I can get the list of object files for example like this:
OBJS = $(addprefix $(OBJDIR)/, $(notdir $(SOURCE:.cpp=.o)))
But how do I specify rules for building those object files?
I can write neither
$(SRCS): $(OBJDIR)/%.o: %.c
nor:
$(OBJS): %.o: %.c
Is VPATH (or "vpath %.c") meant for this kind of problems?
I'm worried that if I use VPATH, then I'll have filenames
clashes (ok, the current batch/perl system would have them too).
Is there maybe another way to solve it (by some string manipulations)?
Thank you
Alex
_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/help-make