[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
.mak file for directory with source code in subdirectories
From: |
earthwormgaz |
Subject: |
.mak file for directory with source code in subdirectories |
Date: |
24 Nov 2006 07:24:33 -0800 |
User-agent: |
G2/1.0 |
Hello group,
I have a set of directories, each with sub folders that contain source
code. For each of these I am trying to write a .mak file, and then have
each build from this and pull the resultant libs together at the end to
form a binary.
So, I have my list of sources ...
SRCS = \
example/file.cpp
different/example/file.cpp
I then have the following ...
OBJS := $(patsubst %.cpp, $(BLD)/%.o, $(SRCS))
$(BLD)/$(TRG) : $(OBJS)
@$(DBG_AR)
@$(AR) $(ARFLAGS) $(OBJS) $(ARFLAGS) -o $@
In the example I copied this from, the files were all in the same
subdirectory, and the author had used this trick ...
vpath %.cpp code/directory
Obviously I can't use this trick, and it chokes for me, I think that is
because of the directories difference.
Can anyone advise me on what to do here?
Cheers,
Gaz
- .mak file for directory with source code in subdirectories,
earthwormgaz <=