1
###########################################################################
2
# $Id: Makefile.mingw.common 13057 2006-09-07 07:28:39Z bryce $
3
# File: Makefile.mingw.common
4
# Does: Common definitions for all Makefile.mingw files
5
# Author: Bob Jamison & the Inkscape Guys
6
###########################################################################
8
####### Sense whether we are on a DOS box or cross-compiling
24
##########################################################################
26
# $(S) will be set to one of these
27
##########################################################################
33
##########################################################################
34
# CROSS / NATIVE SWITCHES
35
##########################################################################
40
##########################################################################
41
# CROSS COMPILER SETTINGS
42
##########################################################################
44
CC = i686-pc-mingw32-gcc
45
CXX = i686-pc-mingw32-g++
46
AS = i686-pc-mingw32-as
47
AR = i686-pc-mingw32-ar
48
OBJCOPY = i686-pc-mingw32-objcopy
49
RANLIB = i686-pc-mingw32-ranlib
50
WINDRES = i686-pc-mingw32-windres
51
LD = i686-pc-mingw32-ld
52
DLLWRAP = i686-pc-mingw32-dllwrap
53
DLLTOOL = i686-pc-mingw32-dlltool
55
####### file separator
58
####### escape character for echo
61
####### file manipulation programs
67
RMREC = find ./inkscape -type f -name
69
RMDIRREC = find ./inkscape -type d -name
70
RMDIRREC1 = |xargs $(RMDIR)
72
####### Where is your GTK directory?
75
####### Same thing, file system style
78
DTG := $(shell date +%y%m%d.%H%M)
82
##########################################################################
83
# NATIVE COMPILER SETTINGS
84
##########################################################################
96
####### file separator
99
####### escape character for echo
102
####### file manipulation programs
105
####### are we on WinNt and beyond?
106
ifeq ($(DOSSHELL),CMD_EXE)
115
RMREC = cd inkscape & $(RM) /s /q
117
RMDIRREC = cd inkscape & $(RMDIR) /s
120
####### Where is your GTK directory?
123
####### Same thing, DOS style
126
####### Command to process .po files --> .mo
127
MSGFMT = $(GTKDOS)$(S)bin$(S)msgfmt
133
##########################################################################
134
# END CROSS / NATIVE SWITCHES
135
##########################################################################
138
###### VERSION NUMBER
139
# VERSION_NR = 0.41+devel
140
# VERSION = \"$(VERSION_NR)-${DTG}\"
143
VERSION = \"$(VERSION_NR)\"
145
####### the XP_WIN def is necessary for libjs.a
146
CFLAGS = -g -O3 -Wall -mms-bitfields -DVERSION=$(VERSION) \
147
-DXP_WIN -D_INTL_REDIRECT_INLINE -DHAVE_CONFIG_H
149
####### Inkboard abilities.
150
####### You must 'make -f Makefile.mingw clean' when turning this on or off
151
#CFLAGS += -DWITH_INKBOARD
153
####### IMPLICIT RULES
155
$(CXX) $(CFLAGS) $(INC) -c -o $@ $<
158
$(CC) $(CFLAGS) $(INC) -c -o $@ $<
164
##########################################################################
165
# INCLUDES AND LIBRARIES
166
##########################################################################
168
GTKINC = -DGLIBMM_DLL \
169
-I$(GTK)/include/glibmm-2.4 -I$(GTK)/lib/glibmm-2.4/include \
170
-I$(GTK)/include/gtkmm-2.4 -I$(GTK)/lib/gtkmm-2.4/include \
171
-I$(GTK)/include/gdkmm-2.4 -I$(GTK)/lib/gdkmm-2.4/include \
172
-I$(GTK)/include/pangomm-1.4 \
173
-I$(GTK)/include/atkmm-1.6 -I$(GTK)/include/cairo \
174
-I$(GTK)/include/sigc++-2.0 -I$(GTK)/lib/sigc++-2.0/include \
175
-I$(GTK)/include/gtk-2.0 -I$(GTK)/lib/gtk-2.0/include \
176
-I$(GTK)/include/atk-1.0 -I$(GTK)/include/pango-1.0 \
177
-I$(GTK)/include/glib-2.0 -I$(GTK)/lib/glib-2.0/include
181
####### we removed the '-Wl,--enable-runtime-pseudo-reloc' option, as
182
####### it proved to be very dangerous
183
####### with Gtk::TreeViewColumn
184
GTKLIB = -L$(GTK)/lib \
185
-lgtkmm-2.4 -lgdkmm-2.4 -lglibmm-2.4 \
186
-latkmm-1.6 -lpangomm-1.4 -lsigc-2.0 \
187
-lgtk-win32-2.0 -lgdk-win32-2.0 -latk-1.0 \
188
-lgdk_pixbuf-2.0 -lm -lpangoft2-1.0 -lpangowin32-1.0 -lpango-1.0 \
189
-lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lglib-2.0
192
####### (note: perl's config.h has some nested comments)
193
PERLINC = -Wno-comment -I$(GTK)/perl/lib/CORE
194
PERLLIB = -L$(GTK)/perl/lib/CORE -lperl58
197
PYTHONINC = -I$(GTK)/python/include
198
PYTHONLIB = -L$(GTK)/python/libs -lpython24
199
#PYTHONLIB = -L$(GTK)/python/libs/libpython24.a
201
####### remove -DLIBXML_STATIC
202
INC = -I. -I.. -I../.. -I../cxxtest $(GTKINC) -I$(GTK)/include \
203
$(PERLINC) $(PYTHONINC) -I$(GTK)/include/loudmouth-1.0 \
204
-I$(GTK)/include/libxml2 -I$(GTK)/include/freetype2 \
207
# To enable loudmouth uncomment and move this line below
208
#-lloudmouth-1.dll -lssl -lcrypto
209
LIBS = $(GTKLIB) $(PERLLIB) $(PYTHONLIB) \
210
$(GTK)/bin/libxml2.dll \
211
$(GTK)/lib/iconv.lib \
212
-lfreetype.dll -lfontconfig.dll \
214
-lpng -lpopt $(GTK)/lib/zdll.lib \
215
-lgc -mwindows -lws2_32 -lintl
218
##########################################################################
219
# END INCLUDES AND LIBRARIES
220
##########################################################################
225
##########################################################################
227
##########################################################################