Add GSettings Windows Registry backend
[platform/upstream/glib.git] / gio / Makefile.am
1 include $(top_srcdir)/Makefile.decl
2
3 NULL =
4
5 SUBDIRS=
6
7 if OS_UNIX
8 SUBDIRS += libasyncns xdgmime
9 endif
10
11 if OS_WIN32_AND_DLL_COMPILATION
12 if MS_LIB_AVAILABLE
13 noinst_DATA = gio-2.0.lib
14
15 install_ms_lib_cmd = $(INSTALL) gio-2.0.lib $(DESTDIR)$(libdir)
16 uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/gio-2.0.lib
17 endif
18 endif
19
20 install-ms-lib:
21         $(install_ms_lib_cmd)
22
23 uninstall-ms-lib:
24         $(uninstall_ms_lib_cmd)
25
26 gio.def: gio.symbols
27         $(AM_V_GEN) (echo -e EXPORTS; $(CPP) -P -DINCLUDE_VARIABLES -DINCLUDE_INTERNAL_SYMBOLS -DG_OS_WIN32 -DALL_FILES - <$(srcdir)/gio.symbols | sed -e '/^$$/d' -e 's/^/     /' -e 's/G_GNUC_[^ ]*//g' | sort) > gio.def.tmp && \
28           mv gio.def.tmp gio.def
29
30 if OS_LINUX
31 if HAVE_GNUC_VISIBILITY
32 TESTS = abicheck.sh
33 endif
34 endif
35
36 if HAVE_THREADS
37 THREAD_FLAGS=-DG_THREADS_MANDATORY
38 endif
39
40 AM_CPPFLAGS = \
41         -DG_LOG_DOMAIN=\"GLib-GIO\"                     \
42         $(gmodule_INCLUDES)                             \
43         $(GLIB_DEBUG_FLAGS)                             \
44         $(THREAD_FLAGS)                                 \
45         -DG_DISABLE_DEPRECATED                          \
46         -DGIO_COMPILATION                               \
47         -DGIO_MODULE_DIR=\"$(GIO_MODULE_DIR)\"  
48
49 lib_LTLIBRARIES = libgio-2.0.la
50
51 marshal_sources = \
52         gio-marshal.h   \
53         gio-marshal.c   \
54         $(NULL)
55
56 if CROSS_COMPILING
57   glib_genmarshal=$(GLIB_GENMARSHAL)
58 else
59   glib_genmarshal=../gobject/glib-genmarshal
60 endif
61
62 gio-marshal.h: gio-marshal.list
63         $(AM_V_GEN) $(glib_genmarshal) --prefix=_gio_marshal $(srcdir)/gio-marshal.list --header --internal > $@.tmp && \
64           mv $@.tmp $@
65
66 gio-marshal.c: gio-marshal.h gio-marshal.list
67         $(AM_V_GEN) (echo "#include \"gio-marshal.h\""; \
68         $(glib_genmarshal) --prefix=_gio_marshal $(srcdir)/gio-marshal.list --body --internal) > $@.tmp && \
69           mv $@.tmp $@
70
71 gdbus_headers =                         \
72         gdbusauthobserver.h             \
73         gcredentials.h                  \
74         gdbusutils.h                    \
75         gdbuserror.h                    \
76         gdbusaddress.h                  \
77         gdbusconnection.h               \
78         gdbusmessage.h                  \
79         gdbusnameowning.h               \
80         gdbusnamewatching.h             \
81         gdbusproxy.h                    \
82         gdbusintrospection.h            \
83         gdbusmethodinvocation.h         \
84         gdbusserver.h                   \
85         $(NULL)
86
87 gdbus_sources =                                                         \
88         gdbusutils.h                    gdbusutils.c                    \
89         gdbusaddress.h                  gdbusaddress.c                  \
90         gdbusauthobserver.h             gdbusauthobserver.c             \
91         gdbusauth.h                     gdbusauth.c                     \
92         gdbusauthmechanism.h            gdbusauthmechanism.c            \
93         gdbusauthmechanismanon.h        gdbusauthmechanismanon.c        \
94         gdbusauthmechanismexternal.h    gdbusauthmechanismexternal.c    \
95         gdbusauthmechanismsha1.h        gdbusauthmechanismsha1.c        \
96         gdbuserror.h                    gdbuserror.c                    \
97         gdbusconnection.h               gdbusconnection.c               \
98         gdbusmessage.h                  gdbusmessage.c                  \
99         gdbusnameowning.h               gdbusnameowning.c               \
100         gdbusnamewatching.h             gdbusnamewatching.c             \
101         gdbusproxy.h                    gdbusproxy.c                    \
102         gdbusprivate.h                  gdbusprivate.c                  \
103         gdbusintrospection.h            gdbusintrospection.c            \
104         gdbusmethodinvocation.h         gdbusmethodinvocation.c         \
105         gdbusserver.h                   gdbusserver.c                   \
106         $(NULL)
107
108 settings_headers = \
109         gsettingsbackend.h              \
110         gsettings.h
111
112 settings_sources = \
113         gvdb/gvdb-format.h              \
114         gvdb/gvdb-reader.h              \
115         gvdb/gvdb-reader.c              \
116         gdelayedsettingsbackend.h       \
117         gdelayedsettingsbackend.c       \
118         gkeyfilesettingsbackend.c       \
119         gmemorysettingsbackend.h        \
120         gmemorysettingsbackend.c        \
121         gnullsettingsbackend.h          \
122         gnullsettingsbackend.c          \
123         gsettingsbackendinternal.h      \
124         gsettingsbackend.c              \
125         gsettingsschema.h               \
126         gsettingsschema.c               \
127         gsettings-mapping.h             \
128         gsettings-mapping.c             \
129         gsettings.c
130
131 if OS_WIN32
132 settings_sources += \
133         gregistrysettingsbackend.h      \
134         gregistrysettingsbackend.c
135 endif
136
137 application_headers = \
138         gactiongroup.h                  \
139         gsimpleactiongroup.h            \
140         gaction.h                       \
141         gsimpleaction.h                 \
142         gapplication.h
143
144 application_sources = \
145         gactiongroup.c                  \
146         gsimpleactiongroup.c            \
147         gaction.c                       \
148         gsimpleaction.c                 \
149         gapplication.c
150
151 local_sources = \
152         glocaldirectorymonitor.c        \
153         glocaldirectorymonitor.h        \
154         glocalfile.c                    \
155         glocalfile.h                    \
156         glocalfileenumerator.c          \
157         glocalfileenumerator.h          \
158         glocalfileinfo.c                \
159         glocalfileinfo.h                \
160         glocalfileinputstream.c         \
161         glocalfileinputstream.h         \
162         glocalfilemonitor.c             \
163         glocalfilemonitor.h             \
164         glocalfileoutputstream.c        \
165         glocalfileoutputstream.h        \
166         glocalfileiostream.c            \
167         glocalfileiostream.h            \
168         glocalvfs.c                     \
169         glocalvfs.h                     \
170         gsocks4proxy.c                  \
171         gsocks4proxy.h                  \
172         gsocks4aproxy.c                 \
173         gsocks4aproxy.h                 \
174         gsocks5proxy.c                  \
175         gsocks5proxy.h                  \
176         $(NULL)
177
178 platform_libadd =
179 platform_deps =
180 appinfo_sources =
181
182 if HAVE_INOTIFY
183 SUBDIRS += inotify
184 platform_libadd += inotify/libinotify.la
185 platform_deps += inotify/libinotify.la
186 endif
187
188 if HAVE_FEN
189 AM_CPPFLAGS += -DHAVE_FEN
190 SUBDIRS += fen
191 platform_libadd += fen/libfen.la
192 platform_deps += fen/libfen.la
193 endif
194
195 if OS_WIN32
196 SUBDIRS += win32
197 platform_libadd += win32/libgiowin32.la
198 platform_deps += win32/libgiowin32.la
199 endif
200
201
202 SUBDIRS += .
203
204 if HAVE_FAM
205 SUBDIRS += fam
206 endif
207
208 if OS_UNIX
209 appinfo_sources += gdesktopappinfo.c
210 platform_libadd += libasyncns/libasyncns.la xdgmime/libxdgmime.la
211 platform_deps += libasyncns/libasyncns.la xdgmime/libxdgmime.la
212 unix_sources = \
213         gfiledescriptorbased.c  \
214         gunixconnection.c       \
215         gunixcredentialsmessage.c       \
216         gunixfdlist.c           \
217         gunixfdmessage.c        \
218         gunixmount.c            \
219         gunixmount.h            \
220         gunixmounts.c           \
221         gunixresolver.c         \
222         gunixresolver.h         \
223         gunixsocketaddress.c    \
224         gunixvolume.c           \
225         gunixvolume.h           \
226         gunixvolumemonitor.c    \
227         gunixvolumemonitor.h    \
228         gunixinputstream.c      \
229         gunixoutputstream.c     \
230         $(NULL)
231
232
233 giounixincludedir=$(includedir)/gio-unix-2.0/gio
234 giounixinclude_HEADERS = \
235         gdesktopappinfo.h       \
236         gfiledescriptorbased.h  \
237         gunixconnection.h       \
238         gunixcredentialsmessage.h       \
239         gunixmounts.h           \
240         gunixfdlist.h           \
241         gunixfdmessage.h        \
242         gunixinputstream.h      \
243         gunixoutputstream.h     \
244         gunixsocketaddress.h    \
245         $(NULL)
246 endif
247
248 win32_actual_sources = \
249         gwin32mount.c \
250         gwin32mount.h \
251         gwin32resolver.c \
252         gwin32resolver.h \
253         gwin32volumemonitor.c \
254         gwin32volumemonitor.h \
255         gwin32inputstream.c \
256         gwin32outputstream.c \
257         gwin32outputstream.h \
258         $(NULL)
259
260 win32_more_sources_for_vcproj = \
261         gwin32appinfo.c \
262         win32/gwin32directorymonitor.c \
263         win32/gwinhttpfile.c \
264         win32/gwinhttpfileinputstream.c \
265         win32/gwinhttpfileoutputstream.c \
266         win32/gwinhttpvfs.c
267
268 if OS_WIN32
269 appinfo_sources += gwin32appinfo.c gwin32appinfo.h
270 platform_libadd += -lshlwapi -lws2_32 -ldnsapi
271 win32_sources = $(win32_actual_sources)
272
273 giowin32includedir=$(includedir)/gio-win32-2.0/gio
274 giowin32include_HEADERS = \
275         gwin32inputstream.h \
276         gwin32outputstream.h \
277         $(NULL)
278
279 endif
280
281 SUBDIRS += tests
282
283 libgio_2_0_la_SOURCES =         \
284         gappinfo.c              \
285         gasynchelper.c          \
286         gasynchelper.h          \
287         gasyncinitable.c        \
288         gasyncresult.c          \
289         gbufferedinputstream.c  \
290         gbufferedoutputstream.c \
291         gcancellable.c          \
292         gcontenttype.c          \
293         gcontenttypeprivate.h   \
294         gcharsetconverter.c     \
295         gconverter.c            \
296         gconverterinputstream.c \
297         gconverteroutputstream.c        \
298         gcredentials.c          \
299         gdatainputstream.c      \
300         gdataoutputstream.c     \
301         gdrive.c                \
302         gdummyfile.h            \
303         gdummyfile.c            \
304         gdummyproxyresolver.c   \
305         gdummyproxyresolver.h   \
306         gemblem.h               \
307         gemblem.c               \
308         gemblemedicon.h         \
309         gemblemedicon.c         \
310         gfile.c                 \
311         gfileattribute.c        \
312         gfileattribute-priv.h   \
313         gfileenumerator.c       \
314         gfileicon.c             \
315         gfileinfo.c             \
316         gfileinfo-priv.h        \
317         gfileinputstream.c      \
318         gfilemonitor.c          \
319         gfilenamecompleter.c    \
320         gfileoutputstream.c     \
321         gfileiostream.c         \
322         gfilterinputstream.c    \
323         gfilteroutputstream.c   \
324         gicon.c                 \
325         ginetaddress.c          \
326         ginetsocketaddress.c    \
327         ginitable.c             \
328         ginputstream.c          \
329         gioenums.h              \
330         gioerror.c              \
331         giomodule.c             \
332         giomodule-priv.h        \
333         gioscheduler.c          \
334         giostream.c             \
335         gloadableicon.c         \
336         gmount.c                \
337         gmemoryinputstream.c    \
338         gmemoryoutputstream.c   \
339         gmountoperation.c       \
340         gnativevolumemonitor.c  \
341         gnativevolumemonitor.h  \
342         gnetworkaddress.c       \
343         gnetworkingprivate.h    \
344         gnetworkservice.c       \
345         goutputstream.c         \
346         gpermission.c           \
347         gpollfilemonitor.c      \
348         gpollfilemonitor.h      \
349         gproxyresolver.c        \
350         gresolver.c             \
351         gseekable.c             \
352         gsimpleasyncresult.c    \
353         gsimplepermission.c     \
354         gsocket.c               \
355         gsocketaddress.c        \
356         gsocketaddressenumerator.c \
357         gsocketclient.c         \
358         gsocketconnectable.c    \
359         gsocketconnection.c     \
360         gsocketcontrolmessage.c \
361         gsocketinputstream.c    \
362         gsocketinputstream.h    \
363         gsocketlistener.c       \
364         gsocketoutputstream.c   \
365         gsocketoutputstream.h   \
366         gproxy.c                \
367         gproxyaddress.c         \
368         gproxyaddressenumerator.c \
369         gproxyconnection.c      \
370         gproxyconnection.h      \
371         gsocketservice.c        \
372         gsrvtarget.c            \
373         gtcpconnection.c        \
374         gthreadedsocketservice.c\
375         gthemedicon.c           \
376         gthreadedresolver.c     \
377         gthreadedresolver.h     \
378         gunionvolumemonitor.c   \
379         gunionvolumemonitor.h   \
380         gvfs.c                  \
381         gvolume.c               \
382         gvolumemonitor.c        \
383         gzlibcompressor.c       \
384         gzlibdecompressor.c     \
385         gmountprivate.h         \
386         gioenumtypes.h          \
387         gioenumtypes.c          \
388         $(appinfo_sources)      \
389         $(unix_sources)         \
390         $(win32_sources)        \
391         $(application_sources)  \
392         $(settings_sources)     \
393         $(gdbus_sources)        \
394         $(local_sources)        \
395         $(marshal_sources)      \
396         $(NULL)
397
398 EXTRA_DIST += gnullapplication.c gdbusapplication.c strinfo.c
399
400 $(libgio_2_0_la_OBJECTS): $(marshal_sources)
401
402 libgio_2_0_la_LIBADD = \
403         $(top_builddir)/glib/libglib-2.0.la             \
404         $(top_builddir)/gobject/libgobject-2.0.la       \
405         $(top_builddir)/gmodule/libgmodule-2.0.la       \
406         $(platform_libadd)                              \
407         $(ZLIB_LIBS)                                    \
408         $(SELINUX_LIBS)                                 \
409         $(GLIB_LIBS)                                    \
410         $(XATTR_LIBS)                                   \
411         $(NULL)
412
413 if PLATFORM_WIN32
414 no_undefined = -no-undefined
415 endif
416
417 if OS_WIN32_AND_DLL_COMPILATION
418 export_symbols = -export-symbols gio.def
419 gio_def = gio.def
420
421 gio_win32_res = gio-win32-res.o
422 gio_win32_res_ldflag = -Wl,$(gio_win32_res)
423
424 install-def-file:
425         $(INSTALL) gio.def $(DESTDIR)$(libdir)/gio-2.0.def
426
427 uninstall-def-file:
428         -rm $(DESTDIR)$(libdir)/gio-2.0.def
429 else
430 install-def-file:
431 uninstall-def-file:
432
433 export_symbols = -export-symbols-regex '^g_.*'
434 endif
435
436 install-data-local: install-ms-lib install-def-file
437         $(mkinstalldirs) $(DESTDIR)$(GIO_MODULE_DIR)
438
439 uninstall-local: uninstall-ms-lib uninstall-def-file
440
441 libgio_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \
442         $(gio_win32_res_ldflag) \
443         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
444         -export-dynamic $(no_undefined) $(export_symbols)
445
446 libgio_2_0_la_DEPENDENCIES = $(gio_win32_res) $(gio_def) $(platform_deps)
447
448 gio-win32-res.o: gio.rc
449         $(WINDRES) gio.rc $@
450
451 gio_headers =                   \
452         gappinfo.h              \
453         gasyncinitable.h        \
454         gasyncresult.h          \
455         gbufferedinputstream.h  \
456         gbufferedoutputstream.h \
457         gcancellable.h          \
458         gcontenttype.h          \
459         gcharsetconverter.h     \
460         gconverter.h            \
461         gconverterinputstream.h \
462         gconverteroutputstream.h        \
463         gdatainputstream.h      \
464         gdataoutputstream.h     \
465         gdrive.h                \
466         gemblem.h               \
467         gemblemedicon.h         \
468         gfile.h                 \
469         gfileattribute.h        \
470         gfileenumerator.h       \
471         gfileicon.h             \
472         gfileinfo.h             \
473         gfileinputstream.h      \
474         gfilemonitor.h          \
475         gfilenamecompleter.h    \
476         gfileoutputstream.h     \
477         gfileiostream.h         \
478         gfilterinputstream.h    \
479         gfilteroutputstream.h   \
480         gicon.h                 \
481         ginetaddress.h          \
482         ginetsocketaddress.h    \
483         ginputstream.h          \
484         ginitable.h             \
485         gio.h                   \
486         giotypes.h              \
487         gioenums.h              \
488         gioerror.h              \
489         giomodule.h             \
490         gioscheduler.h          \
491         giostream.h             \
492         gloadableicon.h         \
493         gmount.h                \
494         gmemoryinputstream.h    \
495         gmemoryoutputstream.h   \
496         gmountoperation.h       \
497         gnativevolumemonitor.h  \
498         gnetworkaddress.h       \
499         gnetworkservice.h       \
500         goutputstream.h         \
501         gpermission.h           \
502         gproxyaddress.h         \
503         gproxy.h                \
504         gproxyaddressenumerator.h \
505         gproxyresolver.h        \
506         gresolver.h             \
507         gseekable.h             \
508         gsimpleasyncresult.h    \
509         gsimplepermission.h     \
510         gsocket.h               \
511         gsocketaddress.h        \
512         gsocketaddressenumerator.h \
513         gsocketclient.h         \
514         gsocketconnectable.h    \
515         gsocketconnection.h     \
516         gsocketcontrolmessage.h \
517         gsocketlistener.h       \
518         gsocketservice.h        \
519         gsrvtarget.h            \
520         gtcpconnection.h        \
521         gthreadedsocketservice.h\
522         gthemedicon.h           \
523         gvfs.h                  \
524         gvolume.h               \
525         gvolumemonitor.h        \
526         gzlibcompressor.h       \
527         gzlibdecompressor.h     \
528         $(application_headers)  \
529         $(settings_headers)     \
530         $(gdbus_headers)        \
531         $(NULL)
532
533 gioincludedir=$(includedir)/glib-2.0/gio/
534 gioinclude_HEADERS =            \
535         $(gio_headers)          \
536         gioenumtypes.h
537
538 # these sources (also mentioned above) are generated.
539 BUILT_SOURCES =                 \
540         gio-marshal.h           \
541         gio-marshal.c           \
542         gioenumtypes.h          \
543         gioenumtypes.c          \
544         $(NULL)
545
546 EXTRA_DIST +=                   \
547         gio-marshal.list        \
548         gio.symbols             \
549         gioenumtypes.h.template \
550         gioenumtypes.c.template \
551         makefile.msc            \
552         abicheck.sh             \
553         gio.rc.in               \
554         gschema.dtd             \
555         $(NULL)
556
557 BUILT_EXTRA_DIST =              \
558         gio.rc
559
560 CLEANFILES =                    \
561         $(marshal_sources)      \
562         $(NULL)
563
564 gioenumtypes.h: $(gio_headers) gioenumtypes.h.template
565         $(AM_V_GEN) ( top_builddir=`cd $(top_builddir) && pwd`; \
566           cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.h.template $(gio_headers) ) > \
567             gioenumtypes.h.tmp && mv gioenumtypes.h.tmp gioenumtypes.h
568
569 gioenumtypes.c: $(gio_headers) gioenumtypes.c.template
570         $(AM_V_GEN) ( top_builddir=`cd $(top_builddir) && pwd`; \
571           cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.c.template $(gio_headers) ) > \
572             gioenumtypes.c.tmp && mv gioenumtypes.c.tmp gioenumtypes.c
573
574 gio-2.0.lib: libgio-2.0.la gio.def
575         lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgio-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:gio.def -out:$@
576
577 bin_PROGRAMS = gio-querymodules glib-compile-schemas gsettings
578
579 gio_querymodules_SOURCES = gio-querymodules.c
580 gio_querymodules_LDADD   = \
581         $(top_builddir)/glib/libglib-2.0.la             \
582         $(top_builddir)/gobject/libgobject-2.0.la       \
583         $(top_builddir)/gmodule/libgmodule-2.0.la       \
584         libgio-2.0.la                                   \
585         $(NULL)
586
587 glib_compile_schemas_LDADD = $(top_builddir)/glib/libglib-2.0.la
588 glib_compile_schemas_SOURCES = \
589         gvdb/gvdb-format.h              \
590         gvdb/gvdb-builder.h             \
591         gvdb/gvdb-builder.c             \
592         gschema-compile.c
593
594 gsettings_LDADD = \
595         $(top_builddir)/glib/libglib-2.0.la             \
596         $(top_builddir)/gobject/libgobject-2.0.la       \
597         libgio-2.0.la
598 gsettings_SOURCES = gsettings-tool.c
599
600 schemadir = $(datadir)/glib-2.0/schemas
601 dist_schema_DATA = gschema.dtd
602
603 # ------------------------------------------------------------------------
604 # gdbus(1) tool
605
606 bin_PROGRAMS += gdbus
607 gdbus_SOURCES = gdbus-tool.c
608 gdbus_LDADD = libgio-2.0.la \
609         $(top_builddir)/glib/libglib-2.0.la             \
610         $(top_builddir)/gobject/libgobject-2.0.la
611
612 completiondir = $(sysconfdir)/bash_completion.d
613 completion_SCRIPTS = \
614         gdbus-bash-completion.sh                \
615         gsettings-bash-completion.sh
616 EXTRA_DIST += $(completion_SCRIPTS)
617
618 # ------------------------------------------------------------------------
619
620 dist-hook: $(BUILT_EXTRA_DIST) ../build/win32/vs9/gio.vcproj
621         files='$(BUILT_EXTRA_DIST)'; \
622         for f in $$files; do \
623           if test -f $$f; then d=.; else d=$(srcdir); fi; \
624           cp $$d/$$f $(distdir) || exit 1; done
625
626 ../build/win32/vs9/gio.vcproj: $(top_srcdir)/build/win32/vs9/gio.vcprojin
627         for F in `echo $(libgio_2_0_la_SOURCES) $(win32_actual_sources) $(win32_actual_more_sources_for_vcproj) | tr '/' '\\'`; do \
628                 case $$F in \
629                 gunix*.c|gdesktopappinfo.c) ;; \
630                 *.c) echo '   <File RelativePath="..\..\..\gio\'$$F'" />' \
631                      ;; \
632                 esac; \
633         done | sort -u >libgio.sourcefiles
634         $(CPP) -P - <$(top_srcdir)/build/win32/vs9/gio.vcprojin >$@
635         rm libgio.sourcefiles
636
637 if HAVE_GLIB_RUNTIME_LIBDIR
638 install-data-hook:
639         mkdir -p $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
640         mv $(DESTDIR)$(libdir)/libgio-2.0.so.0 $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
641         mv $(DESTDIR)$(libdir)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/$(GLIB_RUNTIME_LIBDIR)
642         rm -f $(DESTDIR)$(libdir)/libgio-2.0.so
643         ln -s $(GLIB_RUNTIME_LIBDIR)/libgio-2.0.so.0.$(LT_CURRENT).$(LT_REVISION) $(DESTDIR)$(libdir)/libgio-2.0.so
644 endif