History

configure: add --enable-static option

Fixes issue #62.

James Zern committed 15 years ago

Commit 495b2411 parent 5b0de483 files · +23 −7Browse files

Unified · Split

3 files
  1. configure +4 −0
  2. examples.mk +3 −1
  3. libs.mk +16 −6
configure+4−0
@@ -40,6 +40,7 @@ Advanced options: · 39 unmodified lines
40 ${toggle_error_concealment} enable this option to get a decoder which is able to conceal losses40 ${toggle_error_concealment} enable this option to get a decoder which is able to conceal losses
41 ${toggle_runtime_cpu_detect} runtime cpu detection41 ${toggle_runtime_cpu_detect} runtime cpu detection
42 ${toggle_shared} shared library support42 ${toggle_shared} shared library support
43 ${toggle_static} static library support
43 ${toggle_small} favor smaller size over speed44 ${toggle_small} favor smaller size over speed
44 ${toggle_postproc_visualizer} macro block / block level visualizers45 ${toggle_postproc_visualizer} macro block / block level visualizers
45 46
@@ -153,6 +154,7 @@ enabled doxygen && php -v >/dev/null 2>&1 && enable install_docs · 107 unmodified lines
153enable install_bins154enable install_bins
154enable install_libs155enable install_libs
155 156
157enable static
156enable optimizations158enable optimizations
157enable fast_unaligned #allow unaligned accesses, if supported by hw159enable fast_unaligned #allow unaligned accesses, if supported by hw
158enable md5160enable md5
@@ -252,6 +254,7 @@ CONFIG_LIST=" · 93 unmodified lines
252 realtime_only254 realtime_only
253 error_concealment255 error_concealment
254 shared256 shared
257 static
255 small258 small
256 postproc_visualizer259 postproc_visualizer
257 os_support260 os_support
@@ -293,6 +296,7 @@ CMDLINE_SELECT=" · 35 unmodified lines
293 realtime_only296 realtime_only
294 error_concealment297 error_concealment
295 shared298 shared
299 static
296 small300 small
297 postproc_visualizer301 postproc_visualizer
298"302"
examples.mk+3−1
@@ -167,8 +167,10 @@ BINS-$(NOT_MSVS) += $(addprefix $(BUILD_PFX),$(ALL_EXAMPLES:.c=)) · 166 unmodified lines
167 167
168# Instantiate linker template for all examples.168# Instantiate linker template for all examples.
169CODEC_LIB=$(if $(CONFIG_DEBUG_LIBS),vpx_g,vpx)169CODEC_LIB=$(if $(CONFIG_DEBUG_LIBS),vpx_g,vpx)
170CODEC_LIB_SUF=$(if $(CONFIG_SHARED),.so,.a)
170$(foreach bin,$(BINS-yes),\171$(foreach bin,$(BINS-yes),\
171 $(if $(BUILD_OBJS),$(eval $(bin): $(LIB_PATH)/lib$(CODEC_LIB).a))\172 $(if $(BUILD_OBJS),$(eval $(bin):\
173 $(LIB_PATH)/lib$(CODEC_LIB)$(CODEC_LIB_SUF)))\
172 $(if $(BUILD_OBJS),$(eval $(call linker_template,$(bin),\174 $(if $(BUILD_OBJS),$(eval $(call linker_template,$(bin),\
173 $(call objs,$($(notdir $(bin)).SRCS)) \175 $(call objs,$($(notdir $(bin)).SRCS)) \
174 -l$(CODEC_LIB) $(addprefix -l,$(CODEC_EXTRA_LIBS))\176 -l$(CODEC_LIB) $(addprefix -l,$(CODEC_EXTRA_LIBS))\
libs.mk+16−6
@@ -121,7 +121,7 @@ INSTALL-LIBS-$(CONFIG_SHARED) += $(foreach p,$(VS_PLATFORMS),$(LIBSUBDIR)/$(p)/v · 120 unmodified lines
121INSTALL-LIBS-$(CONFIG_SHARED) += $(foreach p,$(VS_PLATFORMS),$(LIBSUBDIR)/$(p)/vpx.exp)121INSTALL-LIBS-$(CONFIG_SHARED) += $(foreach p,$(VS_PLATFORMS),$(LIBSUBDIR)/$(p)/vpx.exp)
122endif122endif
123else123else
124INSTALL-LIBS-yes += $(LIBSUBDIR)/libvpx.a124INSTALL-LIBS-$(CONFIG_STATIC) += $(LIBSUBDIR)/libvpx.a
125INSTALL-LIBS-$(CONFIG_DEBUG_LIBS) += $(LIBSUBDIR)/libvpx_g.a125INSTALL-LIBS-$(CONFIG_DEBUG_LIBS) += $(LIBSUBDIR)/libvpx_g.a
126endif126endif
127 127
@@ -177,12 +177,13 @@ endif · 49 unmodified lines
177else177else
178LIBVPX_OBJS=$(call objs,$(CODEC_SRCS))178LIBVPX_OBJS=$(call objs,$(CODEC_SRCS))
179OBJS-$(BUILD_LIBVPX) += $(LIBVPX_OBJS)179OBJS-$(BUILD_LIBVPX) += $(LIBVPX_OBJS)
180LIBS-$(BUILD_LIBVPX) += $(BUILD_PFX)libvpx.a $(BUILD_PFX)libvpx_g.a180LIBS-$(CONFIG_STATIC) += $(BUILD_PFX)libvpx.a $(BUILD_PFX)libvpx_g.a
181$(BUILD_PFX)libvpx_g.a: $(LIBVPX_OBJS)181$(BUILD_PFX)libvpx_g.a: $(LIBVPX_OBJS)
182 182
183BUILD_LIBVPX_SO := $(if $(BUILD_LIBVPX),$(CONFIG_SHARED))183BUILD_LIBVPX_SO := $(if $(BUILD_LIBVPX),$(CONFIG_SHARED))
184LIBVPX_SO := libvpx.so.$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_PATCH)184LIBVPX_SO := libvpx.so.$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_PATCH)
185LIBS-$(BUILD_LIBVPX_SO) += $(BUILD_PFX)$(LIBVPX_SO)185LIBS-$(BUILD_LIBVPX_SO) += $(BUILD_PFX)$(LIBVPX_SO)\
186 $(notdir $(LIBVPX_SO_SYMLINKS))
186$(BUILD_PFX)$(LIBVPX_SO): $(LIBVPX_OBJS) libvpx.ver187$(BUILD_PFX)$(LIBVPX_SO): $(LIBVPX_OBJS) libvpx.ver
187$(BUILD_PFX)$(LIBVPX_SO): extralibs += -lm188$(BUILD_PFX)$(LIBVPX_SO): extralibs += -lm
188$(BUILD_PFX)$(LIBVPX_SO): SONAME = libvpx.so.$(VERSION_MAJOR)189$(BUILD_PFX)$(LIBVPX_SO): SONAME = libvpx.so.$(VERSION_MAJOR)
@@ -198,9 +199,18 @@ libvpx.ver: $(call enabled,CODEC_EXPORTS) · 9 unmodified lines
198 $(qexec)echo "local: *; };" >> $@199 $(qexec)echo "local: *; };" >> $@
199CLEAN-OBJS += libvpx.ver200CLEAN-OBJS += libvpx.ver
200 201
201$(addprefix $(DIST_DIR)/,$(LIBVPX_SO_SYMLINKS)): $(DIST_DIR)/$(LIBSUBDIR)/$(LIBVPX_SO)202define libvpx_symlink_template
202 @echo " [LN] $@"203$(1): $(2)
203 $(qexec)ln -sf $(LIBVPX_SO) $@204 @echo " [LN] $$@"
205 $(qexec)ln -sf $(LIBVPX_SO) $$@
206endef
207
208$(eval $(call libvpx_symlink_template,\
209 $(addprefix $(BUILD_PFX),$(notdir $(LIBVPX_SO_SYMLINKS))),\
210 $(BUILD_PFX)$(LIBVPX_SO)))
211$(eval $(call libvpx_symlink_template,\
212 $(addprefix $(DIST_DIR)/,$(LIBVPX_SO_SYMLINKS)),\
213 $(DIST_DIR)/$(LIBSUBDIR)/$(LIBVPX_SO)))
204 214
205INSTALL-LIBS-$(CONFIG_SHARED) += $(LIBVPX_SO_SYMLINKS)215INSTALL-LIBS-$(CONFIG_SHARED) += $(LIBVPX_SO_SYMLINKS)
206INSTALL-LIBS-$(CONFIG_SHARED) += $(LIBSUBDIR)/$(LIBVPX_SO)216INSTALL-LIBS-$(CONFIG_SHARED) += $(LIBSUBDIR)/$(LIBVPX_SO)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t