2
# ** Copyright 2003-2010, VisualOn, Inc.
4
# ** Licensed under the Apache License, Version 2.0 (the "License");
5
# ** you may not use this file except in compliance with the License.
6
# ** You may obtain a copy of the License at
8
# ** http://www.apache.org/licenses/LICENSE-2.0
10
# ** Unless required by applicable law or agreed to in writing, software
11
# ** distributed under the License is distributed on an "AS IS" BASIS,
12
# ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
# ** See the License for the specific language governing permissions and
14
# ** limitations under the License.
23
LIB_STATIC=$(VOTARGET).a
24
LIB_DYNAMIC=$(VOTARGET).so
31
CFLAGS=$(VOCFLAGS) $(addprefix -I, $(VOSRCDIR))
32
CPPFLAGS=$(VOCPPFLAGS) $(addprefix -I, $(VOSRCDIR))
34
ASFLAGS=$(VOASFLAGS) $(addprefix -I, $(VOSRCDIR))
38
VOTEDEPS+=$(VODEPLIBS)
39
VOTLDEPS+=$(VODEPLIBS)
43
vpath %.cpp $(VOSRCDIR)
49
BLTDIRS=$(VORELDIR)/Linux/static
50
BLTDIRD=$(VORELDIR)/Linux/shared
52
BLTDIRS=$(VORELDIR)/Google/$(VONJ)/lib/$(VOTT)
53
BLTDIRD=$(VORELDIR)/Google/$(VONJ)/so/$(VOTT)
57
.PRECIOUS: $(OBJDIR)/%.o
60
all: mkdirs $(LIB_STATIC) $(LIB_DYNAMIC)
61
mkdirs: $(OBJDIR) $(BLTDIRS) $(BLTDIRD)
68
@if test ! -d $@; then \
74
@if test ! -d $@; then \
78
@if test ! -d $@; then \
86
$(AR) cr $@ $(OBJDIR)/*.o $(VOSTCLIBS)
92
$(LIB_DYNAMIC):$(OBJS)
93
$(GG) $(LDFLAGS) -o $@ $(OBJDIR)/*.o -Wl,--whole-archive $(VOSTCLIBS) -Wl,--no-whole-archive $(VOTLDEPS)
101
$(GG) $(LDFLAGS) -o $@ $(OBJDIR)/*.o -Wl,--whole-archive $(VOSTCLIBS) -Wl,--no-whole-archive $(VOTEDEPS)
102
ifneq ($(VODBG), yes)
109
.SUFFIXES: .c .cpp .s .o
111
$(VERBOSE) $(CC) $(CFLAGS) -o $(OBJDIR)/$@ -c $<
113
# $(VERBOSE) $(CC) $(CFLAGS) -o $@ -c $<
115
$(VERBOSE) $(GG) $(CPPFLAGS) -o $(OBJDIR)/$@ -c $<
118
$(VERBOSE) $(AS) $(ASFLAGS) -o $(OBJDIR)/$@ $<
125
-rm -fr $(OBJDIR) .*.sw* $(VOTARGET).*
127
-rm -fr $(OBJDIR) .*.sw* $(VOTARGET)
131
cp -a $(LIB_STATIC) $(BLTDIRS)
132
cp -a $(LIB_DYNAMIC) $(BLTDIRD)