The dictionaries should be publiuc accessible.
[freeradius.git] / Makefile
1 #
2 # Makefile
3 #
4 #               NOTE: This top-level Makefile must not
5 #               use GNU-make extensions. The lower ones can.
6 #
7 # Version:      $Id$
8 #
9
10 include Make.inc
11
12 .PHONY: all clean install
13
14 SUBDIRS         = ${LIBLTDLPATH} src raddb scripts doc
15 WHAT_TO_MAKE    = all
16
17 all:
18         @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common
19
20 clean:
21         @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common
22         @rm -f *~
23
24 install:
25         $(INSTALL) -d -m 755    $(R)$(sbindir)
26         $(INSTALL) -d -m 755    $(R)$(bindir)
27         $(INSTALL) -d -m 755    $(R)$(raddbdir)
28         $(INSTALL) -d -m 755    $(R)$(mandir)
29         $(INSTALL) -d -m 755    $(R)$(RUNDIR)
30         $(INSTALL) -d -m 700    $(R)$(logdir)
31         $(INSTALL) -d -m 700    $(R)$(radacctdir)
32         $(INSTALL) -d -m 700    $(R)$(datadir)
33         $(INSTALL) -d -m 755    $(R)$(dictdir)
34         @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common
35         for i in 1 5 8; do \
36                 $(INSTALL) -d -m 755    $(R)$(mandir)/man$$i; \
37                 for p in man/man$$i/*.$$i; do \
38                         $(INSTALL) -m 644 $$p $(R)$(mandir)/man$$i; \
39                 done \
40         done
41         @echo "Installing dictionary files in $(R)$(dictdir)"; \
42         cd share; \
43         for i in dictionary*; do \
44                 $(INSTALL) -m 644 $$i $(R)$(dictdir); \
45         done; \
46
47 common:
48         @for dir in $(SUBDIRS); do \
49                 echo "Making $(WHAT_TO_MAKE) in $$dir..."; \
50                 (cd $$dir && $(MAKE) $(MFLAGS) $(WHAT_TO_MAKE)) || exit 1;\
51         done
52
53 distclean: clean
54         rm -f config.cache config.log config.status libtool \
55                 src/include/radpaths.h src/include/stamp-h \
56                 libltdl/config.log libltdl/config.status \
57                 libltdl/libtool
58         -find . ! -name configure.in -name \*.in -print | \
59                 sed 's/\.in$$//' | \
60                 while read file; do rm -f $$file; done
61         -find src/modules -name config.mak | \
62                 while read file; do rm -f $$file; done
63         -find src/modules -name config.h | \
64                 while read file; do rm -f $$file; done
65
66 ######################################################################
67 #
68 #  Automatic remaking rules suggested by info:autoconf#Automatic_Remaking
69 #
70 ######################################################################
71 reconfig: configure src/include/autoconf.h.in
72
73 configure: configure.in aclocal.m4
74         $(AUTOCONF)
75
76 # autoheader might not change autoconf.h.in, so touch a stamp file
77 src/include/autoconf.h.in: src/include/stamp-h.in acconfig.h
78 src/include/stamp-h.in: configure.in acconfig.h
79         $(AUTOHEADER)
80         echo timestamp > src/include/stamp-h.in
81
82 src/include/autoconf.h: src/include/stamp-h
83 src/include/stamp-h: src/include/autoconf.h.in config.status
84         ./config.status
85
86 config.status: configure
87         ./config.status --recheck
88
89 configure.in: