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