Advertisement
Guest User

make.patch

a guest
Jun 9th, 2021
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.47 KB | None | 0 0
  1. diff --git a/Makefile b/Makefile
  2. index 403b94d..2d6b196 100755
  3. --- a/Makefile
  4. +++ b/Makefile
  5. @@ -9,6 +9,11 @@ PATH_BUILD  ?= build
  6.  PATH_BUILD2 ?= $(PATH_BUILD)/gtk2
  7.  PATH_BUILD3 ?= $(PATH_BUILD)/gtk3
  8.  
  9. +PATH_BUNDLE ?= bundle
  10. +FILE_BUNDLE ?= $(PATH_BUNDLE)/bundle.tar.xz
  11. +FILE_DBUS_LIBRARY = $(PATH_BUNDLE)/libdbusmenu-glib.so.4
  12. +PATH_STATIC_DEPS = $(LIBDIR)/gtk-3.10.8/lib
  13. +
  14.  OUT_GTK2 ?= sni_gtk2.so
  15.  OUT_GTK3 ?= sni_gtk3.so
  16.  
  17. @@ -28,11 +33,8 @@ LIST_CLEAN = CMakeCache.txt         \
  18.              .ninja_log             \
  19.              *.ninja
  20.  
  21. -SNI_DEPS += dbusmenu-glib-0.4
  22. -SNI_CFLAGS ?= $(call pkg_cflags, $(SNI_DEPS))
  23. -SNI_LDFLAGS ?= $(call pkg_ldflags, $(SNI_DEPS))
  24. -
  25. -SNI_CFLAGS += -DUSE_DBUSMENU -DENABLE_NLS -DG_LOG_DOMAIN=\"plugin-sni\"
  26. +SNI_CFLAGS += -DUSE_DBUSMENU -DENABLE_NLS -DG_LOG_DOMAIN=\"plugin-sni\" -I $(abspath $(PATH_BUNDLE))
  27. +SNI_LDFLAGS += -DUSE_DBUSMENU -DENABLE_NLS -DG_LOG_DOMAIN=\"plugin-sni\" -L $(abspath $(PATH_BUNDLE)) -ldbusmenu-glib
  28.  
  29.  CFLAGS   += -Wall -Wextra -fPIC -std=c99 -D_GNU_SOURCE -Wno-unused -O2 -fvisibility=hidden $(SNI_CFLAGS)
  30.  LDFLAGS  += -shared -s -fdata-sections -ffunction-sections -Wl,-gc-sections -lX11 $(SNI_LDFLAGS)
  31. @@ -63,7 +65,10 @@ endef
  32.  
  33.  ### TARGETS
  34.  
  35. -all: gtk3
  36. +all: deps gtk3
  37. +deps: $(abspath $(FILE_BUNDLE))
  38. +   @tar -xvf $^ -C $(abspath $(PATH_BUNDLE)) && ln -s $(abspath $(FILE_DBUS_LIBRARY)) $(PATH_STATIC_DEPS)
  39. +
  40.  
  41.  mkenums: enums.c enums.h
  42.  enums.h: $(PATH_EXTRA)/enums.h.template $(PATH_EXTRA)/statusnotifier.h
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement