Compile with -DG_DISABLE_DEPRECATED. See #52790.
[platform/upstream/atk.git] / atk / Makefile.am
index 945b013..d0743a4 100644 (file)
@@ -1,6 +1,14 @@
 EXTRA_DIST = atk.def
 if OS_WIN32
 export_symbols = -export-symbols atk.def
+
+install-libtool-import-lib:
+       $(INSTALL) .libs/libatk.dll.a $(DESTDIR)$(libdir)
+uninstall-libtool-import-lib:
+       -rm $(DESTDIR)$(libdir)/libatk.dll.a
+else
+install-libtool-import-lib:
+uninstall-libtool-import-lib:
 endif
 
 lib_LTLIBRARIES = libatk.la
@@ -8,13 +16,21 @@ lib_LTLIBRARIES = libatk.la
 if MS_LIB_AVAILABLE
 noinst_DATA = atk.lib
 
-install-data-local:
-       cp atk.lib $(DESTDIR)$(libdir)
+install-ms-lib:
+       $(INSTALL) atk.lib $(DESTDIR)$(libdir)
 
-uninstall-local:
+uninstall-ms-lib:
        -rm $(DESTDIR)$(libdir)/atk.lib
+else
+install-ms-lib:
+uninstall-ms-lib:
 endif
 
+atk_built_headers = atk-enum-types.h
+atk_built_cfiles = atk-enum-types.c
+
+$(OBJECTS): $(atk_built_headers)
+
 libatk_la_SOURCES =            \
        atkaction.c             \
        atkcomponent.c          \
@@ -37,7 +53,8 @@ libatk_la_SOURCES =           \
        atktable.c              \
        atktext.c               \
        atkutil.c               \
-       atkvalue.c
+       atkvalue.c              \
+       $(atk_built_cfiles)
 
 EXTRA_DIST += atkmarshal.list
 MAINTAINERCLEANFILES +=        \
@@ -48,6 +65,7 @@ MAINTAINERCLEANFILES +=       \
 
 INCLUDES = \
        -I$(top_srcdir)         \
+       -DG_DISABLE_DEPRECATED  \
        @DEP_CFLAGS@
 
 LDFLAGS =  \
@@ -58,7 +76,7 @@ LDFLAGS =  \
 
 libatkincludedir=$(includedir)/atk-1.0/atk
 
-libatkinclude_HEADERS =        \
+atk_headers = \
         atk.h                  \
         atkaction.h            \
         atkcomponent.h         \
@@ -83,7 +101,11 @@ libatkinclude_HEADERS =     \
         atkutil.h              \
         atkvalue.h
 
-$(libatk_la_OBJECTS): atkmarshal.c atkmarshal.h
+libatkinclude_HEADERS =                \
+       $(atk_headers)          \
+       $(atk_built_headers)
+
+$(libatk_la_OBJECTS): atkmarshal.c atkmarshal.h $(atk_built_headers)
 
 atkmarshal.h: @REBUILD@ stamp-atkmarshal.h
        @true
@@ -109,5 +131,39 @@ stamp-atkmarshal.c: atkmarshal.list
        && rm -f xgen-gmc xgen-gmc~                                                                     \
        && echo timestamp > $(@F)
 
+atk-enum-types.h: s-enum-types-h
+       @true
+
+s-enum-types-h: @REBUILD@ $(atk_headers) Makefile
+       ( cd $(srcdir) && glib-mkenums \
+                       --fhead "#ifndef __ATK_ENUM_TYPES_H__\n#define __ATK_ENUM_TYPES_H__\n" \
+                       --fprod "/* enumerations from \"@filename@\" */\n" \
+                       --vhead "GType @enum_name@_get_type (void);\n#define ATK_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n"         \
+                       --ftail "#endif /* __ATK_ENUM_TYPES_H__ */" \
+               $(atk_headers) ) > tmp-atk-enum-types.h \
+       && (cmp -s tmp-atk-enum-types.h $(srcdir)/atk-enum-types.h || cp tmp-atk-enum-types.h $(srcdir)/atk-enum-types.h ) \
+       && rm -f tmp-atk-enum-types.h \
+       && echo timestamp > $(@F)
+
+atk-enum-types.c: s-enum-types-c
+       @true
+
+s-enum-types-c: @REBUILD@ $(atk_headers) Makefile
+       ( cd $(srcdir) && glib-mkenums \
+                       --fhead "#include <atk.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" \
+               $(atk_headers) ) > tmp-atk-enum-types.c \
+       && (cmp -s tmp-atk-enum-types.c $(srcdir)/atk-enum-types.c || cp tmp-atk-enum-types.c $(srcdir)/atk-enum-types.c ) \
+       && rm -f tmp-atk-enum-types.c \
+       && echo timestamp > $(@F)
+
+
 atk.lib: libatk.la atk.def
        lib -name:libatk-@LT_CURRENT_MINUS_AGE@.dll -def:atk.def -out:$@
+
+install-data-local: install-ms-lib install-libtool-import-lib
+
+uninstall-local: uninstall-ms-lib uninstall-libtool-import-lib