f6b2f361ebaf77b42fdd8d434fba5cba69b65ac6
[citadel.git] / webcit / Makefile.in
1 prefix=@prefix@
2 srcdir=@srcdir@
3 VPATH=$(srcdir)
4
5 AUTOCONF=@AUTOCONF@
6 CC=@CC@
7 CFLAGS=@CFLAGS@
8 DEFS=@DEFS@
9 INSTALL=@INSTALL@
10 LIBOBJS=@LIBOBJS@
11 LIBS=@LIBS@
12 LDFLAGS=@LDFLAGS@
13 SED=@SED@
14 SETUP_LIBS=@SETUP_LIBS@
15 PTHREAD_DEFS=@PTHREAD_DEFS@
16 LIB_SUBDIRS=
17 PROG_SUBDIRS=@PROG_SUBDIRS@
18 SUBDIRS=$(LIB_SUBDIRS) $(PROG_SUBDIRS) 
19 LOCALEDIR=@LOCALEDIR@
20 WWWDIR=@WWWDIR@
21 ETCDIR=@ETCDIR@
22 HEADERS=calendar.h  dav.h  messages.h  modules_init.h  paramhandling.h  preferences.h  roomops.h  subst.h  sysdep.h  tcp_sockets.h  utils.h  webcit.h  webserver.h
23
24 # End of configuration section
25
26 all: buildinfo all-progs-recursive webcit
27
28 buildinfo:
29         echo
30         echo Compiler:  $(CC) $(CFLAGS) $(DEFS) $(PTHREAD_DEFS) -c -o $@
31         echo Linker:    $(CC) $(LDFLAGS) $(LIBOBJS)     $(LIBS)
32         echo
33
34 # for VPATH builds (invoked by configure)
35 mkdir-init:
36         mkdir locale
37
38 .SILENT:
39
40 .SUFFIXES: .cpp .c .o
41
42 clean:
43         rm -f *.o webcit webcit
44         rm -fr locale/*
45
46 distclean: clean
47         rm -f Makefile config.cache config.log config.status \
48                 po/webcit/Makefile \
49                 ical_maps.c \
50                 $(srcdir)/TAGS
51
52 webcit: webserver.o context_loop.o ical_dezonify.o \
53         cookie_conversion.o locate_host.o summary.o \
54         webcit.o auth.o tcp_sockets.o mainmenu.o serv_func.o who.o marchlist.o \
55         roomops.o roomlist.o roomtokens.o roomviews.o \
56         blogview_renderer.o msg_renderers.o jsonview_renderer.o mailview_renderer.o bbsview_renderer.o \
57         messages.o paging.o sysmsgs.o \
58         useredit.o vcard_edit.o preferences.o html2html.o listsub.o roomchat.o \
59         graphics.o netconf.o siteconfig.o subst.o \
60         calendar.o calendar_tools.o calendar_view.o tasks.o event.o smtpqueue.o \
61         availability.o iconbar.o icontheme.o crypto.o inetconf.o notes.o wiki.o \
62         dav_main.o dav_get.o dav_propfind.o dav_report.o fmt_date.o \
63         dav_options.o autocompletion.o gettext.o tabs.o sieve.o sitemap.o \
64         dav_delete.o dav_put.o http_datestring.o \
65         downloads.o addressbook_popup.o pushemail.o sysdep.o openid.o \
66         decode.o modules_init.o paramhandling.o utils.o \
67         ical_maps.o ical_subst.o static.o feed_generator.o \
68         $(LIBOBJS)
69         echo LD: webcit
70         $(CC) $(LDFLAGS) -o webcit $(LIBOBJS) \
71         webserver.o context_loop.o cookie_conversion.o marchlist.o \
72         webcit.o auth.o tcp_sockets.o mainmenu.o serv_func.o who.o listsub.o \
73         roomops.o roomlist.o roomtokens.o roomviews.o \
74         messages.o msg_renderers.o paging.o sysmsgs.o \
75         blogview_renderer.o jsonview_renderer.o mailview_renderer.o bbsview_renderer.o \
76         useredit.o locate_host.o siteconfig.o subst.o vcard_edit.o roomchat.o \
77         graphics.o netconf.o preferences.o html2html.o openid.o \
78         summary.o calendar.o calendar_tools.o calendar_view.o tasks.o event.o wiki.o \
79         availability.o ical_dezonify.o iconbar.o icontheme.o crypto.o inetconf.o notes.o \
80         dav_main.o dav_get.o dav_propfind.o dav_report.o dav_delete.o \
81         dav_options.o autocompletion.o tabs.o smtpqueue.o sieve.o sitemap.o \
82         dav_put.o http_datestring.o fmt_date.o modules_init.o \
83         gettext.o downloads.o addressbook_popup.o pushemail.o sysdep.o decode.o \
84         paramhandling.o utils.o ical_maps.o ical_subst.o static.o feed_generator.o \
85         $(LIBS)
86
87 ical_maps.c: scripts/get_ical_data.sh
88         sh scripts/get_ical_data.sh
89
90 %.o: %.c ${HEADERS}
91         echo "CC $<"
92         $(CC) $(CFLAGS) $(DEFS) $(PTHREAD_DEFS) -c -o $@ $<
93
94 %.o: %.cpp ${HEADERS}
95         echo "CC+ $<"
96         $(CC) $(CFLAGS) $(DEFS) $(PTHREAD_DEFS) -c -o $@ $<
97
98 Makefile: $(srcdir)/Makefile.in config.status
99         CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status
100
101 config.status: $(srcdir)/configure
102         $(SHELL) ./config.status --recheck
103
104 $(srcdir)/configure: $(srcdir)/configure.ac $(srcdir)/aclocal.m4
105         cd $(srcdir) && $(AUTOCONF)
106
107 $(srcdir)/aclocal.m4: $(srcdir)/acinclude.m4
108         cd $(srcdir) && $(ACLOCAL)
109
110 install:  install-bin install-setupbin install-wwwdata install-tinymce install-locale install-cfg
111
112 install-bin:
113         test -d $(DESTDIR)$(prefix) || mkdir -p $(DESTDIR)$(prefix)
114         $(INSTALL) webcit $(DESTDIR)$(prefix)/webcit
115         if test -f $(DESTDIR)$(prefix)/webserver; then \
116                 rm -f $(DESTDIR)$(prefix)/webserver; \
117                 ln -s $(DESTDIR)$(prefix)/webcit $(DESTDIR)$(prefix)/webserver; \
118         fi
119
120 install-cfg:
121         test -d $(DESTDIR)$(ETCDIR) || mkdir -p $(DESTDIR)$(ETCDIR)
122         $(INSTALL) nogz-mimetypes.txt $(DESTDIR)/$(ETCDIR)/nogz-mimetypes.txt
123
124 install-setupbin: install-bin
125         $(INSTALL) setup $(DESTDIR)$(prefix)/setup
126
127
128 install-wwwdata:
129         test -d $(DESTDIR)$(WWWDIR)/static.local/t || mkdir -p $(DESTDIR)$(WWWDIR)/static.local/t
130         test -d $(DESTDIR)$(WWWDIR)/static/t || mkdir -p $(DESTDIR)$(WWWDIR)/static/t
131         for i in `find static -type d | grep -v .svn` \
132                 ; do \
133                 test -d $(DESTDIR)$(WWWDIR)/$$i || mkdir -p $(DESTDIR)$(WWWDIR)/$$i; \
134         done
135         for i in `find static -type f | grep -v .svn`; do \
136                 $(INSTALL) $$i $(DESTDIR)$(WWWDIR)/$$i; \
137         done
138
139 install-tinymce:
140         test -d $(DESTDIR)$(WWWDIR)/static || mkdir -p $(DESTDIR)$(WWWDIR)/static
141         for i in `find tiny_mce -type d | grep -v .svn` \
142                 ; do \
143                 test -d $(DESTDIR)$(WWWDIR)/$$i || mkdir -p $(DESTDIR)$(WWWDIR)/$$i; \
144         done
145         for i in \
146                 `find tiny_mce -type f | grep -v .svn` \
147                 ; do \
148                 $(INSTALL) $$i $(DESTDIR)$(WWWDIR)/$$i; \
149         done
150
151 install-locale:
152         cd po/webcit/; $(MAKE)
153         for i in `find locale -type d | grep -v .svn` \
154                 ; do \
155                 test -d $(DESTDIR)$(LOCALEDIR)/$$i || mkdir -p $(DESTDIR)$(LOCALEDIR)/$$i; \
156         done
157         for i in `find locale -type f | grep -v .svn`; do \
158                 $(INSTALL) $$i $(DESTDIR)$(LOCALEDIR)/$$i; \
159         done
160
161 TAGS clean-recursive distclean-recursive depend-recursive check-recursive \
162   mostlyclean-recursive realclean-recursive:
163         @for subdir in $(SUBDIRS); do \
164           if test -d $$subdir ; then \
165             target=`echo $@|$(SED) 's/-recursive//'`; \
166             echo making $$target in $$subdir; \
167             (cd $$subdir && $(MAKE) $$target) || exit 1; \
168           fi ; \
169         done
170
171 all-progs-recursive install-progs-recursive install-strip-progs-recursive  \
172         uninstall-progs-recursive:
173 #       @for subdir in $(PROG_SUBDIRS); do \
174 #         if test -d $$subdir ; then \
175 #           target=`echo $@|$(SED) 's/-progs-recursive//'`; \
176 #           echo making $$target in $$subdir; \
177 #           (cd $$subdir && $(MAKE) $$target) || exit 1; \
178 #         fi ; \
179 #       done
180
181 all-libs-recursive install-libs-recursive install-strip-libs-recursive \
182   uninstall-libs-recursive install-shlibs-libs-recursive \
183   install-shlibs-strip-libs-recursive uninstall-shlibs-libs-recursive:
184 #       @for subdir in $(LIB_SUBDIRS); do \
185 #         if test -d $$subdir ; then \
186 #           target=`echo $@|$(SED) 's/-libs-recursive//'`; \
187 #           echo making $$target in $$subdir; \
188 #           (cd $$subdir && $(MAKE) $$target) || exit 1; \
189 #         fi ; \
190 #       done
191