Commit da197ddb authored by Steve Lhomme's avatar Steve Lhomme Committed by Jean-Baptiste Kempf

Contrib: allow building contribs with no optimization

--
uses the same flag logic as --disable-gpl
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 4fa71c81
...@@ -31,6 +31,7 @@ usage() ...@@ -31,6 +31,7 @@ usage()
echo " --disable-sout configure to not build stream output packages" echo " --disable-sout configure to not build stream output packages"
echo " --enable-small optimize libraries for size with slight speed decrease [DANGEROUS]" echo " --enable-small optimize libraries for size with slight speed decrease [DANGEROUS]"
echo " --disable-gpl configure to not build viral GPL code" echo " --disable-gpl configure to not build viral GPL code"
echo " --disable-optim disable optimization in libraries"
} }
BUILD= BUILD=
...@@ -42,6 +43,7 @@ BUILD_ENCODERS="1" ...@@ -42,6 +43,7 @@ BUILD_ENCODERS="1"
BUILD_NETWORK="1" BUILD_NETWORK="1"
BUILD_DISCS="1" BUILD_DISCS="1"
GPL="1" GPL="1"
WITH_OPTIMIZATION="1"
if test ! -f "../../contrib/src/main.mak" if test ! -f "../../contrib/src/main.mak"
then then
...@@ -74,6 +76,9 @@ do ...@@ -74,6 +76,9 @@ do
--disable-sout) --disable-sout)
BUILD_ENCODERS= BUILD_ENCODERS=
;; ;;
--disable-optim)
WITH_OPTIMIZATION=
;;
--enable-small) --enable-small)
ENABLE_SMALL=1 ENABLE_SMALL=1
;; ;;
...@@ -226,6 +231,7 @@ test -z "$BUILD_ENCODERS" || add_make_enabled "BUILD_ENCODERS" ...@@ -226,6 +231,7 @@ test -z "$BUILD_ENCODERS" || add_make_enabled "BUILD_ENCODERS"
test -z "$BUILD_NETWORK" || add_make_enabled "BUILD_NETWORK" test -z "$BUILD_NETWORK" || add_make_enabled "BUILD_NETWORK"
test -z "$ENABLE_SMALL" || add_make_enabled "ENABLE_SMALL" test -z "$ENABLE_SMALL" || add_make_enabled "ENABLE_SMALL"
test -z "$GPL" || add_make_enabled "GPL" test -z "$GPL" || add_make_enabled "GPL"
test -z "$WITH_OPTIMIZATION" || add_make_enabled "WITH_OPTIMIZATION"
# #
# Checks # Checks
......
...@@ -166,6 +166,12 @@ CFLAGS := $(CFLAGS) $(EXTRA_CFLAGS) -g ...@@ -166,6 +166,12 @@ CFLAGS := $(CFLAGS) $(EXTRA_CFLAGS) -g
CXXFLAGS := $(CXXFLAGS) $(EXTRA_CFLAGS) -g CXXFLAGS := $(CXXFLAGS) $(EXTRA_CFLAGS) -g
EXTRA_LDFLAGS += -L$(PREFIX)/lib EXTRA_LDFLAGS += -L$(PREFIX)/lib
LDFLAGS := $(LDFLAGS) $(EXTRA_LDFLAGS) LDFLAGS := $(LDFLAGS) $(EXTRA_LDFLAGS)
ifndef WITH_OPTIMIZATION
CFLAGS := $(CFLAGS) -O0
CXXFLAGS := $(CXXFLAGS) -O0
endif
# Do not export those! Use HOSTVARS. # Do not export those! Use HOSTVARS.
# Do the FPU detection, after we have figured out our compilers and flags. # Do the FPU detection, after we have figured out our compilers and flags.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment