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

Flag changes for Mac #134

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ PLUGIN_VERSION ?= 0.9.$(shell date +%Y.%m.%d)
endif

CFLAGS ?= -O2 -g -pipe -Wall
LDFLAGS ?= -Wl,-z,relro

CFLAGS += -std=c99 -DDISCORD_PLUGIN_VERSION='"$(PLUGIN_VERSION)"'

Expand All @@ -31,6 +30,8 @@ CFLAGS += -DENABLE_NLS

# Do some nasty OS and purple version detection
ifeq ($(OS),Windows_NT)
LDFLAGS ?= -Wl,-z,relro

DISCORD_TARGET = libdiscord.dll
DISCORD_DEST = "$(PROGRAMFILES)/Pidgin/plugins"
DISCORD_ICONS_DEST = "$(PROGRAMFILES)/Pidgin/pixmaps/pidgin/protocols"
Expand All @@ -50,6 +51,8 @@ else

CC = gcc
else
LDFLAGS ?= -Wl,-z,relro

CC ?= gcc
endif

Expand Down Expand Up @@ -114,7 +117,12 @@ po/%.mo: po/%.po
msgfmt -o $@ $^

%-locale-install: po/%.mo
install -D -m $(FILE_PERM) -p po/$(*F).mo $(LOCALEDIR)/$(*F)/LC_MESSAGES/purple-discord.mo
ifeq ($(UNAME_S), Darwin)
install -d $(LOCALEDIR)/$(*F)/LC_MESSAGES/
install -m $(FILE_PERM) -p po/$(*F).mo $(LOCALEDIR)/$(*F)/LC_MESSAGES/purple-discord.mo
else
install -D -m $(FILE_PERM) -p po/$(*F).mo $(LOCALEDIR)/$(*F)/LC_MESSAGES/purple-discord.mo
endif

install: $(DISCORD_TARGET) install-icons install-locales
mkdir -m $(DIR_PERM) -p $(DISCORD_DEST)
Expand Down