makefile.msc 2.51 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
TOP = ..\..
PRJ_TOP = ..
PACKAGE = gdk_pixbuf
PKG_VER = $(GDK_PIXBUF_VER)

!INCLUDE $(TOP)/build/win32/make.msc

GDK_PIXBUF_VER = 1.3

# force inclusion of gdk-pixbuf-io-include.h
# to get _working_ include modules ...

PKG_CFLAGS = -I. -I.. $(GLIB_CFLAGS) \
	-FIgdk-pixbuf-io-include.h \
	$(JPEG_CFLAGS) $(PNG_CFLAGS) $(TIFF_CFLAGS) $(INTL_CFLAGS) \
	-UUSE_GMODULE # use built-in
#	-DUSE_GMODULE -DPIXBUF_LIBDIR=\".\"


PKG_LINK = $(GLIB_LIBS) \
21 22 23
#	$(TIFF_LIBS) \
	$(JPEG_LIBS) $(PNG_LIBS) $(INTL_LIBS) \
	pixops\pixops.lib \
24 25 26 27 28 29 30 31 32
 
OBJECTS = \
	gdk-pixbuf-animation.obj \
	gdk-pixbuf-data.obj \
	gdk-pixbuf-io.obj \
	gdk-pixbuf-loader.obj \
	gdk-pixbuf-scale.obj \
	gdk-pixbuf-util.obj \
	gdk-pixbuf.obj \
33
	gdk-pixdata.obj \
34 35 36
	io-bmp.obj \
	io-wbmp.obj \
	io-gif.obj \
37
	io-gif-animation.obj \
38 39 40 41
	io-ico.obj \
	io-png.obj \
	io-pnm.obj \
	io-ras.obj \
42
#	io-tiff.obj \
43 44 45 46 47 48 49 50 51 52 53 54
	io-xpm.obj \
	io-jpeg.obj \

gdk-pixbuf-marshal.h: gdk-pixbuf-marshal.list
	..\..\glib\gobject\glib-genmarshal --prefix=gdk_pixbuf_marshal gdk-pixbuf-marshal.list --header >gdk-pixbuf-marshal.h

gdk-pixbuf-marshal.c: gdk-pixbuf-marshal.list
	..\..\glib\gobject\glib-genmarshal --prefix=gdk_pixbuf_marshal gdk-pixbuf-marshal.list --body >gdk-pixbuf-marshal.c

## common stuff

# cl -? describes the options
55
CC = cl -G5 -GF $(OPTIMIZE) $(CRUNTIME) -W3 -nologo
56 57 58 59 60 61 62

# No general LDFLAGS needed
LDFLAGS = /link $(LINKDEBUG)
INSTALL = copy

CFLAGS = -I. -DHAVE_CONFIG_H

Hans Breuer's avatar
Hans Breuer committed
63 64 65 66 67
sub-pixops :
	cd pixops
	nmake -f makefile.msc
	cd ..

68 69 70 71 72
## targets
all : \
	$(PRJ_TOP)\config.h \
	gdk-pixbuf-marshal.c \
	gdk-pixbuf-marshal.h \
Hans Breuer's avatar
Hans Breuer committed
73
	sub-pixops \
74
	$(PACKAGE)-$(PKG_VER).dll \
75 76
#	make-inline-pixbuf.exe \
	gdk-pixbuf-csource.exe \
77 78 79 80 81 82 83 84 85 86 87
	test-gdk-pixbuf.exe

$(PACKAGE).lib : $(OBJECTS)
	lib /out:$(PACKAGE).lib $(OBJECTS)

$(PACKAGE)-$(PKG_VER).dll : $(OBJECTS) $(PACKAGE).def
	$(CC) $(CFLAGS) -LD -Fe$(PACKAGE)-$(PKG_VER).dll $(OBJECTS) $(PKG_LINK) user32.lib advapi32.lib wsock32.lib $(LDFLAGS) /def:$(PACKAGE).def

make-inline-pixbuf.exe : make-inline-pixbuf.c
	$(CC) $(PKG_CFLAGS) -Femake-inline-pixbuf.exe make-inline-pixbuf.c $(PKG_LINK) $(PACKAGE)-$(PKG_VER).lib

88 89 90
gdk-pixbuf-csource.exe : gdk-pixbuf-csource.c
	$(CC) $(PKG_CFLAGS) -Fegdk-pixbuf-csource.exe gdk-pixbuf-csource.c $(PKG_LINK) $(PACKAGE)-$(PKG_VER).lib

91 92 93 94 95 96 97 98 99 100 101 102
test-gdk-pixbuf.exe : test-gdk-pixbuf.c
	$(CC) $(PKG_CFLAGS) -Fetest-gdk-pixbuf.exe test-gdk-pixbuf.c $(PKG_LINK) $(PACKAGE)-$(PKG_VER).lib

$(PRJ_TOP)\config.h: $(PRJ_TOP)\config.h.win32
	copy $(PRJ_TOP)\config.h.win32 $(PRJ_TOP)\config.h

.c.obj :
	$(CC) $(CFLAGS) -GD -c $(PKG_CFLAGS) $<

clean::
	del config.h