1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162
|
#
# Makefile.mingw
#
# Description: Makefile for encrypt plugin.
#
#
# PATHS
#
PE_PIDGIN_TOP := ../../..
GTK_TOP := $(PE_PIDGIN_TOP)/../win32-dev/gtk_2_0
PE_TOP := .
PIDGIN_INSTALL_DIR := $(PE_PIDGIN_TOP)/win32-install-dir
DLL_INSTALL_DIR := $(PIDGIN_INSTALL_DIR)/plugins
STANDALONE_INSTALL_DIR := $(PE_TOP)/win32-install-dir
NSS_TOP := $(PE_PIDGIN_TOP)/../win32-dev/nss-3.11.4
NSPR_TOP := $(PE_PIDGIN_TOP)/../win32-dev/nspr-4.6.4
##
## VARIABLE DEFINITIONS
##
ENC_VERSION := $(shell cat ./VERSION)
MAIN_VERSION := $(shell cat ../../../VERSION)
TARGET = encrypt
PO = ./po
# Compiler Options
CFLAGS = -DGETTEXT_STATIC
DEFINES = -DENABLE_NLS -DENC_VERSION=\"$(ENC_VERSION)\" -DNO_CONFIG -DENC_PACKAGE=\"pidgin-encryption\" -DPIDGIN_DATADIR="wpidgin_install_dir()"
##
## INCLUDE MAKEFILES
##
include $(PE_PIDGIN_TOP)/libpurple/win32/global.mak
##
## INCLUDE PATHS
##
INCLUDE_PATHS += -I. \
-I$(GTK_TOP)/include \
-I$(NSS_TOP)/include \
-I$(NSPR_TOP)/include \
-I$(GTK_TOP)/include/gtk-2.0 \
-I$(GTK_TOP)/include/glib-2.0 \
-I$(GTK_TOP)/include/pango-1.0 \
-I$(GTK_TOP)/include/atk-1.0 \
-I$(GTK_TOP)/lib/glib-2.0/include \
-I$(GTK_TOP)/lib/gtk-2.0/include \
-I$(PE_PIDGIN_TOP)/libpurple \
-I$(PE_PIDGIN_TOP)/libpurple/win32 \
-I$(PE_PIDGIN_TOP)/pidgin \
-I$(PE_PIDGIN_TOP)/pidgin/win32 \
-I$(PE_PIDGIN_TOP)
LIB_PATHS = -L$(NSS_TOP)/lib \
-L$(NSPR_TOP)/lib \
-L$(GTK_TOP)/lib \
-L$(PE_PIDGIN_TOP)/libpurple \
-L$(PE_PIDGIN_TOP)/pidgin \
-L$(PE_PIDGIN_TOP)/win32-install-dir
##
## SOURCES, OBJECTS
##
C_SRC = pe_blist.c config_ui.c cryptutil.c gpg.c keys_ui.c \
prefs.c cryptproto.c encrypt.c keys.c nonce.c\
nss_mgf1.c nss_oaep.c nss_pss.c rsa_nss.c \
state.c state_ui.c pe_ui.c
OBJECTS = $(C_SRC:%.c=%.o)
##
## LIBRARIES
##
LIBS = -lgtk-win32-2.0 \
-latk-1.0 \
-lpango-1.0 \
-lglib-2.0 \
-lgdk-win32-2.0 \
-lgdk_pixbuf-2.0 \
-lgmodule-2.0 \
-lgobject-2.0 \
-liberty \
-lwinmm \
-lws2_32 \
-lintl \
-lpurple \
-lpidgin \
-lnss3 \
-lnspr4 \
-lssl3
##
## RULES
##
# How to make a C file
%.o: %.c
$(CC) $(CFLAGS) $(DEFINES) $(INCLUDE_PATHS) -o $@ -c $<
##
## TARGET DEFINITIONS
##
.PHONY: all clean installer
all: $(TARGET).dll
install: $(TARGET).dll
$(MAKE) -C $(PO) -f Makefile.mingw install
cp $(TARGET).dll $(DLL_INSTALL_DIR)
mkdir -p $(STANDALONE_INSTALL_DIR)/plugins
cp $(TARGET).dll $(STANDALONE_INSTALL_DIR)/plugins
mkdir -p $(STANDALONE_INSTALL_DIR)/pixmaps/pidgin-encryption
cp pixmaps/*.png $(STANDALONE_INSTALL_DIR)/pixmaps/pidgin-encryption
##
## BUILD Dependencies
##
#$(PURPLE_TOP)/src/purple.lib:
# $(MAKE) -C $(PURPLE_TOP)/src -f Makefile.mingw purple.lib
##
## BUILD DLL
##
# $(PURPLE_TOP)/src/purple.lib
$(TARGET).dll: pidgin-encryption-config.h $(OBJECTS)
$(CC) -shared $(OBJECTS) $(LIB_PATHS) $(LIBS) $(DLL_LD_FLAGS) -o $(TARGET).dll
installer:
makensis.exe /DPIDGIN-ENCRYPTION_VERSION="$(ENC_VERSION)" /DPIDGIN_VERSION="$(MAIN_VERSION)" pidgin-encryption-installer.nsi
pidgin-encryption-config.h:
touch pidgin-encryption-config.h
##
## CLEAN RULES
##
clean:
rm -rf *.o
rm -rf $(TARGET).dll
|