c++.command-line - paths in inference rule (smake)
- "dt" <tinkham ucalgary.ca> Apr 11 2005
- "tjulian" <tjulian removethis.oldi.com> Apr 12 2005
Running with smake.
In my makefile I have a listing of some source files that I am trying to
compile, but I want the .obj files in different directory. How do I do that
when I am using an inference rule of the .cpp.obj variety?
Smake help says to use this
{dependent_path}.dependent_ext{target_path}target_ext:
commands
but is this right (only 1 period is shown)?
I have something like this in my makefile
OUTPUTDIR = C:\myoutdir
SRCS = $(SRC_PATH)\file1.cpp \
$(SRC_PATH)\file2.cpp
.cpp.obj:
$(CPP) -d -Jm -w -v1 -Ae -Ar -o-all -mn $(DEFINES) $(INCDIR) $<
all: $(SRCS:.cpp=.obj)
Can someone show me how to send my .obj files to $(OUTPUTDIR) ?
Thanks,
Doug
Apr 11 2005
dt wrote:Running with smake. In my makefile I have a listing of some source files that I am trying to compile, but I want the .obj files in different directory. How do I do that when I am using an inference rule of the .cpp.obj variety? Smake help says to use this {dependent_path}.dependent_ext{target_path}target_ext: commands but is this right (only 1 period is shown)? I have something like this in my makefile OUTPUTDIR = C:\myoutdir SRCS = $(SRC_PATH)\file1.cpp \ $(SRC_PATH)\file2.cpp .cpp.obj: $(CPP) -d -Jm -w -v1 -Ae -Ar -o-all -mn $(DEFINES) $(INCDIR) $< all: $(SRCS:.cpp=.obj) Can someone show me how to send my .obj files to $(OUTPUTDIR) ? Thanks, Doug
Inference rule would look like this: .cpp{$(OUTPUTDIR)}.obj: -- TimJ
Apr 12 2005








"tjulian" <tjulian removethis.oldi.com>