Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Makefile #11

Closed
wants to merge 1 commit into from
Closed

Improve Makefile #11

wants to merge 1 commit into from

Conversation

davxy
Copy link

@davxy davxy commented Nov 20, 2023

Fix build warnings

Add only cpp sources to SOURCE_FILES to remove annoying warning about #pragma once

❯ make all
g++ -shared -fPIC --no-gnu-unique src/Flash.cpp src/IFocusAnimation.cpp src/main.cpp src/Shrink.cpp src/Flash.hpp src/IFocusAnimation.hpp src/Shrink.hpp  -o hyprfocus.so -g `pkg-config --cflags pixman-1 libdrm hyprland` -std=c++2b
src/Flash.hpp:1:9: warning: #pragma once in main file
    1 | #pragma once
      |         ^~~~
src/IFocusAnimation.hpp:1:9: warning: #pragma once in main file
    1 | #pragma once
      |         ^~~~
src/Shrink.hpp:1:9: warning: #pragma once in main file
    1 | #pragma once
      |         ^~~~

Optimize artifact

  • Add -O2 optimization to compiler options
  • Strip hyprfocus.so after build (size comparison: 8MB vs 120kB)

@daxisunder daxisunder mentioned this pull request Mar 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant