Include more header files in the default install
[freeradius.git] / src / include / Makefile
1 #
2 # Makefile
3 #
4 # Version:      $Id$
5 #
6
7 HEADERS = autoconf.h conf.h conffile.h detail.h dhcp.h event.h hash.h heap.h \
8         ident.h libradius.h md4.h md5.h missing.h modcall.h modules.h \
9         packet.h pool.h rad_assert.h radius.h radiusd.h radpaths.h \
10         radutmp.h realms.h sha1.h smodule.h stats.h sysutmp.h token.h \
11         udpfromto.h vmps.h vqp.h
12
13 include ../../Make.inc
14 .PHONY: all clean distclean install
15
16 all: radpaths.h
17
18 radpaths.h: build-radpaths-h
19         @/bin/sh ./build-radpaths-h
20
21 distclean:
22         rm -f radpaths.h
23
24 dict:
25         @mkdir dict
26         @for x in ../../share/dictionary*; do \
27                 ../../share/header.pl $$x > dict/`basename $$x`.h; \
28         done
29
30 dictionary.h: dict
31         @echo "#ifndef _FR_DICTIONARY_H" > $@
32         @echo "#define _FR_DICTIONARY_H" >> $@
33         @echo "#include <freeradius-devel/dict/dictionary.h>" >> $@
34         @echo "#endif" >> $@
35
36 clean:
37         @rm -rf dict
38
39 install:
40         $(INSTALL) -d -m 755 $(R)$(includedir)/freeradius
41         for i in $(HEADERS); do \
42                 sed 's/^#include <freeradius-devel/#include <freeradius/' $$i > .inst.$$$$ ; \
43                 $(INSTALL) -m 644 .inst.$$$$   $(R)$(includedir)/freeradius/$$i; \
44                 rm -f .inst.$$$$ ; \
45         done