This repository has been archived by the owner on Apr 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'oscam-svn' of [email protected]:oscam-emu/oscam-…
…patched.git Drop emu's stream relay in favour of oscam's relay. Drop ffdecsa in favour of libdvbcsa. Thanks to WXbet for the necessary adjustments. Co-authored-by: WXbet <[email protected]>
- Loading branch information
Showing
74 changed files
with
5,855 additions
and
5,885 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,6 +50,10 @@ ifeq ($(uname_S),FreeBSD) | |
LIB_DL := | ||
endif | ||
|
||
ifeq "$(shell ./config.sh --enabled MODULE_STREAMRELAY)" "Y" | ||
override USE_LIBDVBCSA=1 | ||
endif | ||
|
||
override STD_LIBS := -lm $(LIB_PTHREAD) $(LIB_DL) $(LIB_RT) | ||
override STD_DEFS := -D'CS_SVN_VERSION="$(SVN_REV)"' | ||
override STD_DEFS += -D'CS_CONFDIR="$(CONF_DIR)"' | ||
|
@@ -58,18 +62,25 @@ override STD_DEFS += -D'CS_CONFDIR="$(CONF_DIR)"' | |
CC_WARN = -W -Wall -Wshadow -Wredundant-decls -Wstrict-prototypes -Wold-style-definition | ||
|
||
# Compiler optimizations | ||
CC_OPTS = -O2 -ggdb -pipe -ffunction-sections -fdata-sections | ||
ifeq ($(HOSTCC),clang) | ||
CC_OPTS = -O2 -ggdb -pipe -ffunction-sections -fdata-sections -fomit-frame-pointer | ||
else | ||
CC_OPTS = -O2 -ggdb -pipe -ffunction-sections -fdata-sections -fomit-frame-pointer -fno-schedule-insns | ||
endif | ||
|
||
CC = $(CROSS_DIR)$(CROSS)gcc | ||
STRIP = $(CROSS_DIR)$(CROSS)strip | ||
|
||
LDFLAGS = -Wl,--gc-sections | ||
|
||
#enable sse2 on x86, neon on arm | ||
TARGETHELP := $(shell $(CC) --target-help 2>&1) | ||
ifneq (,$(findstring sse2,$(TARGETHELP))) | ||
override CFLAGS += -fexpensive-optimizations -mmmx -msse -msse2 -msse3 | ||
else | ||
override CFLAGS += -fexpensive-optimizations | ||
override CFLAGS += -mmmx -msse -msse2 -msse3 | ||
else ifneq (,$(findstring neon,$(TARGETHELP))) | ||
ifeq "$(shell ./config.sh --enabled WITH_ARM_NEON)" "Y" | ||
override CFLAGS += -mfpu=neon | ||
endif | ||
endif | ||
|
||
# The linker for powerpc have bug that prevents --gc-sections from working | ||
|
@@ -106,6 +117,7 @@ DEFAULT_SU980_LIB = -lentropic -lrt | |
DEFAULT_AZBOX_LIB = -Lextapi/openxcas -lOpenXCASAPI | ||
DEFAULT_LIBCRYPTO_LIB = -lcrypto | ||
DEFAULT_SSL_LIB = -lssl | ||
DEFAULT_LIBDVBCSA_LIB = -ldvbcsa | ||
ifeq ($(uname_S),Linux) | ||
DEFAULT_LIBUSB_LIB = -lusb-1.0 -lrt | ||
else | ||
|
@@ -117,15 +129,13 @@ ifeq ($(uname_S),FreeBSD) | |
DEFAULT_LIBUSB_LIB = -lusb | ||
endif | ||
ifeq ($(uname_S),Darwin) | ||
FIX_OPENSSL_FLAGS_DIR := $(shell ln -sf /usr/local/opt/[email protected]/include/openssl /usr/local/include) | ||
FIX_OPENSSL_LIB_DIR := $(shell ln -sf /usr/local/opt/[email protected]/lib/libssl.1.1.dylib /usr/local/lib) | ||
FIX_OPENSSL_LIBCRYPTO_DIR := $(shell ln -sf /usr/local/opt/[email protected]/lib/libcrypto.1.1.dylib /usr/local/lib) | ||
DEFAULT_LIBCRYPTO_LIB = -L/usr/local/opt/[email protected]/lib -lcrypto | ||
DEFAULT_SSL_LIB = -L/usr/local/opt/[email protected]/lib -lssl | ||
DEFAULT_SSL_LIB = -L/usr/local/opt/openssl/lib -lssl | ||
DEFAULT_LIBCRYPTO_LIB = -L/usr/local/opt/openssl/lib -lcrypto | ||
DEFAULT_LIBDVBCSA_LIB = -L/usr/local/opt/libdvbcsa/lib -ldvbcsa | ||
DEFAULT_LIBUSB_FLAGS = -I/usr/local/opt/libusb/include | ||
DEFAULT_LIBUSB_LIB = -L/usr/local/opt/libusb/lib -lusb-1.0 -framework IOKit -framework CoreFoundation -framework Security | ||
DEFAULT_LIBUSB_LIB = -L/usr/local/opt/libusb/lib -lusb-1.0 -lobjc -framework IOKit -framework CoreFoundation -framework Security | ||
DEFAULT_PCSC_FLAGS = -I/usr/local/opt/pcsc-lite/include/PCSC | ||
DEFAULT_PCSC_LIB = -L/usr/local/opt/pcsc-lite/lib -framework IOKit -framework CoreFoundation -framework PCSC | ||
DEFAULT_PCSC_LIB = -L/usr/local/opt/pcsc-lite/lib -lpcsclite -lobjc -framework IOKit -framework CoreFoundation -framework PCSC | ||
else | ||
# Get the compiler's last include PATHs. Basicaly it is /usr/include | ||
# but in case of cross compilation it might be something else. | ||
|
@@ -180,6 +190,7 @@ $(eval $(call prepare_use_flags,SSL,ssl)) | |
$(eval $(call prepare_use_flags,LIBCRYPTO,)) | ||
$(eval $(call prepare_use_flags,LIBUSB,libusb)) | ||
$(eval $(call prepare_use_flags,PCSC,pcsc)) | ||
$(eval $(call prepare_use_flags,LIBDVBCSA,libdvbcsa)) | ||
$(eval $(call prepare_use_flags,UTF8)) | ||
|
||
# Add PLUS_TARGET and EXTRA_TARGET to TARGET | ||
|
@@ -285,15 +296,13 @@ SRC-$(CONFIG_MODULE_CCCSHARE) += module-cccshare.c | |
SRC-$(CONFIG_MODULE_CONSTCW) += module-constcw.c | ||
SRC-$(CONFIG_WITH_EMU) += module-emulator.c | ||
SRC-$(CONFIG_WITH_EMU) += module-emulator-osemu.c | ||
SRC-$(CONFIG_WITH_EMU) += module-emulator-streamserver.c | ||
SRC-$(CONFIG_WITH_EMU) += module-emulator-biss.c | ||
SRC-$(CONFIG_WITH_EMU) += module-emulator-cryptoworks.c | ||
SRC-$(CONFIG_WITH_EMU) += module-emulator-director.c | ||
SRC-$(CONFIG_WITH_EMU) += module-emulator-irdeto.c | ||
SRC-$(CONFIG_WITH_EMU) += module-emulator-nagravision.c | ||
SRC-$(CONFIG_WITH_EMU) += module-emulator-powervu.c | ||
SRC-$(CONFIG_WITH_EMU) += module-emulator-viaccess.c | ||
SRC-$(CONFIG_WITH_EMU) += ffdecsa/ffdecsa.c | ||
ifeq "$(CONFIG_WITH_EMU)" "y" | ||
ifeq "$(CONFIG_WITH_SOFTCAM)" "y" | ||
UNAME := $(shell uname -s) | ||
|
@@ -325,7 +334,6 @@ SRC-$(CONFIG_MODULE_GBOX) += module-gbox-sms.c | |
SRC-$(CONFIG_MODULE_GBOX) += module-gbox-remm.c | ||
SRC-$(CONFIG_MODULE_GBOX) += module-gbox-cards.c | ||
SRC-$(CONFIG_MODULE_GBOX) += module-gbox.c | ||
SRC-$(CONFIG_IRDETO_GUESSING) += module-ird-guess.c | ||
SRC-$(CONFIG_LCDSUPPORT) += module-lcd.c | ||
SRC-$(CONFIG_LEDSUPPORT) += module-led.c | ||
SRC-$(CONFIG_MODULE_MONITOR) += module-monitor.c | ||
|
@@ -336,6 +344,7 @@ SRC-$(CONFIG_MODULE_GHTTP) += module-ghttp.c | |
SRC-$(CONFIG_MODULE_RADEGAST) += module-radegast.c | ||
SRC-$(CONFIG_MODULE_SCAM) += module-scam.c | ||
SRC-$(CONFIG_MODULE_SERIAL) += module-serial.c | ||
SRC-$(CONFIG_MODULE_STREAMRELAY) += module-streamrelay.c | ||
SRC-$(CONFIG_WITH_LB) += module-stat.c | ||
SRC-$(CONFIG_WEBIF) += module-webif-lib.c | ||
SRC-$(CONFIG_WEBIF) += module-webif-tpl.c | ||
|
@@ -407,7 +416,7 @@ SRC := $(subst config.c,$(OBJDIR)/config.c,$(SRC)) | |
# starts the compilation. | ||
all: | ||
@./config.sh --use-flags "$(USE_FLAGS)" --objdir "$(OBJDIR)" --make-config.mak | ||
@-mkdir -p $(OBJDIR)/cscrypt $(OBJDIR)/csctapi $(OBJDIR)/minilzo $(OBJDIR)/ffdecsa $(OBJDIR)/webif | ||
@-mkdir -p $(OBJDIR)/cscrypt $(OBJDIR)/csctapi $(OBJDIR)/minilzo $(OBJDIR)/webif | ||
@-printf "\ | ||
+-------------------------------------------------------------------------------\n\ | ||
| OSCam ver: $(VER) rev: $(SVN_REV) target: $(TARGET)\n\ | ||
|
@@ -454,7 +463,7 @@ $(OBJDIR)/config.o: $(OBJDIR)/config.c | |
$(Q)$(CC) $(STD_DEFS) $(CC_OPTS) $(CC_WARN) $(CFLAGS) -c $< -o $@ | ||
|
||
$(OBJDIR)/%.o: %.c Makefile | ||
@$(CC) -MP -MM -MT $@ -o $(subst .o,.d,$@) $< | ||
@$(CC) $(CFLAGS) -MP -MM -MT $@ -o $(subst .o,.d,$@) $< | ||
$(SAY) "CC $<" | ||
$(Q)$(CC) $(STD_DEFS) $(CC_OPTS) $(CC_WARN) $(CFLAGS) -c $< -o $@ | ||
|
||
|
@@ -697,6 +706,13 @@ OSCam build system documentation\n\ | |
SSL_LDFLAGS='$(DEFAULT_SSL_FLAGS)'\n\ | ||
SSL_LIB='$(DEFAULT_SSL_LIB)'\n\ | ||
Using USE_SSL=1 adds to '-ssl' to PLUS_TARGET.\n\ | ||
\n\ | ||
USE_LIBDVBCSA=1 - Request linking with libdvbcsa. USE_LIBDVBCSA is automatically\n\ | ||
The variables that control USE_LIBDVBCSA=1 build are:\n\ | ||
LIBDVBCSA_FLAGS='$(DEFAULT_LIBDVBCSA_FLAGS)'\n\ | ||
LIBDVBCSA_CFLAGS='$(DEFAULT_LIBDVBCSA_FLAGS)'\n\ | ||
LIBDVBCSA_LDFLAGS='$(DEFAULT_LIBDVBCSA_FLAGS)'\n\ | ||
LIBDVBCSA_LIB='$(DEFAULT_LIBDVBCSA_LIB)'\n\ | ||
\n\ | ||
USE_UTF8=1 - Request UTF-8 enabled webif by default.\n\ | ||
\n\ | ||
|
@@ -815,6 +831,8 @@ OSCam build system documentation\n\ | |
make USE_LIBCRYPTO=1 LIBCRYPTO_LIB=\"/usr/lib/libcrypto.a\"\n\n\ | ||
Build OSCam with static libssl and libcrypto:\n\ | ||
make USE_SSL=1 SSL_LIB=\"/usr/lib/libssl.a\" LIBCRYPTO_LIB=\"/usr/lib/libcrypto.a\"\n\n\ | ||
Build OSCam with static libdvbcsa:\n\ | ||
make USE_LIBDVBCSA=1 LIBDVBCSA_LIB=\"/usr/lib/libdvbcsa.a\"\n\n\ | ||
Build with verbose messages and size optimizations:\n\ | ||
make V=1 CC_OPTS=-Os\n\n\ | ||
Build and set oscam file name:\n\ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.