Code

81c3d6ef6d472ea066f7ef9213cdb9ac03b0df3a
[inkscape.git] / src / pedro / Makefile.mingw
1 ###########################################################################
2 #
3 #
4 #  Makefile for the Pedro mini-XMPP client
5
6 #  Authors:
7 #    Bob Jamison
8
9 #  Copyright (C) 2005-2007 Bob Jamison
10
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.
15
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.
20
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
24 #
25 #
26 ##########################################################################
27 # FILE SEPARATORS
28 # $(S) will be set to one of these
29 ##########################################################################
30 BSLASH := \\#
31 FSLASH := /
33 ##########################################################################
34 # SENSE ARCHITECTURE
35 ##########################################################################
36 ifdef ComSpec
37 ARCH=win32
38 else
39 ARCH=xlib
40 endif
42 ##########################################################################
43 # WIN32  SETTINGS
44 ##########################################################################
45 ifeq ($(ARCH),win32)
47 #######  Where is your GTK directory?
48 GTK=c:/gtk210
50 ####### Same thing, DOS style
51 GTKDOS=c:\gtk210
53 #SSL=openssl-0.9.8a
54 SSL=$(GTK)
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
67 RM = del
68 CP = copy
69 S = $(BSLASH)
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
86 ####### Our Gtk libs
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
94 endif
97 ##########################################################################
98 # XLIB  SETTINGS
99 ##########################################################################
100 ifeq ($(ARCH),xlib)
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
107 RM = rm -rf
108 CP = cp
109 S = $(FSLASH)
110 all: test pedro
112 GTKINC  += `pkg-config gtkmm-2.4 --cflags`
113 GTKLIBS += `pkg-config gtkmm-2.4 --libs`
115 endif
119 OBJ =         \
120 pedrodom.o    \
121 pedroxmpp.o   \
122 pedroconfig.o \
123 pedroutil.o
126 GUIOBJ = \
127 pedrogui.o \
128 geckoembed.o \
129 pedromain.o
132 TESTOBJ = \
133 work/test.o     \
134 work/filesend.o \
135 work/filerec.o  \
136 work/groupchat.o
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)
142         
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)
164 libpedro.a: $(OBJ)
165         ar crv libpedro.a $(OBJ)
167 pedromain.o: pedromain.cpp
168         $(CXX) $(CFLAGS) $(INC) $(GTKINC) -c -o $@ $<
169         
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 $@ $<
176 .cpp.o:
177         $(CXX) $(CFLAGS) $(INC) -c -o $@ $<
179 clean:
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))))
183         -$(RM) *.a
184         -$(RM) test
185         -$(RM) test.exe
186         -$(RM) filesend
187         -$(RM) filesend.exe
188         -$(RM) filerec
189         -$(RM) filerec.exe
190         -$(RM) groupchat
191         -$(RM) groupchat.exe
192         -$(RM) pedro
193         -$(RM) pedro.exe
194         -$(RM) core.*
196 ###########################################################################
197 # E N D    O F    F I L E
198 ###########################################################################