1
###########################################################################
4
# Makefile for the Pedro mini-XMPP client
9
# Copyright (C) 2005-2007 Bob Jamison
11
# This library is free software; you can redistribute it and/or
12
# modify it under the terms of the GNU Lesser General Public
13
# License as published by the Free Software Foundation; either
14
# version 2.1 of the License, or (at your option) any later version.
16
# This library is distributed in the hope that it will be useful,
17
# but WITHOUT ANY WARRANTY; without even the implied warranty of
18
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19
# Lesser General Public License for more details.
21
# You should have received a copy of the GNU Lesser General Public
22
# License along with this library; if not, write to the Free Software
23
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26
##########################################################################
28
# $(S) will be set to one of these
29
##########################################################################
33
##########################################################################
35
##########################################################################
42
##########################################################################
44
##########################################################################
47
####### Where is your GTK directory?
50
####### Same thing, DOS style
58
CFLAGS = -g -Wall -DHAVE_SSL \
59
-DRELAYTOOL_SSL="static const int libssl_is_present=1; static int __attribute__((unused)) libssl_symbol_is_present(char *s){ return 1; }"
61
INC = -I. -I$(GTK)/include -I$(SSL)/include
64
LIBSC = -mconsole -L$(GTK)/lib -L$(SSL) -lssl -lcrypto -lgdi32 -lws2_32
65
LIBS = -mwindows -L$(GTK)/lib -L$(SSL) -lssl -lcrypto -lgdi32 -lws2_32
72
all: test.exe pedro.exe
74
GTKINC = -DGLIBMM_DLL \
75
-I$(GTK)/include/glibmm-2.4 -I$(GTK)/lib/glibmm-2.4/include \
76
-I$(GTK)/include/gtkmm-2.4 -I$(GTK)/lib/gtkmm-2.4/include \
77
-I$(GTK)/include/gdkmm-2.4 -I$(GTK)/lib/gdkmm-2.4/include \
78
-I$(GTK)/include/pangomm-1.4 -I$(GTK)/include/pangomm-1.4 \
79
-I$(GTK)/include/atkmm-1.6 -I$(GTK)/include/cairomm-1.0 \
80
-I$(GTK)/include/sigc++-2.0 -I$(GTK)/lib/sigc++-2.0/include \
81
-I$(GTK)/include/gtk-2.0 -I$(GTK)/lib/gtk-2.0/include \
82
-I$(GTK)/include/atk-1.0 -I$(GTK)/include/pango-1.0 \
83
-I$(GTK)/include/glib-2.0 -I$(GTK)/lib/glib-2.0/include \
84
-I$(GTK)/include/cairo
87
GTKLIBS = -L$(GTK)/lib \
88
-lgtkmm-2.4 -lgdkmm-2.4 -lglibmm-2.4 \
89
-latkmm-1.6 -lpangomm-1.4 -lsigc-2.0 \
90
-lgtk-win32-2.0 -lgdk-win32-2.0 -latk-1.0 \
91
-lgdk_pixbuf-2.0 -lm -lpangoft2-1.0 -lpangowin32-1.0 -lpango-1.0 \
92
-lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lglib-2.0
97
##########################################################################
99
##########################################################################
102
CFLAGS = -g -Wall -DHAVE_SSL -DHAVE_PTHREAD_H
103
XINC = -I/usr/X11R6/include
104
XLIB = -L/usr/X11R6/lib -lXrender -lX11
105
INC = -I. -I.. $(XINC)
106
LIBS = $(XLIB) -lpthread -lssl
112
GTKINC += `pkg-config gtkmm-2.4 --cflags`
113
GTKLIBS += `pkg-config gtkmm-2.4 --libs`
138
test.exe: libpedro.a work/test.o
139
$(CXX) -o $@ work/test.o libpedro.a $(LIBSC)
140
test: libpedro.a work/test.o
141
$(CXX) -o $@ work/test.o libpedro.a $(LIBSC)
143
filesend.exe: libpedro.a work/filesend.o
144
$(CXX) -o $@ work/filesend.o libpedro.a $(LIBSC)
145
filesend: libpedro.a work/filesend.o
146
$(CXX) -o $@ work/filesend.o libpedro.a $(LIBSC)
148
filerec.exe: libpedro.a work/filerec.o
149
$(CXX) -o $@ work/filerec.o libpedro.a $(LIBSC)
150
filerec: libpedro.a work/filerec.o
151
$(CXX) -o $@ work/filerec.o libpedro.a $(LIBSC)
153
groupchat.exe: libpedro.a work/groupchat.o
154
$(CXX) -o $@ work/groupchat.o libpedro.a $(LIBSC)
155
groupchat: libpedro.a work/groupchat.o
156
$(CXX) -o $@ work/groupchat.o libpedro.a $(LIBSC)
158
pedro.exe: libpedro.a $(GUIOBJ)
159
$(CXX) -o $@ pedromain.o pedrogui.o libpedro.a $(GTKLIBS) $(LIBS)
160
pedro: libpedro.a pedromain.o pedrogui.o
161
$(CXX) -o $@ pedromain.o pedrogui.o libpedro.a $(GTKLIBS) $(LIBS)
165
ar crv libpedro.a $(OBJ)
167
pedromain.o: pedromain.cpp
168
$(CXX) $(CFLAGS) $(INC) $(GTKINC) -c -o $@ $<
170
pedrogui.o: pedrogui.cpp pedrogui.h
171
$(CXX) $(CFLAGS) $(INC) $(GTKINC) -c -o $@ $<
173
geckoembed.o: geckoembed.cpp geckoembed.h
174
$(CXX) $(CFLAGS) $(INC) $(GTKINC) -c -o $@ $<
177
$(CXX) $(CFLAGS) $(INC) -c -o $@ $<
180
$(foreach a, $(OBJ), $(shell $(RM) $(subst /,$(S), $(a))))
181
$(foreach a, $(GUIOBJ), $(shell $(RM) $(subst /,$(S), $(a))))
182
$(foreach a, $(TESTOBJ), $(shell $(RM) $(subst /,$(S), $(a))))
196
###########################################################################
198
###########################################################################