1# This file is part of avahi. 2# 3# avahi is free software; you can redistribute it and/or modify it 4# under the terms of the GNU Lesser General Public License as 5# published by the Free Software Foundation; either version 2 of the 6# License, or (at your option) any later version. 7# 8# avahi is distributed in the hope that it will be useful, but WITHOUT 9# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 10# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public 11# License for more details. 12# 13# You should have received a copy of the GNU Lesser General Public 14# License along with avahi; if not, write to the Free Software 15# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 16# USA. 17 18AM_CFLAGS=-I$(top_srcdir) 19 20# This cool debug trap works on i386/gcc only 21AM_CFLAGS+='-DDEBUG_TRAP=__asm__("int $$3")' 22 23EXTRA_DIST = \ 24 AvahiCore-0.6.gir 25 26if HAVE_GOBJECT 27if HAVE_DBUS 28 29avahigobjectincludedir=$(includedir)/avahi-gobject 30 31avahigobjectinclude_HEADERS = \ 32 ga-client.h \ 33 ga-entry-group.h \ 34 ga-enums.h \ 35 ga-error.h \ 36 ga-record-browser.h \ 37 ga-service-browser.h \ 38 ga-service-resolver.h 39 40lib_LTLIBRARIES = \ 41 libavahi-gobject.la 42 43BUILT_SOURCES = \ 44 signals-marshal.list \ 45 signals-marshal.h \ 46 signals-marshal.c \ 47 ga-client-enumtypes.h \ 48 ga-client-enumtypes.c \ 49 ga-entry-group-enumtypes.h \ 50 ga-entry-group-enumtypes.c \ 51 ga-enums-enumtypes.h \ 52 ga-enums-enumtypes.c 53 54CORE_SOURCES = \ 55 ga-client.c ga-client.h \ 56 ga-entry-group.c ga-entry-group.h \ 57 ga-enums.h \ 58 ga-error.c ga-error.h \ 59 ga-record-browser.c ga-record-browser.h \ 60 ga-service-browser.c ga-service-browser.h \ 61 ga-service-resolver.c ga-service-resolver.h 62 63libavahi_gobject_la_SOURCES = \ 64 $(CORE_SOURCES) \ 65 $(BUILT_SOURCES) 66 67libavahi_gobject_la_CFLAGS = $(AM_CFLAGS) $(GOBJECT_CFLAGS) 68libavahi_gobject_la_LIBADD = $(AM_LDADD) ../avahi-common/libavahi-common.la ../avahi-client/libavahi-client.la ../avahi-glib/libavahi-glib.la $(GOBJECT_LIBS) 69libavahi_gobject_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBAVAHI_GOBJECT_VERSION_INFO) -export-symbols-regex '^ga_' 70 71# correctly clean the generated source files 72CLEANFILES = $(BUILT_SOURCES) 73 74dist-hook: 75 $(shell for x in $(BUILT_SOURCES); do rm -f $(distdir)/$$x ; done) 76 77signals-marshal.list: $(CORE_SOURCES) Makefile.am 78 $(AM_V_GEN)( cd $(srcdir) && \ 79 sed -n -e 's/.*_ga_signals_marshal_\([A-Z]*__[A-Z_]*\).*/\1/p' \ 80 $(CORE_SOURCES) ) \ 81 | sed -e 's/__/:/' -e 'y/_/,/' | sort -u > $@.tmp && \ 82 if cmp -s $@.tmp $@; then \ 83 rm $@.tmp; \ 84 else \ 85 mv $@.tmp $@; \ 86 fi 87 88signals-marshal.h: signals-marshal.list 89 $(AM_V_GEN)glib-genmarshal --header --prefix=_ga_signals_marshal $< > $@ 90 91signals-marshal.c: signals-marshal.list 92 $(AM_V_GEN)(echo "#include \"signals-marshal.h\"" ; glib-genmarshal --body --prefix=_ga_signals_marshal $< ) > $@ 93 94# rules for making the glib enum objects 95%-enumtypes.h: %.h Makefile.in 96 $(AM_V_GEN)glib-mkenums \ 97 --fhead "#ifndef __$(shell echo $* | tr [:lower:]- [:upper:]_)_ENUM_TYPES_H__\n#define __$(shell echo $* | tr [:lower:]- [:upper:]_)_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \ 98 --fprod "/* enumerations from \"@filename@\" */\n" \ 99 --vhead "GType @enum_name@_get_type (void);\n#define $(shell echo $* | tr [:lower:]- [:upper:]_ | sed 's/_.*//')_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \ 100 --ftail "G_END_DECLS\n\n#endif /* __$(shell echo $* | tr [:lower:]- [:upper:]_)_ENUM_TYPES_H__ */" \ 101 $< > $@ 102 103%-enumtypes.c: %.h Makefile.in 104 $(AM_V_GEN)glib-mkenums \ 105 --fhead "#include <$*.h>\n#include<$*-enumtypes.h>" \ 106 --fprod "\n/* enumerations from \"@filename@\" */" \ 107 --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[] = {" \ 108 --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@VALUENAME@\" }," \ 109 --vtail " { 0, NULL, NULL }\n };\n etype = g_@type@_register_static (\"@EnumName@\", values);\n }\n return etype;\n}\n" \ 110 $< > $@ 111 112-include $(INTROSPECTION_MAKEFILE) 113INTROSPECTION_GIRS = 114INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) 115INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir) 116 117if HAVE_INTROSPECTION 118introspection_sources = $(libavahi_gobject_la_SOURCES) 119 120Avahi-0.6.gir: $(lib_LTLIBRARIES) 121Avahi_0_6_gir_INCLUDES = GObject-2.0 AvahiCore-0.6 122Avahi_0_6_gir_CFLAGS = $(libavahi_gobject_la_CFLAGS) 123Avahi_0_6_gir_LIBS = $(lib_LTLIBRARIES) 124Avahi_0_6_gir_FILES = $(addprefix $(srcdir)/, $(CORE_SOURCES)) $(BUILT_SOURCES) 125Avahi_0_6_gir_SCANNERFLAGS = --strip-prefix=Ga 126INTROSPECTION_GIRS += Avahi-0.6.gir 127INTROSPECTION_INSTALL_GIRS = AvahiCore-0.6.gir $(INTROSPECTION_GIRS) 128 129girdir = $(datadir)/gir-1.0 130gir_DATA = $(INTROSPECTION_INSTALL_GIRS) 131 132typelibdir = $(libdir)/girepository-1.0 133typelib_DATA = $(INTROSPECTION_INSTALL_GIRS:.gir=.typelib) 134 135CLEANFILES += $(INTROSPECTION_GIRS) $(typelib_DATA) 136endif 137 138endif 139endif 140 141indent: 142 indent -brf -nbbo -nbc -ip0 -cs -nbfde -npsl -br -brs -bap -i4 -bs -cdw -ce -npcs -hnl -cli4 -nut -ci8 ga-*.[ch] 143 144Android.mk: Makefile.am $(BUILT_SOURCES) 145 androgenizer -:PROJECT avahi -:SHARED avahi-gobject -:TAGS eng debug \ 146 -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ 147 -:SOURCES $(libavahi_gobject_la_SOURCES) \ 148 -:CFLAGS $(DEFS) $(CFLAGS) $(DEFAULT_INCLUDES) $(INCLUDES) \ 149 $(libavahi_gobject_la_CFLAGS) \ 150 -:CPPFLAGS $(CPPFLAGS) $(AM_CPPFLAGS)\ 151 -:LDFLAGS $(libavahi_gobject_la_LIBADD) $(libavahi_gobject_la_LDFLAGS) \ 152 > $@ 153