| 1 |
INCLUDES = $(PYTHON_INCLUDES) $(PYGTK_CFLAGS) $(GTKIMAGEVIEW_CFLAGS) |
|---|
| 2 |
|
|---|
| 3 |
# Twiddle with the install path. Package is named pygtkimageview but I |
|---|
| 4 |
# want the .so-file to be installed in site-packages/gtkimageview. |
|---|
| 5 |
pkgpyexecdir = $(pyexecdir)/gtkimageview |
|---|
| 6 |
pkgpyexec_PYTHON = __init__.py |
|---|
| 7 |
|
|---|
| 8 |
# GtkImageView binding |
|---|
| 9 |
pkgpyexec_LTLIBRARIES = _gtkimageview.la |
|---|
| 10 |
_gtkimageview_la_LDFLAGS = -module -avoid-version \ |
|---|
| 11 |
--export-symbols-regex init_gtkimageview |
|---|
| 12 |
_gtkimageview_la_SOURCES = gtkimageview.c enums-public.c gtkimageviewmodule.c |
|---|
| 13 |
_gtkimageview_la_INCLUDES = enums-public.h enums-private.h |
|---|
| 14 |
_gtkimageview_la_LIBADD = $(GTKIMAGEVIEW_LIBS) $(PYTHON_LIBS) |
|---|
| 15 |
|
|---|
| 16 |
CLEANFILES = gtkimageview.c enums-public.h enums-private.h enums-public.c |
|---|
| 17 |
EXTRA_DIST = gtkimageview.defs gtkimageview.override |
|---|
| 18 |
|
|---|
| 19 |
# Rule for creating all public enum objects. Two rules are needed |
|---|
| 20 |
# because not all enums share the gtk prefix. Note the hardcoded |
|---|
| 21 |
# paths! |
|---|
| 22 |
enums-public.h: |
|---|
| 23 |
$(GLIB_MKENUMS) \ |
|---|
| 24 |
--fhead "#ifndef __PUB_ENUMS_H__\n#define __PUB_ENUMS_H__" \ |
|---|
| 25 |
--fprod "/* enumerations from \"@filename@\" */" \ |
|---|
| 26 |
--vhead "GType @enum_name@_get_type (void) G_GNUC_CONST;\n#define GTK_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \ |
|---|
| 27 |
--ftail "G_END_DECLS\n\n#endif" \ |
|---|
| 28 |
/home/bjourne/svngnome/install/include/gtkimageview/gtk*.h > $@ |
|---|
| 29 |
|
|---|
| 30 |
enums-public.c: |
|---|
| 31 |
$(GLIB_MKENUMS) \ |
|---|
| 32 |
--fhead "#include <gtkimageview/gtkimageview.h>\n#include <gtkimageview/gtkimagetoolselector.h>\n" \ |
|---|
| 33 |
--fprod "/* enumerations from \"@filename@\" */" \ |
|---|
| 34 |
--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[] = {" \ |
|---|
| 35 |
--vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \ |
|---|
| 36 |
--vtail " { 0, NULL, NULL }\n };\n etype = g_@type@_register_static (g_intern_static_string (\"@EnumName@\"), values);\n }\n return etype;\n}\n" \ |
|---|
| 37 |
/home/bjourne/svngnome/install/include/gtkimageview/gtk*.h > $@ |
|---|
| 38 |
|
|---|
| 39 |
# Rule for the private enums. |
|---|
| 40 |
enums-private.h: |
|---|
| 41 |
$(GLIB_MKENUMS) \ |
|---|
| 42 |
--fhead "#ifndef __PRIV_ENUMS_H__\n#define __PRIV_ENUMS_H__" \ |
|---|
| 43 |
--fprod "/* enumerations from \"@filename@\" */" \ |
|---|
| 44 |
--vhead "GType @enum_name@_get_type (void) G_GNUC_CONST;\n#define GTK_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \ |
|---|
| 45 |
--ftail "G_END_DECLS\n\n#endif" \ |
|---|
| 46 |
/home/bjourne/svngnome/install/include/gtkimageview/gtk*.h > $@ |
|---|
| 47 |
|
|---|
| 48 |
gtkimageview.c: gtkimageview.defs gtkimageview.override |
|---|
| 49 |
|
|---|
| 50 |
.defs.c: |
|---|
| 51 |
$(PYGTK_CODEGEN) \ |
|---|
| 52 |
-r $(PYGTK_DEFSDIR)/gdk-types.defs \ |
|---|
| 53 |
-r $(PYGTK_DEFSDIR)/gtk-types.defs \ |
|---|
| 54 |
-o $*.override \ |
|---|
| 55 |
--prefix $* $*.defs > $*.c |
|---|