Update Makefile and README.md

This commit is contained in:
Grégory Soutadé 2021-08-25 21:54:52 +02:00
parent 2ac917619e
commit 8a2b22ca9b
2 changed files with 23 additions and 10 deletions

View File

@ -9,14 +9,19 @@ LDFLAGS = $(UPDFPARSERLIB)
BUILD_STATIC ?= 0 BUILD_STATIC ?= 0
BUILD_SHARED ?= 1 BUILD_SHARED ?= 1
BUILD_UTILS ?= 1
TARGETS = TARGETS =
ifneq (BUILD_STATIC, 0) ifneq ($(BUILD_STATIC), 0)
TARGETS += libgourou.a TARGETS += libgourou.a
endif endif
ifneq (BUILD_SHARED, 0) ifneq ($(BUILD_SHARED), 0)
TARGETS += libgourou.so TARGETS += libgourou.so
endif endif
ifneq ($(BUILD_UTILS), 0)
TARGETS += build_utils
endif
ifneq ($(DEBUG),) ifneq ($(DEBUG),)
CXXFLAGS += -ggdb -O0 CXXFLAGS += -ggdb -O0
@ -34,9 +39,7 @@ OBJEXT := o
SOURCES = src/libgourou.cpp src/user.cpp src/device.cpp src/fulfillment_item.cpp src/bytearray.cpp src/pugixml.cpp SOURCES = src/libgourou.cpp src/user.cpp src/device.cpp src/fulfillment_item.cpp src/bytearray.cpp src/pugixml.cpp
OBJECTS := $(patsubst $(SRCDIR)/%,$(BUILDDIR)/%,$(SOURCES:.$(SRCEXT)=.$(OBJEXT))) OBJECTS := $(patsubst $(SRCDIR)/%,$(BUILDDIR)/%,$(SOURCES:.$(SRCEXT)=.$(OBJEXT)))
.PHONY: utils all: lib obj $(TARGETS)
all: lib obj $(TARGETS) utils
lib: lib:
mkdir lib mkdir lib
@ -56,7 +59,7 @@ libgourou.a: $(OBJECTS)
libgourou.so: $(OBJECTS) $(UPDFPARSERLIB) libgourou.so: $(OBJECTS) $(UPDFPARSERLIB)
$(CXX) obj/*.o $(LDFLAGS) -o $@ -shared $(CXX) obj/*.o $(LDFLAGS) -o $@ -shared
utils: build_utils:
make -C utils ROOT=$(PWD) CXX=$(CXX) AR=$(AR) DEBUG=$(DEBUG) STATIC_UTILS=$(STATIC_UTILS) make -C utils ROOT=$(PWD) CXX=$(CXX) AR=$(AR) DEBUG=$(DEBUG) STATIC_UTILS=$(STATIC_UTILS)
clean: clean:

View File

@ -1,7 +1,7 @@
Introduction Introduction
------------ ------------
libgourou is a free implementation of Adobe's ADEPT protocol used to add DRM on ePub files. It overcome the lacks of Adobe support for Linux platforms. libgourou is a free implementation of Adobe's ADEPT protocol used to add DRM on ePub/PDF files. It overcome the lacks of Adobe support for Linux platforms.
Architecture Architecture
@ -26,6 +26,8 @@ Or create a new one. Be careful : there is a limited number of devices that can
ePub are encrypted using a shared key : one account / multiple devices, so you can create and register a device into your computer and read downloaded (and encrypted) ePub file with your eReader configured using the same AdobeID account. ePub are encrypted using a shared key : one account / multiple devices, so you can create and register a device into your computer and read downloaded (and encrypted) ePub file with your eReader configured using the same AdobeID account.
For those who wants to remove DRM, you can export your private key and import it within [Calibre](https://calibre-ebook.com/) an its DeDRM plugin.
Dependencies Dependencies
------------ ------------
@ -47,18 +49,21 @@ Compilation
Use _make_ command Use _make_ command
make [CROSS=XXX] [DEBUG=1] [STATIC_UTILS=1] [BUILD_STATIC=(0|1)] [BUILD_SHARED=(0|1)] make [CROSS=XXX] [DEBUG=1] [STATIC_UTILS=1] [BUILD_UTILS=(0|1)] [BUILD_STATIC=(0|1)] [BUILD_SHARED=(0|1)]
CROSS can define a cross compiler prefix (ie arm-linux-gnueabihf-) CROSS can define a cross compiler prefix (ie arm-linux-gnueabihf-)
DEBUG can be set to compile in DEBUG mode DEBUG can be set to compile in DEBUG mode
BUILD_UTILS to build utils or not (activated by default)
STATIC_UTILS to build utils with static library (libgourou.a) instead of default dynamic one (libgourou.so) STATIC_UTILS to build utils with static library (libgourou.a) instead of default dynamic one (libgourou.so)
BUILD_STATIC build libgourou.a if 1, nothing if 0 (default value), can be combined with BUILD_SHARED BUILD_STATIC build libgourou.a if 1, nothing if 0 (default value), can be combined with BUILD_SHARED
BUILD_SHARED build libgourou.so if 1 (default value), nothing if 0, can be combined with BUILD_STATIC BUILD_SHARED build libgourou.so if 1 (default value), nothing if 0, can be combined with BUILD_STATIC
Utils Utils
----- -----
@ -69,11 +74,16 @@ You can import configuration from your eReader or create a new one with utils/ac
Then a _./.adept_ directory is created with all configuration file Then a _./.adept_ directory is created with all configuration file
To download an ePub : To download an ePub/PDF :
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD
./utils/acsmdownloader -f <ACSM_FILE> ./utils/acsmdownloader -f <ACSM_FILE>
To export your private key :
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD
./utils/acsmdownloader --export-private-key [-o adobekey_1.der]
Copyright Copyright
--------- ---------