Code

f108c2c2feb9dff80eb30a198e92c2533f1faf03
[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-2006 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:/gtk28
50 ####### Same thing, DOS style
51 GTKDOS=c:\gtk28
53 #SSL=openssl-0.9.8a
54 SSL=$(GTK)
56 CFLAGS = -g -Wall -DHAVE_SSL
57 INC  = -I. -I$(GTK)/include -I$(SSL)/include
60 LIBSC = -mconsole -L$(GTK)/lib -L$(SSL) -lssl -lcrypto -lgdi32 -lws2_32
61 LIBS  = -mwindows -L$(GTK)/lib -L$(SSL) -lssl -lcrypto -lgdi32 -lws2_32
63 RM = del
64 CP = copy
65 S = $(BSLASH)
68 all: test.exe pedro.exe
70 GTKINC = -DGLIBMM_DLL \
71 -I$(GTK)/include/glibmm-2.4 -I$(GTK)/lib/glibmm-2.4/include \
72 -I$(GTK)/include/gtkmm-2.4  -I$(GTK)/lib/gtkmm-2.4/include \
73 -I$(GTK)/include/gdkmm-2.4  -I$(GTK)/lib/gdkmm-2.4/include \
74 -I$(GTK)/include/pangomm-1.4 \
75 -I$(GTK)/include/atkmm-1.6  -I$(GTK)/include/cairo  \
76 -I$(GTK)/include/sigc++-2.0 -I$(GTK)/lib/sigc++-2.0/include \
77 -I$(GTK)/include/gtk-2.0    -I$(GTK)/lib/gtk-2.0/include \
78 -I$(GTK)/include/atk-1.0    -I$(GTK)/include/pango-1.0 \
79 -I$(GTK)/include/glib-2.0   -I$(GTK)/lib/glib-2.0/include
82 ####### Our Gtk libs
83 GTKLIBS = -L$(GTK)/lib -lloudmouth-1 \
84 -lgtkmm-2.4 -lgdkmm-2.4 -lglibmm-2.4 \
85 -latkmm-1.6 -lpangomm-1.4 -lsigc-2.0 \
86 -lgtk-win32-2.0 -lgdk-win32-2.0 -latk-1.0 \
87 -lgdk_pixbuf-2.0 -lm -lpangoft2-1.0 -lpangowin32-1.0 -lpango-1.0 \
88 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lglib-2.0
90 endif
93 ##########################################################################
94 # XLIB  SETTINGS
95 ##########################################################################
96 ifeq ($(ARCH),xlib)
98 CFLAGS = -g -Wall -DHAVE_SSL -DHAVE_PTHREAD_H
99 XINC = -I/usr/X11R6/include
100 XLIB = -L/usr/X11R6/lib -lXrender -lX11
101 INC  = -I. -I.. $(XINC)
102 LIBS = $(XLIB) -lpthread -lssl
103 RM = rm -rf
104 CP = cp
105 S = $(FSLASH)
106 all: test pedro
108 GTKINC  += `pkg-config gtkmm-2.4 --cflags`
109 GTKLIBS += `pkg-config gtkmm-2.4 --libs`
111 endif
115 OBJ =         \
116 pedrodom.o    \
117 pedroxmpp.o   \
118 pedroconfig.o \
119 pedroutil.o
122 GUIOBJ = \
123 pedrogui.o \
124 pedromain.o
127 TESTOBJ = \
128 work/test.o     \
129 work/filesend.o \
130 work/filerec.o  \
131 work/groupchat.o
133 test.exe: libpedro.a work/test.o
134         $(CXX) -o $@ work/test.o libpedro.a $(LIBSC)
135 test: libpedro.a work/test.o
136         $(CXX) -o $@ work/test.o libpedro.a $(LIBSC)
137         
138 filesend.exe: libpedro.a work/filesend.o
139         $(CXX) -o $@ work/filesend.o libpedro.a $(LIBSC)
140 filesend: libpedro.a work/filesend.o
141         $(CXX) -o $@ work/filesend.o libpedro.a $(LIBSC)
143 filerec.exe: libpedro.a work/filerec.o
144         $(CXX) -o $@ work/filerec.o libpedro.a $(LIBSC)
145 filerec: libpedro.a work/filerec.o
146         $(CXX) -o $@ work/filerec.o libpedro.a $(LIBSC)
148 groupchat.exe: libpedro.a work/groupchat.o
149         $(CXX) -o $@ work/groupchat.o libpedro.a $(LIBSC)
150 groupchat: libpedro.a work/groupchat.o
151         $(CXX) -o $@ work/groupchat.o libpedro.a $(LIBSC)
153 pedro.exe: libpedro.a pedromain.o pedrogui.o
154         $(CXX) -o $@ pedromain.o pedrogui.o libpedro.a $(GTKLIBS) $(LIBS)
155 pedro: libpedro.a pedromain.o pedrogui.o
156         $(CXX) -o $@ pedromain.o pedrogui.o libpedro.a $(GTKLIBS) $(LIBS)
159 libpedro.a: $(OBJ)
160         ar crv libpedro.a $(OBJ)
162 pedromain.o: pedromain.cpp
163         $(CXX) $(CFLAGS) $(INC) $(GTKINC) -c -o $@ $<
164         
165 pedrogui.o: pedrogui.cpp pedrogui.h
166         $(CXX) $(CFLAGS) $(INC) $(GTKINC) -c -o $@ $<
168 .cpp.o:
169         $(CXX) $(CFLAGS) $(INC) -c -o $@ $<
171 clean:
172         $(foreach a, $(OBJ), $(shell $(RM) $(subst /,$(S), $(a))))
173         $(foreach a, $(GUIOBJ), $(shell $(RM) $(subst /,$(S), $(a))))
174         $(foreach a, $(TESTOBJ), $(shell $(RM) $(subst /,$(S), $(a))))
175         -$(RM) *.a
176         -$(RM) test
177         -$(RM) test.exe
178         -$(RM) filesend
179         -$(RM) filesend.exe
180         -$(RM) filerec
181         -$(RM) filerec.exe
182         -$(RM) groupchat
183         -$(RM) groupchat.exe
184         -$(RM) pedro
185         -$(RM) pedro.exe
186         -$(RM) core.*
188 ###########################################################################
189 # E N D    O F    F I L E
190 ###########################################################################