makefile.cygwin 5.69 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
## Makefile for building gimp.exe with gcc
## Use: make -f makefile.cygwin

# Change this to wherever you want to install gimp.exe.
BIN = /gimp/bin

OPTIMIZE = -g -O

################################################################

# Nothing much configurable below

13
CC = gcc -mno-cygwin -mpentium -fnative-struct
14 15 16 17 18 19 20 21 22 23 24 25 26

CP = cp
LD = ld
DLLTOOL = dlltool
INSTALL = install

GIMP_VER = 1.1
GTK_VER = 1.3
GLIB_VER = 1.3

GTK = ../../gtk+
GLIB = ../../glib
GMODULE = $(GLIB)/gmodule
Tor Lillqvist's avatar
Tor Lillqvist committed
27
INTL = ../../intl
28

Tor Lillqvist's avatar
Tor Lillqvist committed
29
CFLAGS = $(OPTIMIZE) -DREGEX_MALLOC -DHAVE_CONFIG_H -I. -I.. -I$(GLIB) -I$(GMODULE) -I$(GTK)/gdk/win32 -I$(GTK) -I$(INTL)
30

31
# GCG = ../tools/gcg/gcg -I. -I../tools/gcg/gh
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68

all : \
	../config.h	\
	libgimpim.a	\
	colormap_dialog.c \
	gimp.exe

install : gimp.exe
	$(INSTALL) gimp.exe $(BIN)

../config.h : ../config.h.win32
	$(CP) ../config.h.win32 ../config.h

gimpim_OBJECTS = \
	gimpdrawable.o	\
	gimpimage.o	\
	gimpobject.o	\
	gimppreviewcache.o\
	gimpset.o	\
	gimpsignal.o

libgimpim.a : $(gimpim_OBJECTS)
	ar cr libgimpim.a $(gimpim_OBJECTS)
	
gimp_OBJECTS = \
	about_dialog.o		\
	actionarea.o		\
	airbrush.o		\
	app_procs.o		\
	asupsample.o		\
	batch.o			\
	bezier_select.o		\
	blend.o			\
	blob.o        		\
	boundary.o		\
	brightness_contrast.o	\
	brush_edit.o		\
Tor Lillqvist's avatar
Tor Lillqvist committed
69
	brush_scale.o		\
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
	brush_select.o		\
	brush_select_cmds.o	\
	brushes_cmds.o		\
	bucket_fill.o		\
	buildmenu.o		\
	by_color_select.o	\
	channel.o		\
	channel_cmds.o		\
	channels_dialog.o	\
	channel_ops.o		\
	channel_ops_cmds.o	\
	clone.o			\
	color_area.o		\
	color_balance.o		\
	color_cmds.o		\
	color_notebook.o	\
	color_panel.o		\
	color_picker.o		\
	color_select.o		\
	color_transfer.o	\
	colormaps.o		\
	colormap_dialog.o	\
	commands.o		\
	context_manager.o	\
	convert.o		\
	convert_cmds.o		\
	convolve.o		\
	crop.o			\
	cursorutil.o		\
	curves.o		\
	datafiles.o		\
	desaturate.o		\
	devices.o		\
	dialog_handler.o	\
	disp_callbacks.o	\
	docindex.o		\
	docindexif.o		\
	dodgeburn.o		\
	draw_core.o		\
	drawable.o		\
	drawable_cmds.o		\
	edit_cmds.o		\
	edit_selection.o	\
	ellipse_select.o	\
	eraser.o		\
	errorconsole.o		\
	errors.o		\
	equalize.o		\
	fileops.o		\
	fileops_cmds.o		\
	flip_tool.o		\
	floating_sel.o		\
	floating_sel_cmds.o	\
	file_new_dialog.o	\
	free_select.o		\
	fuzzy_select.o		\
	gdisplay.o		\
	gdisplay_cmds.o		\
128
	gdisplay_color.o	\
129 130 131 132 133 134 135 136 137
	gdisplay_ops.o		\
	general.o		\
	gimage.o		\
	gimage_cmds.o		\
	gimage_mask.o		\
	gimage_mask_cmds.o	\
	gimpbrush.o		\
	gimpbrushgenerated.o	\
	gimpbrushlist.o		\
Tor Lillqvist's avatar
Tor Lillqvist committed
138
	gimpbrushpipe.o		\
139
	gimpbrushpreview.o	\
140
	gimpcontext.o		\
Tor Lillqvist's avatar
Tor Lillqvist committed
141
	gimpdnd.o		\
142 143 144 145
	gimphistogram.o		\
	gimplist.o		\
	gimplut.o		\
	gimpparasite.o		\
146
	gimppatternpreview.o	\
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161
	gimpprogress.o		\
	gimprc.o		\
	gimprc_cmds.o		\
	gimpunit.o		\
	global_edit.o		\
	gradient.o		\
	gradient_cmds.o		\
	gradient_select.o	\
	gradient_select_cmds.o	\
	guides_cmds.o		\
	gximage.o		\
	histogramwidget.o 	\
	histogram_tool.o	\
	hue_saturation.o	\
	image_map.o		\
162
	image_new.o		\
