Code

moving trunk for module inkscape
[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 RANLIB  = i686-pc-mingw32-ranlib
49 WINDRES = i686-pc-mingw32-windres
50 LD      = i686-pc-mingw32-ld
51 DLLWRAP = i686-pc-mingw32-dllwrap
52 DLLTOOL = i686-pc-mingw32-dlltool
54 ####### file separator
55 S = $(FSLASH)
57 ####### escape character for echo
58 E = /
60 ####### file manipulation programs
61 CP     = cp
62 RMDIR  = rm -rf 
63 MKDIR  = mkdir
64 CPDIR  = cp -rf 
65 MSGFMT = msgfmt
66 RMREC  = find ./inkscape -type f -name 
67 RMREC1 = |xargs $(RM)
68 RMDIRREC = find ./inkscape -type d -name
69 RMDIRREC1 = |xargs $(RMDIR)
71 ####### Where is your GTK directory?
72 GTK=/target
74 ####### Same thing, file system style
75 GTKDOS=$(GTK)
77 DTG := $(shell date +%y%m%d.%H%M)
79 else
81 ##########################################################################
82 # NATIVE COMPILER SETTINGS
83 ##########################################################################
85 CC      = mingw32-gcc
86 CXX     = mingw32-g++
87 AS      = as
88 AR      = mingw32-ar
89 RANLIB  = ranlib
90 WINDRES = windres
91 DLLWRAP = dllwrap
92 DLLTOOL = dlltool
94 ####### file separator
95 S = $(BSLASH)
97 ####### escape character for echo
98 E = 
100 ####### file manipulation programs
101 CP = copy
103 ####### are we on WinNt and beyond?
104 ifeq ($(DOSSHELL),CMD_EXE)
105 RMDIR = rmdir /s /q
106 RM    = del
107 else
108 RMDIR = deltree /y
109 RM    = del
110 endif
111 MKDIR = mkdir
112 CPDIR = xcopy /e /i
113 RMREC = cd  inkscape & $(RM) /s /q 
114 RMREC1 = & cd ..
115 RMDIRREC = cd inkscape & $(RMDIR) /s 
116 RMDIRREC1 = & cd ..
118 #######  Where is your GTK directory?
119 GTK=c:/gtk28
121 ####### Same thing, DOS style
122 GTKDOS=c:\gtk28
124 ####### Command to process .po files --> .mo
125 MSGFMT = $(GTKDOS)$(S)bin$(S)msgfmt
127 ####### change me!!
128 DTG := 20050626
130 endif
131 ##########################################################################
132 # END    CROSS / NATIVE    SWITCHES
133 ##########################################################################
136 ###### VERSION NUMBER
137 # VERSION_NR = 0.41+devel
138 # VERSION = \"$(VERSION_NR)-${DTG}\"
140 VERSION_NR = 0.43+devel
141 VERSION = \"$(VERSION_NR)\"
143 ####### the XP_WIN def is necessary for libjs.a
144 CFLAGS = -O3  -Wall -mms-bitfields -DVERSION=$(VERSION) \
145 -DXP_WIN -D_INTL_REDIRECT_INLINE -DHAVE_CONFIG_H
147 ####### Inkboard abilities.
148 ####### You must 'make -f Makefile.mingw clean' when turning this on or off
149 #CFLAGS += -DWITH_INKBOARD
152 ####### IMPLICIT RULES
153 .cpp.o:
154         $(CXX) $(CFLAGS) $(INC) -c -o $@ $<
156 .c.o:
157         $(CC) $(CFLAGS) $(INC) -c -o $@ $<
163 ##########################################################################
164 # INCLUDES AND LIBRARIES
165 ##########################################################################
167 GTKINC = -DGLIBMM_DLL \
168 -I$(GTK)/include/glibmm-2.4 -I$(GTK)/lib/glibmm-2.4/include \
169 -I$(GTK)/include/gtkmm-2.4  -I$(GTK)/lib/gtkmm-2.4/include \
170 -I$(GTK)/include/gdkmm-2.4  -I$(GTK)/lib/gdkmm-2.4/include \
171 -I$(GTK)/include/pangomm-1.4 \
172 -I$(GTK)/include/atkmm-1.6 -I$(GTK)/include/cairo  \
173 -I$(GTK)/include/sigc++-2.0 -I$(GTK)/lib/sigc++-2.0/include \
174 -I$(GTK)/include/gtk-2.0 -I$(GTK)/lib/gtk-2.0/include \
175 -I$(GTK)/include/atk-1.0 -I$(GTK)/include/pango-1.0 \
176 -I$(GTK)/include/glib-2.0 -I$(GTK)/lib/glib-2.0/include
179 ####### Our Gtk libs
180 ####### we removed the '-Wl,--enable-runtime-pseudo-reloc' option, as
181 ####### it proved to be very dangerous
182 ####### with Gtk::TreeViewColumn
183 GTKLIB = -L$(GTK)/lib -lloudmouth-1 \
184 -lgtkmm-2.4 -lgdkmm-2.4 -lglibmm-2.4 \
185 -latkmm-1.6 -lpangomm-1.4 -lsigc-2.0 \
186 -lgtk-win32-2.0 -lgdk-win32-2.0 -latk-1.0 \
187 -lgdk_pixbuf-2.0 -lm -lpangoft2-1.0 -lpangowin32-1.0 -lpango-1.0 \
188 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lglib-2.0
190 ####### For PERL
191 ####### (note: perl's config.h has some nested comments)
192 PERLINC = -Wno-comment -I$(GTK)/perl/lib/CORE
193 PERLLIB = -L$(GTK)/perl/lib/CORE -lperl58
195 ####### For Python
196 PYTHONINC = -I$(GTK)/python/include
197 PYTHONLIB = -L$(GTK)/python/libs -lpython24
198 #PYTHONLIB = -L$(GTK)/python/libs/libpython24.a
200 ####### remove -DLIBXML_STATIC 
201 INC = -I. -I.. -I../.. $(GTKINC) -I$(GTK)/include \
202 $(PERLINC) $(PYTHONINC) -I$(GTK)/include/loudmouth-1.0 \
203 -I$(GTK)/include/libxml2 -I$(GTK)/include/freetype2 \
206 LIBS = $(GTKLIB) $(PERLLIB) $(PYTHONLIB) \
207 $(GTK)/bin/libxml2.dll \
208 $(GTK)/lib/iconv.lib    \
209 -lfreetype.dll -lfontconfig.dll  \
210 -lpng -lpopt $(GTK)/lib/zdll.lib \
211 -lgc -mwindows -lws2_32 -lintl
214 ##########################################################################
215 # END INCLUDES AND LIBRARIES
216 ##########################################################################
221 ##########################################################################
222 # E N D     O F     F I L E
223 ##########################################################################