makefile.msc 3.78 KB
Newer Older
1 2 3 4 5
TOP = ..\..
PRJ_TOP = ..
PACKAGE = gdk_pixbuf
PKG_VER = $(GDK_PIXBUF_VER)

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

Hans Breuer's avatar
Hans Breuer committed
8 9 10 11
!IFNDEF PERL
PERL = perl
!ENDIF

12 13 14 15 16 17 18 19
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) \
Hans Breuer's avatar
Hans Breuer committed
20
	$(G_DEBUGGING) \
21 22 23 24 25
	-UUSE_GMODULE # use built-in
#	-DUSE_GMODULE -DPIXBUF_LIBDIR=\".\"


PKG_LINK = $(GLIB_LIBS) \
26 27 28
#	$(TIFF_LIBS) \
	$(JPEG_LIBS) $(PNG_LIBS) $(INTL_LIBS) \
	pixops\pixops.lib \
29 30
 
OBJECTS = \
Hans Breuer's avatar
Hans Breuer committed
31
	gdk-pixbuf-enum-types.obj \
32 33 34 35 36 37 38
	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 \
39
	gdk-pixdata.obj \
40 41 42
	io-bmp.obj \
	io-wbmp.obj \
	io-gif.obj \
43
	io-gif-animation.obj \
44 45 46 47
	io-ico.obj \
	io-png.obj \
	io-pnm.obj \
	io-ras.obj \
48
#	io-tiff.obj \
49 50 51
	io-xpm.obj \
	io-jpeg.obj \

Hans Breuer's avatar
Hans Breuer committed
52 53 54 55
gdk_pixbuf_headers = 			\
	gdk-pixbuf.h			\
	gdk-pixbuf-loader.h

56 57 58 59 60 61 62 63 64 65 66 67
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

INSTALL = copy

CFLAGS = -I. -DHAVE_CONFIG_H

Hans Breuer's avatar
Hans Breuer committed
68 69 70 71 72
sub-pixops :
	cd pixops
	nmake -f makefile.msc
	cd ..

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

Hans Breuer's avatar
Hans Breuer committed
85 86
$(PACKAGE)-$(PKG_VER)s.lib : $(OBJECTS)
	lib /out:$(PACKAGE)-$(PKG_VER)s.lib $(OBJECTS) pixops\pixops.lib
87 88 89 90 91 92 93

$(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

94 95 96
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

97 98 99
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

Hans Breuer's avatar
Hans Breuer committed
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
#
# gdk-pixbuf-enum-types.h
#
gdk-pixbuf-enum-types.h : $(gdk_pixbuf_headers) makefile.msc
	$(PERL) $(GLIB)\gobject\glib-mkenums \
		--fhead "#ifndef __GDK_PIXBUF__ENUM_TYPES_H__\n#define __GDK_PIXBUF_ENUM_TYPES_H__\n" \
		--fprod "/* enumerations from \"@filename@\" */\n" \
		--vhead "GType @enum_name@_get_type (void);\n#define GDK_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n"         \
		--ftail "#endif /* __GDK_PIXBUF_ENUM_TYPES_H__ */" \
		$(gdk_pixbuf_headers) ) > gdk-pixbuf-enum-types.h

#
# gdk-pixbuf-enum-types.c
#
gdk-pixbuf-enum-types.c: $(gdk_pixbuf_headers) makefile.msc
	$(PERL) $(GLIB)\gobject\glib-mkenums \
		--fhead "#include <gdk-pixbuf/gdk-pixbuf.h>" \
		--fprod "\n/* enumerations from \"@filename@\" */" \
		--vhead "GType\n@enum_name@_get_type (void)\n{\n  static GType etype = 0;\n  if (etype == 0) {\n    static const G@Type@Value values[] = {"       \
		--vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
		--vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
		  $(gdk_pixbuf_headers) > gdk-pixbuf-enum-types.c

gdk-pixbuf-enum-types.obj : gdk-pixbuf-enum-types.c gdk-pixbuf-enum-types.h

125 126 127 128 129 130 131 132 133
$(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