External, Non-PPA KXStudio Repository
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.1KB

  1. #!/usr/bin/make -f
  2. include /usr/share/dpkg/architecture.mk
  3. FLAGS = -O3
  4. FLAGS += -fPIC -DPIC
  5. FLAGS += -fdata-sections -ffunction-sections
  6. FLAGS += -fno-common
  7. FLAGS += -fno-gnu-unique
  8. FLAGS += -fvisibility=hidden
  9. FLAGS += -DNDEBUG
  10. ifeq ($(DEB_HOST_ARCH),armhf)
  11. FLAGS += -march=armv7ve -mcpu=cortex-a7 -mfloat-abi=hard -mfpu=neon-vfpv4
  12. else ifeq ($(DEB_HOST_ARCH),arm64)
  13. FLAGS += -march=armv8-a -mcpu=cortex-a53
  14. else
  15. FLAGS += -mtune=generic -msse -msse2 -mfpmath=sse
  16. endif
  17. ifeq ($(KXSTUDIO_NO_FASTMATH),)
  18. FLAGS += -ffast-math
  19. endif
  20. ifeq ($(KXSTUDIO_NO_LTO),)
  21. FLAGS += -fno-strict-aliasing -flto -ffat-lto-objects
  22. endif
  23. export CFLAGS = $(FLAGS)
  24. export CXXFLAGS = $(FLAGS) -fvisibility-inlines-hidden
  25. export CPPFLAGS =
  26. export LDFLAGS = $(FLAGS) -Wl,-O1,--as-needed,--no-undefined,--gc-sections,--strip-all -Werror=odr -Werror=lto-type-mismatch
  27. export PATH := /opt/kxstudio/bin:$(PATH)
  28. export CMAKE_PREFIX_PATH = /opt/kxstudio/lib/cmake
  29. export PKG_CONFIG_PATH = /opt/kxstudio/lib/pkgconfig
  30. ifeq ($(KXSTUDIO_EXPLICIT_PATH_INCLUDE),y)
  31. export CFLAGS += -I/opt/kxstudio/include
  32. export CXXFLAGS += -I/opt/kxstudio/include
  33. export LDFLAGS += -L/opt/kxstudio/lib
  34. endif