Code

* Makefile.am: Add files to release needed for improvements to Mac
[inkscape.git] / Makefile.mingw.common
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      = mingw32-gcc
87 CXX     = mingw32-g++
88 AS      = as
89 AR      = 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 ifndef GTK
122 GTK=c:/gtk28
123 endif
125 ####### Same thing, DOS style
126 ifndef GTKDOS
127 GTKDOS=c:\gtk28
128 endif
130 ####### Command to process .po files --> .mo
131 MSGFMT = $(GTKDOS)$(S)bin$(S)msgfmt
133 ####### change me!!
134 DTG := 20050626
136 endif
137 ##########################################################################
138 # END    CROSS / NATIVE    SWITCHES
139 ##########################################################################
142 ###### VERSION NUMBER
143 # VERSION_NR = 0.41+devel
144 # VERSION = \"$(VERSION_NR)-${DTG}\"
146 VERSION_NR = 0.44+devel
147 VERSION = \"$(VERSION_NR)\"
149 ####### the XP_WIN def is necessary for libjs.a
150 CFLAGS = -Wall -O3 -g -mms-bitfields -DVERSION=$(VERSION) \
151 -DXP_WIN -D_INTL_REDIRECT_INLINE -DHAVE_CONFIG_H
153 ####### Inkboard abilities.
154 ####### You must 'make -f Makefile.mingw clean' when turning this on or off
155 CFLAGS += -DWITH_INKBOARD
157 ####### IMPLICIT RULES
158 .cpp.o:
159         $(CXX) $(CFLAGS) $(INC) -c -o $@ $<
161 .c.o:
162         $(CC) $(CFLAGS) $(INC) -c -o $@ $<
168 ##########################################################################
169 # INCLUDES AND LIBRARIES
170 ##########################################################################
172 GTKINC = -DGLIBMM_DLL \
173 -I$(GTK)/include/glibmm-2.4 -I$(GTK)/lib/glibmm-2.4/include \
174 -I$(GTK)/include/gtkmm-2.4  -I$(GTK)/lib/gtkmm-2.4/include \
175 -I$(GTK)/include/gdkmm-2.4  -I$(GTK)/lib/gdkmm-2.4/include \
176 -I$(GTK)/include/pangomm-1.4 \
177 -I$(GTK)/include/atkmm-1.6 -I$(GTK)/include/cairo  \
178 -I$(GTK)/include/sigc++-2.0 -I$(GTK)/lib/sigc++-2.0/include \
179 -I$(GTK)/include/gtk-2.0 -I$(GTK)/lib/gtk-2.0/include \
180 -I$(GTK)/include/atk-1.0 -I$(GTK)/include/pango-1.0 \
181 -I$(GTK)/include/glib-2.0 -I$(GTK)/lib/glib-2.0/include
184 ####### Our Gtk libs
185 ####### we removed the '-Wl,--enable-runtime-pseudo-reloc' option, as
186 ####### it proved to be very dangerous
187 ####### with Gtk::TreeViewColumn
188 GTKLIB = -L$(GTK)/lib \
189 -lgtkmm-2.4 -lgdkmm-2.4 -lglibmm-2.4 \
190 -latkmm-1.6 -lpangomm-1.4 -lsigc-2.0 \
191 -lgtk-win32-2.0 -lgdk-win32-2.0 -latk-1.0 \
192 -lgdk_pixbuf-2.0 -lm -lpangoft2-1.0 -lpangowin32-1.0 -lpango-1.0 \
193 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lglib-2.0 -lcairo
195 ####### For PERL
196 ####### (note: perl's config.h has some nested comments)
197 PERLINC = -Wno-comment -I$(GTK)/perl/lib/CORE
198 PERLLIB = -L$(GTK)/perl/lib/CORE -lperl58
200 ####### For Python
201 PYTHONINC = -I$(GTK)/python/include
202 PYTHONLIB = -L$(GTK)/python/libs -lpython24
203 #PYTHONLIB = -L$(GTK)/python/libs/libpython24.a
205 ####### remove -DLIBXML_STATIC
206 INC = -I. -I.. -I../.. -I../cxxtest $(GTKINC) -I$(GTK)/include \
207 $(PERLINC) $(PYTHONINC) -I$(GTK)/include/loudmouth-1.0 \
208 -I$(GTK)/include/libxml2 -I$(GTK)/include/freetype2 \
211 # To enable loudmouth uncomment and move this line below
212 LIBS = $(GTKLIB) $(PERLLIB) $(PYTHONLIB) \
213 $(GTK)/bin/libxml2.dll \
214 $(GTK)/lib/iconv.lib    \
215 -lfreetype.dll -lfontconfig.dll  \
216 -llcms.dll \
217 -lloudmouth-1.dll -lssl -lcrypto \
218 -lpng -lpopt $(GTK)/lib/zdll.lib \
219 -lgc -mwindows -lws2_32 -lintl -lcairo
222 ##########################################################################
223 # END INCLUDES AND LIBRARIES
224 ##########################################################################
229 ##########################################################################
230 # E N D     O F     F I L E
231 ##########################################################################