config.mk 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. include $(ROOTDIR)/makefiles/platforms.mk
  2. VERSION = $(shell cat $(ROOTDIR)/fbreader/VERSION)
  3. MAKE = make ROOTDIR=$(ROOTDIR)
  4. LIBMAKE = $(MAKE) ZLSHARED=$(ZLSHARED)
  5. include $(ROOTDIR)/makefiles/arch/$(TARGET_ARCH).mk
  6. BINDIR ?= $(INSTALLDIR)/bin
  7. LIBDIR ?= $(INSTALLDIR)/lib
  8. INCDIR ?= $(INSTALLDIR)/include
  9. SHAREDIR ?= $(INSTALLDIR)/share
  10. INSTALLDIR_MACRO ?= $(INSTALLDIR)
  11. LIBDIR_MACRO ?= $(LIBDIR)
  12. SHAREDIR_MACRO ?= $(SHAREDIR)
  13. IMAGEDIR_MACRO ?= $(IMAGEDIR)
  14. APPIMAGEDIR_MACRO ?= $(APPIMAGEDIR)
  15. XML_LIBS ?= -lexpat
  16. ARCHIVER_LIBS ?= -lz -lbz2
  17. NETWORK_LIBS ?= -lcurl
  18. CFLAGS += -DINSTALLDIR=\"$(INSTALLDIR_MACRO)\" -DBASEDIR=\"$(SHAREDIR_MACRO)\" -DLIBDIR=\"$(LIBDIR_MACRO)\" -DIMAGEDIR=\"$(IMAGEDIR_MACRO)\" -DAPPIMAGEDIR=\"$(APPIMAGEDIR_MACRO)\" -DVERSION=\"$(VERSION)\"
  19. ifeq "$(ZLSHARED)" "yes"
  20. CFLAGS += -fPIC -DZLSHARED
  21. endif
  22. ifeq "$(TARGET_STATUS)" "release"
  23. CFLAGS += -O3
  24. LDFLAGS += -s
  25. endif
  26. ifeq "$(TARGET_STATUS)" "debug"
  27. CFLAGS += -O0 -g
  28. endif
  29. ifeq "$(TARGET_STATUS)" "profile"
  30. CFLAGS += -O3 -g -pg
  31. LDFLAGS += -pg
  32. endif
  33. ZINCLUDE = -I $(ROOTDIR)/zlibrary/core/include -I $(ROOTDIR)/zlibrary/text/include
  34. ZLSHARED ?= yes
  35. ifeq "$(ZLSHARED)" "yes"
  36. CORE_LIBS = -lm -L$(ROOTDIR)/zlibrary/core -lzlcore -ldl
  37. TEXT_LIBS = -lzltext
  38. else
  39. CORE_LIBS = -lm -L$(ROOTDIR)/zlibrary/ui -L$(ROOTDIR)/zlibrary/core -lzlcore -lzlui-$(UI_TYPE) -lzlcore $(UILIBS) $(XML_LIBS) $(ARCHIVER_LIBS) $(NETWORK_LIBS)
  40. TEXT_LIBS = -lzltext $(EXTERNAL_LIBS) -llinebreak -lfribidi
  41. endif
  42. ifneq "$(BUILD_RESOURCE_OBJECT)" "yes"
  43. .resources:
  44. endif