163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182
	image_render.o		\
	indicator_area.o	\
	info_dialog.o		\
	info_window.o		\
	ink.o         		\
	install.o		\
	interface.o		\
	interface_cmds.o	\
	internal_procs.o	\
	invert.o		\
	iscissors.o		\
	layer.o			\
	layer_cmds.o		\
	layer_select.o		\
	layers_dialog.o		\
	lc_dialog.o		\
	levels.o		\
	lut_funcs.o		\
	magnify.o		\
	main.o			\
Tor Lillqvist's avatar
Tor Lillqvist committed
183
	measure.o		\
184 185 186 187
	menus.o			\
	misc_cmds.o		\
	module_db.o		\
	move.o			\
Tor Lillqvist's avatar
Tor Lillqvist committed
188
	nav_window.o		\
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213
	ops_buttons.o		\
	palette.o		\
	palette_cmds.o		\
	palette_select.o	\
	paint_core.o		\
	paint_funcs.o		\
	paintbrush.o		\
	parasite_cmds.o		\
	parasitelist.o		\
	paths_cmds.o		\
	paths_dialog.o		\
	pattern_select.o	\
	pattern_select_cmds.o	\
	patterns.o		\
	patterns_cmds.o		\
	pencil.o		\
	perspective_tool.o	\
	pixel_processor.o	\
	pixel_region.o		\
	plug_in.o		\
	plug_in_cmds.o		\
	posterize.o		\
	preferences_dialog.o	\
	procedural_db.o		\
	procedural_db_cmds.o	\
214
	qmask.o			\
215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245
	rect_select.o		\
	regex.o			\
	resize.o		\
	rotate_tool.o		\
	scale.o			\
	scale_tool.o		\
	scroll.o		\
	selection.o		\
	session.o		\
	shear_tool.o		\
	smudge.o		\
	temp_buf.o		\
	text_tool.o		\
	text_tool_cmds.o	\
	threshold.o		\
	tile.o			\
	tile_cache.o		\
	tile_manager.o		\
	tile_swap.o		\
	tips_dialog.o		\
	tool_options.o		\
	tools.o			\
	tools_cmds.o		\
	transform_core.o	\
	transform_tool.o	\
	undo.o			\
	undo_cmds.o		\
	unit_cmds.o		\
	vector2d.o		\
	xcf.o

246
# .SUFFIXES: .gc
247

248 249
# .gc.c:
#	$(GCG) -o $@ $<
250 251 252 253

gimpres.o : gimp.rc wilber.ico
	windres gimp.rc gimpres.o

254 255 256 257
gimp.def: gimp.sym
	echo EXPORTS >$@
	cat $< >>$@

258 259
gimp.exe : ../config.h $(gimp_OBJECTS) libgimpim.a gimp.def gimpres.o
# This is sickening.
Tor Lillqvist's avatar
Tor Lillqvist committed
260
	$(CC) $(CFLAGS) -Wl,--base-file,gimp.base -mwindows -o gimp.exe $(gimp_OBJECTS) -L . -lgimpim -L  ../libgimp -lgimpi -L $(GTK)/gtk -lgtk-$(GTK_VER) -L $(GTK)/gdk/win32 -lgdk-$(GTK_VER) -L $(INTL) -lgnu-intl -L $(GLIB) -lglib-$(GLIB_VER) -lgmodule-$(GLIB_VER) gimpres.o -lgdi32 -luser32
261
	$(DLLTOOL) --base-file gimp.base --input-def gimp.def --output-exp gimp.exp
Tor Lillqvist's avatar
Tor Lillqvist committed
262
	$(CC) $(CFLAGS) -Wl,--base-file,gimp.base,gimp.exp -mwindows -o gimp.exe $(gimp_OBJECTS) -L . -lgimpim -L ../libgimp -lgimpi -L $(GTK)/gtk -lgtk-$(GTK_VER) -L $(GTK)/gdk/win32 -lgdk-$(GTK_VER) -L $(INTL) -lgnu-intl -L $(GLIB) -lglib-$(GLIB_VER) -lgmodule-$(GLIB_VER) gimpres.o -lgdi32 -luser32
263
	$(DLLTOOL) --base-file gimp.base --input-def gimp.def --output-exp gimp.exp
Tor Lillqvist's avatar
Tor Lillqvist committed
264
	$(CC) -v $(CFLAGS) -Wl,gimp.exp -mwindows -o gimp.exe $(gimp_OBJECTS) -L. -lgimpim -L ../libgimp -lgimpi -L $(GTK)/gtk -lgtk-$(GTK_VER) -L $(GTK)/gdk/win32 -lgdk-$(GTK_VER) -L $(INTL) -lgnu-intl -L $(GLIB) -lglib-$(GLIB_VER) -lgmodule-$(GLIB_VER) gimpres.o -lgdi32 -luser32
265 266
	$(DLLTOOL) --dllname gimp.exe gimp.def --output-lib libgimp.a $(gimp_OBJECTS)
	
Tor Lillqvist's avatar
Tor Lillqvist committed
267 268
.SUFFIXES: .c .o .i

269 270 271 272
# General rule for building $(gimp_OBJECTS)
.c.o:
	$(CC) $(CFLAGS) -c $<

Tor Lillqvist's avatar
Tor Lillqvist committed
273 274 275
.c.i:
	$(CC) $(CFLAGS) -E $< >$@

276 277
clean:
	-rm *.exe *.a *.o *.base *.exp