Code

Cleaned up propagation of status changes.
[inkscape.git] / Makefile.mingw.common.old
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 ####### file manipulation programs
58 CP     = cp
59 RMDIR  = rm -rf 
60 MKDIR  = mkdir
61 CPDIR  = cp -rf 
62 MSGFMT = msgfmt
64 ####### Where is your GTK directory?
65 GTK=/target
67 ####### Same thing, file system style
68 GTKDOS=$(GTK)
70 DTG := $(shell date +%y%m%d.%H%M)
72 else
74 ##########################################################################
75 # NATIVE COMPILER SETTINGS
76 ##########################################################################
78 CC      = mingw32-gcc
79 CXX     = mingw32-g++
80 AS      = as
81 AR      = mingw32-ar
82 RANLIB  = ranlib
83 WINDRES = windres
84 DLLWRAP = dllwrap
85 DLLTOOL = dlltool
87 ####### file separator
88 S = $(BSLASH)
90 ####### file manipulation programs
91 CP = copy
93 ####### are we on WinNt and beyond?
94 ifeq ($(DOSSHELL),CMD_EXE)
95 RMDIR = rmdir /s /q
96 RM    = del
97 else
98 RMDIR = deltree /y
99 RM    = del
100 endif
101 MKDIR = mkdir
102 CPDIR = xcopy /e /i
104 #######  Where is your GTK directory?
105 GTK=c:/gtk
107 ####### Same thing, DOS style
108 GTKDOS=c:\gtk
110 ####### Command to process .po files --> .mo
111 MSGFMT = $(GTKDOS)$(S)bin$(S)msgfmt
113 ####### change me!!
114 DTG := 20050626
116 endif
117 ##########################################################################
118 # END    CROSS / NATIVE    SWITCHES
119 ##########################################################################
122 ###### VERSION NUMBER
123 # VERSION_NR = 0.41+devel
124 # VERSION = \"$(VERSION_NR)-${DTG}\"
126 VERSION_NR = 0.42+pre0
127 VERSION = \"$(VERSION_NR)\"
129 ####### the XP_WIN def is necessary for libjs.a
130 CFLAGS = -O3  -Wall -mms-bitfields -DVERSION=$(VERSION) \
131 -DXP_WIN -D_INTL_REDIRECT_INLINE -DHAVE_CONFIG_H
134 ####### IMPLICIT RULES
135 .cpp.o:
136         $(CXX) $(CFLAGS) $(INC) -c -o $@ $<
138 .c.o:
139         $(CC) $(CFLAGS) $(INC) -c -o $@ $<
145 ##########################################################################
146 # INCLUDES AND LIBRARIES
147 ##########################################################################
149 GTKINC = \
150 -I$(GTK)/include/glibmm-2.4 -I$(GTK)/lib/glibmm-2.4/include \
151 -I$(GTK)/include/gtkmm-2.4  -I$(GTK)/lib/gtkmm-2.4/include \
152 -I$(GTK)/include/gdkmm-2.4  -I$(GTK)/lib/gdkmm-2.4/include \
153 -I$(GTK)/include/pangomm-1.4 \
154 -I$(GTK)/include/atkmm-1.6  \
155 -I$(GTK)/include/sigc++-2.0 -I$(GTK)/lib/sigc++-2.0/include \
156 -I$(GTK)/include/gtk-2.0 -I$(GTK)/lib/gtk-2.0/include \
157 -I$(GTK)/include/atk-1.0 -I$(GTK)/include/pango-1.0 \
158 -I$(GTK)/include/glib-2.0 -I$(GTK)/lib/glib-2.0/include
161 ####### New way with static C++ libs
162 GTKLIB = -L$(GTK)/lib \
163 -lgtkmm-2.4 -lgdkmm-2.4 -lglibmm-2.4 \
164 -latkmm-1.6 -lpangomm-1.4 -lsigc-2.0 \
165 -lgtk-win32-2.0 -lgdk-win32-2.0 -latk-1.0 \
166 -lgdk_pixbuf-2.0 -lm -lpangoft2-1.0 -lpangowin32-1.0 -lpango-1.0 \
167 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lglib-2.0
169 ####### For PERL
170 ####### (note: perl's config.h has some nested comments)
171 PERLINC = -Wno-comment -I$(GTK)/perl/lib/CORE
172 PERLLIB = -L$(GTK)/perl/lib/CORE -lperl58
174 ####### For Python
175 PYTHONINC = -I$(GTK)/python/include
176 PYTHONLIB = -L$(GTK)/python/libs -lpython24
177 #PYTHONLIB = -L$(GTK)/python/libs/libpython24.a
179 ####### remove -DLIBXML_STATIC 
180 INC = -I. -I.. -I../.. $(GTKINC) -I$(GTK)/include \
181 $(PERLINC) $(PYTHONINC) -I$(GTK)/include/libxml2 \
182 -I$(GTK)/include/freetype2 \
185 LIBS = $(GTKLIB) $(PERLLIB) $(PYTHONLIB) -lxml2 \
186 $(GTK)/lib/iconv.lib    \
187 -lfreetype6.dll -lfontconfig-1.dll -lpng -lpopt $(GTK)/lib/zdll.lib \
188 -lgc -mwindows -lws2_32 -lintl
191 ##########################################################################
192 # END INCLUDES AND LIBRARIES
193 ##########################################################################
198 ##########################################################################
199 # E N D     O F     F I L E
200 ##########################################################################