Changeset 4656 for pjproject/trunk/build/rules.mak
- Timestamp:
- Nov 23, 2013 7:13:40 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/build/rules.mak
r4637 r4656 7 7 8 8 # 9 # The full path of output lib file (e.g. ../lib/libapp.a). 10 # 11 LIB = $($(APP)_LIB) 12 13 # 14 # The full path of output lib file (e.g. ../lib/libapp.a). 15 # 9 # The name(s) of output lib file(s) (e.g. libapp.a). 10 # 11 LIB := $($(APP)_LIB) 16 12 SHLIB = $($(APP)_SHLIB) 17 18 # 19 # The full path of output executable file (e.g. ../bin/app.exe). 13 SONAME = $($(APP)_SONAME) 14 15 ifeq ($(SHLIB_SUFFIX),so) 16 SHLIB_OPT := -shared -Wl,-soname,$(SHLIB) 17 else ifeq ($(SHLIB_SUFFIX),dylib) 18 SHLIB_OPT := -dynamiclib -undefined dynamic_lookup -flat_namespace 19 else 20 SHLIB_OPT := 21 endif 22 23 # 24 # The name of output executable file (e.g. app.exe). 20 25 # 21 26 EXE = $($(APP)_EXE) … … 77 82 78 83 print_bin: print_common 79 @echo EXE=$( EXE)84 @echo EXE=$(subst /,$(HOST_PSEP),$(BINDIR)/$(EXE)) 80 85 @echo BINDIR=$(BINDIR) 81 86 82 87 print_lib: print_common 83 @echo LIB=$(LIB) 88 ifneq ($(LIB),) 89 @echo LIB=$(subst /,$(HOST_PSEP),$(LIBDIR)/$(LIB)) 90 endif 91 ifneq ($(SHLIB),) 92 @echo SHLIB=$(subst /,$(HOST_PSEP),$(LIBDIR)/$(SHLIB)) 93 endif 94 ifneq ($(SONAME),) 95 @echo SONAME=$(subst /,$(HOST_PSEP),$(LIBDIR)/$(SONAME)) 96 endif 84 97 @echo LIBDIR=$(LIBDIR) 85 98 86 $(LIB): $(OBJDIRS) $(OBJS) $($(APP)_EXTRA_DEP) 99 ifneq ($(LIB),) 100 $(subst /,$(HOST_PSEP),$(LIBDIR)/$(LIB)): $(OBJDIRS) $(OBJS) $($(APP)_EXTRA_DEP) 87 101 if test ! -d $(LIBDIR); then $(subst @@,$(subst /,$(HOST_PSEP),$(LIBDIR)),$(HOST_MKDIR)); fi 88 $(AR) $(AR_FLAGS) $(LIB) $(OBJS) 89 $(RANLIB) $(LIB) 90 91 $(SHLIB): $(OBJDIRS) $(OBJS) $($(APP)_EXTRA_DEP) 102 $(AR) $(AR_FLAGS) $@ $(OBJS) 103 $(RANLIB) $@ 104 endif 105 106 ifneq ($(SHLIB),) 107 $(subst /,$(HOST_PSEP),$(LIBDIR)/$(SHLIB)): $(OBJDIRS) $(OBJS) $($(APP)_EXTRA_DEP) 92 108 if test ! -d $(LIBDIR); then $(subst @@,$(subst /,$(HOST_PSEP),$(LIBDIR)),$(HOST_MKDIR)); fi 93 $(LD) $(LDOUT)$(subst /,$(HOST_PSEP),$(SHLIB)) \ 109 $(LD) $(LDOUT)$(subst /,$(HOST_PSEP),$@) \ 110 $(subst /,$(HOST_PSEP),$(OBJS)) $($(APP)_LDFLAGS) $(SHLIB_OPT) 111 endif 112 113 ifneq ($(SONAME),) 114 $(subst /,$(HOST_PSEP),$(LIBDIR)/$(SONAME)): $(subst /,$(HOST_PSEP),$(LIBDIR)/$(SHLIB)) 115 ln -sf $(SHLIB) $@ 116 endif 117 118 ifneq ($(EXE),) 119 $(subst /,$(HOST_PSEP),$(BINDIR)/$(EXE)): $(OBJDIRS) $(OBJS) $($(APP)_EXTRA_DEP) 120 if test ! -d $(BINDIR); then $(subst @@,$(subst /,$(HOST_PSEP),$(BINDIR)),$(HOST_MKDIR)); fi 121 $(LD) $(LDOUT)$(subst /,$(HOST_PSEP),$(BINDIR)/$(EXE)) \ 94 122 $(subst /,$(HOST_PSEP),$(OBJS)) $($(APP)_LDFLAGS) 95 96 $(EXE): $(OBJDIRS) $(OBJS) $($(APP)_EXTRA_DEP) 97 if test ! -d $(BINDIR); then $(subst @@,$(subst /,$(HOST_PSEP),$(BINDIR)),$(HOST_MKDIR)); fi 98 $(LD) $(LDOUT)$(subst /,$(HOST_PSEP),$(EXE)) \ 99 $(subst /,$(HOST_PSEP),$(OBJS)) $($(APP)_LDFLAGS) 123 endif 100 124 101 125 $(OBJDIR)/$(app).o: $(OBJDIRS) $(OBJS) … … 148 172 149 173 $(OBJDIRS): 150 $(subst @@,$(subst /,$(HOST_PSEP),$@),$(HOST_MKDIR)) 174 $(subst @@,$(subst /,$(HOST_PSEP),$@),$(HOST_MKDIR)) 151 175 152 176 $(LIBDIR): 153 $(subst @@,$(subst /,$(HOST_PSEP),$ (LIBDIR)),$(HOST_MKDIR))177 $(subst @@,$(subst /,$(HOST_PSEP),$@),$(HOST_MKDIR)) 154 178 155 179 $(BINDIR): 156 $(subst @@,$(subst /,$(HOST_PSEP),$ (BINDIR)),$(HOST_MKDIR))180 $(subst @@,$(subst /,$(HOST_PSEP),$@),$(HOST_MKDIR)) 157 181 158 182 clean: … … 169 193 170 194 realclean: clean 171 $(subst @@,$(subst /,$(HOST_PSEP),$(LIB)) $(subst /,$(HOST_PSEP),$(EXE)),$(HOST_RM)) 195 ifneq ($(LIB),) 196 $(subst @@,$(subst /,$(HOST_PSEP),$(LIBDIR)/$(LIB)),$(HOST_RM)) 197 endif 198 ifneq ($(SHLIB),) 199 $(subst @@,$(subst /,$(HOST_PSEP),$(LIBDIR)/$(SHLIB)),$(HOST_RM)) 200 endif 201 ifneq ($(SONAME),) 202 $(subst @@,$(subst /,$(HOST_PSEP),$(LIBDIR)/$(SONAME)),$(HOST_RM)) 203 endif 204 ifneq ($(EXE),) 205 $(subst @@,$(subst /,$(HOST_PSEP),$(BINDIR)/$(EXE)),$(HOST_RM)) 206 endif 172 207 $(subst @@,$(DEP_FILE),$(HOST_RM)) 173 208 ifeq ($(OS_NAME),linux-kernel)
Note: See TracChangeset
for help on using the changeset viewer.