summaryrefslogtreecommitdiffstats
path: root/makefiles/config.mk
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2024-05-11 21:28:48 +0900
committerMichele Calgaro <[email protected]>2024-05-11 21:28:48 +0900
commit2462d03f322261bd616721c2b2065c4004b36c9c (patch)
tree239947a0737bb8386703a1497f12c09aebd3080a /makefiles/config.mk
downloadtde-ebook-reader-2462d03f322261bd616721c2b2065c4004b36c9c.tar.gz
tde-ebook-reader-2462d03f322261bd616721c2b2065c4004b36c9c.zip
Initial import (as is) from Debian Snapshot's 'fbreader' source code (https://snapshot.debian.org/package/fbreader/0.99.4%2Bdfsg-6).
The Debian code is provided under GPL2 license. Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'makefiles/config.mk')
-rw-r--r--makefiles/config.mk54
1 files changed, 54 insertions, 0 deletions
diff --git a/makefiles/config.mk b/makefiles/config.mk
new file mode 100644
index 0000000..12b9cc1
--- /dev/null
+++ b/makefiles/config.mk
@@ -0,0 +1,54 @@
+include $(ROOTDIR)/makefiles/platforms.mk
+
+VERSION = $(shell cat $(ROOTDIR)/fbreader/VERSION)
+MAKE = make ROOTDIR=$(ROOTDIR)
+LIBMAKE = $(MAKE) ZLSHARED=$(ZLSHARED)
+
+include $(ROOTDIR)/makefiles/arch/$(TARGET_ARCH).mk
+
+BINDIR ?= $(INSTALLDIR)/bin
+LIBDIR ?= $(INSTALLDIR)/lib
+INCDIR ?= $(INSTALLDIR)/include
+SHAREDIR ?= $(INSTALLDIR)/share
+
+INSTALLDIR_MACRO ?= $(INSTALLDIR)
+LIBDIR_MACRO ?= $(LIBDIR)
+SHAREDIR_MACRO ?= $(SHAREDIR)
+IMAGEDIR_MACRO ?= $(IMAGEDIR)
+APPIMAGEDIR_MACRO ?= $(APPIMAGEDIR)
+
+XML_LIBS ?= -lexpat
+ARCHIVER_LIBS ?= -lz -lbz2
+
+CFLAGS += -DINSTALLDIR=\"$(INSTALLDIR_MACRO)\" -DBASEDIR=\"$(SHAREDIR_MACRO)\" -DLIBDIR=\"$(LIBDIR_MACRO)\" -DIMAGEDIR=\"$(IMAGEDIR_MACRO)\" -DAPPIMAGEDIR=\"$(APPIMAGEDIR_MACRO)\" -DVERSION=\"$(VERSION)\"
+ifeq "$(ZLSHARED)" "yes"
+ CFLAGS += -fPIC -DZLSHARED
+endif
+
+ifeq "$(TARGET_STATUS)" "release"
+ CFLAGS += -O3
+endif
+ifeq "$(TARGET_STATUS)" "debug"
+ CFLAGS += -O0 -g
+endif
+ifeq "$(TARGET_STATUS)" "profile"
+ CFLAGS += -O3 -g -pg
+ LDFLAGS += -pg
+endif
+
+ZINCLUDE = -I $(ROOTDIR)/zlibrary/core/include -I $(ROOTDIR)/zlibrary/text/include
+
+ZLSHARED ?= yes
+
+ifeq "$(ZLSHARED)" "yes"
+ CORE_LIBS = -lm -L$(ROOTDIR)/zlibrary/core -lzlcore
+ TEXT_LIBS = -L$(ROOTDIR)/zlibrary/text -lzltext
+ ZLUI_LIB = -L$(ROOTDIR)/zlibrary/ui -lzlui
+else
+ CORE_LIBS = -lm -L$(ROOTDIR)/zlibrary/ui -L$(ROOTDIR)/zlibrary/core -lzlcore -lzlui -lzlcore $(UILIBS) $(XML_LIBS) $(ARCHIVER_LIBS)
+ TEXT_LIBS = -L$(ROOTDIR)/zlibrary/text -lzltext $(EXTERNAL_LIBS) -lunibreak -lfribidi
+endif
+
+ifneq "$(BUILD_RESOURCE_OBJECT)" "yes"
+.resources:
+endif