5afa38dde3130c7fefe1034058425487e1464c27
1 ###########################################################################
2 # $Id$
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
9 ifdef ComSpec
10 BUILD=native
11 DOSSHELL=CMD_EXE
12 else
13 ifdef COMSPEC
14 BUILD=native
15 DOSSHELL=COMMAND_COM
16 else
17 BUILD=cross
18 endif
19 endif
24 ##########################################################################
25 # FILE SEPARATORS
26 # $(S) will be set to one of these
27 ##########################################################################
28 BSLASH := \\#
29 FSLASH := /
33 ##########################################################################
34 # CROSS / NATIVE SWITCHES
35 ##########################################################################
36 ifeq ($(BUILD),cross)
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
56 S = $(FSLASH)
58 ####### escape character for echo
59 E = /
61 ####### file manipulation programs
62 CP = cp
63 RMDIR = rm -rf
64 MKDIR = mkdir
65 CPDIR = cp -rf
66 MSGFMT = msgfmt
67 RMREC = find ./inkscape -type f -name
68 RMREC1 = |xargs $(RM)
69 RMDIRREC = find ./inkscape -type d -name
70 RMDIRREC1 = |xargs $(RMDIR)
72 ####### Where is your GTK directory?
73 GTK=/target
75 ####### Same thing, file system style
76 GTKDOS=$(GTK)
78 DTG := $(shell date +%y%m%d.%H%M)
80 else
82 ##########################################################################
83 # NATIVE COMPILER SETTINGS
84 ##########################################################################
86 CC = i686-pc-mingw32-gcc
87 CXX = i686-pc-mingw32-g++
88 AS = as
89 AR = i686-pc-mingw32-ar
90 OBJCOPY = objcopy
91 RANLIB = ranlib
92 WINDRES = windres
93 DLLWRAP = dllwrap
94 DLLTOOL = dlltool
96 ####### file separator
97 S = $(BSLASH)
99 ####### escape character for echo
100 E =
102 ####### file manipulation programs
103 CP = copy
105 ####### are we on WinNt and beyond?
106 ifeq ($(DOSSHELL),CMD_EXE)
107 RMDIR = rmdir /s /q
108 RM = del
109 else
110 RMDIR = deltree /y
111 RM = del
112 endif
113 MKDIR = mkdir
114 CPDIR = xcopy /e /i
115 RMREC = cd inkscape & $(RM) /s /q
116 RMREC1 = & cd ..
117 RMDIRREC = cd inkscape & $(RMDIR) /s
118 RMDIRREC1 = & cd ..
120 ####### Where is your GTK directory?
121 GTK=c:/gtk28
123 ####### Same thing, DOS style
124 GTKDOS=c:\gtk28
126 ####### Command to process .po files --> .mo
127 MSGFMT = $(GTKDOS)$(S)bin$(S)msgfmt
129 ####### change me!!
130 DTG := 20050626
132 endif
133 ##########################################################################
134 # END CROSS / NATIVE SWITCHES
135 ##########################################################################
138 ###### VERSION NUMBER
139 # VERSION_NR = 0.41+devel
140 # VERSION = \"$(VERSION_NR)-${DTG}\"
142 VERSION_NR = 0.44+devel
143 VERSION = \"$(VERSION_NR)\"
145 ####### the XP_WIN def is necessary for libjs.a
146 CFLAGS = -Wall -O3 -g -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
154 .cpp.o:
155 $(CXX) $(CFLAGS) $(INC) -c -o $@ $<
157 .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
180 ####### Our Gtk libs
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 -lcairo
191 ####### For PERL
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
196 ####### For Python
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 LIBS = $(GTKLIB) $(PERLLIB) $(PYTHONLIB) \
209 $(GTK)/bin/libxml2.dll \
210 $(GTK)/lib/iconv.lib \
211 -lfreetype.dll -lfontconfig.dll \
212 -llcms.dll \
213 -lloudmouth-1.dll -lssl -lcrypto \
214 -lpng -lpopt $(GTK)/lib/zdll.lib \
215 -lgc -mwindows -lws2_32 -lintl
218 ##########################################################################
219 # END INCLUDES AND LIBRARIES
220 ##########################################################################
225 ##########################################################################
226 # E N D O F F I L E
227 ##########################################################################