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