Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 210 lines (179 sloc) 6.649 kB
e9afde3 Initial revision
aland authored
1 #
5efe513 Changed comments calling the code Cistron to FreeRADIUS. Corrected some
cmiller authored
2 # Makefile
e9afde3 Initial revision
aland authored
3 #
7dcb918 Hmm, how does this work? My changelog is in doc/ChangeLog
miquels authored
4 # NOTE: This top-level Makefile must not
5 # use GNU-make extensions. The lower ones can.
6 #
fa04309 Change a couple of Makefile.ins to plain Makefiles
miquels authored
7 # Version: $Id$
e9afde3 Initial revision
aland authored
8 #
9
fa04309 Change a couple of Makefile.ins to plain Makefiles
miquels authored
10 include Make.inc
e9afde3 Initial revision
aland authored
11
2f4a78b Mark some targets as phony, so that case-insensitive systems
aland authored
12 .PHONY: all clean install
13
812aa2a @alandekok Added wildcard to sub-dirs
alandekok authored
14 SUBDIRS = $(LTDL_SUBDIRS) $(wildcard src raddb scripts doc)
e9afde3 Initial revision
aland authored
15 WHAT_TO_MAKE = all
16
1ba367f acconfig.h defines for ATTRIB_NMC and ASCEND_BINARY
aland authored
17 all:
e9afde3 Initial revision
aland authored
18 @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common
19
20 clean:
21 @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common
87ec198 moved HAVE_LIBDL definition to HAVE_DLOPEN. The substitution
aland authored
22 @rm -f *~
e9afde3 Initial revision
aland authored
23
5cbf670 Add top-level "tests" target
aland authored
24 .PHONY: tests
25 tests:
26 @$(MAKE) -C src/tests tests
27
f4aa388 Document $(R)
aland authored
28 #
29 # The $(R) is a magic variable not defined anywhere in this source.
30 # It's purpose is to allow an admin to create an installation 'tar'
31 # file *without* actually installing it. e.g.:
32 #
33 # $ R=/home/root/tmp make install
34 # $ cd /home/root/tmp
35 # $ tar -cf ~/freeradius-package.tar *
36 #
37 # The 'tar' file can then be un-tar'd on any similar machine. It's a
38 # cheap way of creating packages, without using a package manager.
39 # Many of the platform-specific packaging tools use the $(R) variable
40 # when creating their packages.
41 #
0c45f72 update libtool and libltdl to 1.5.22, and improve the integration
fcusack authored
42 # For compatibility with typical GNU packages (e.g. as seen in libltdl),
43 # we make sure DESTDIR is defined.
44 #
45 export DESTDIR := $(R)
e9afde3 Initial revision
aland authored
46 install:
f03bf93 Make the installation directories BEFORE recursing over
aland authored
47 $(INSTALL) -d -m 755 $(R)$(sbindir)
48 $(INSTALL) -d -m 755 $(R)$(bindir)
49 $(INSTALL) -d -m 755 $(R)$(raddbdir)
50 $(INSTALL) -d -m 755 $(R)$(mandir)
51 $(INSTALL) -d -m 755 $(R)$(RUNDIR)
52 $(INSTALL) -d -m 700 $(R)$(logdir)
53 $(INSTALL) -d -m 700 $(R)$(radacctdir)
ffe1c89 Add the first version of a request caching module. More information in
kkalev authored
54 $(INSTALL) -d -m 755 $(R)$(datadir)
e147ab7 The dictionaries should be publiuc accessible.
aland authored
55 $(INSTALL) -d -m 755 $(R)$(dictdir)
560065d added installation rules for the man pages
aland authored
56 for i in 1 5 8; do \
28a664f Applied patch from Chad Miller <cmiller@surfsouth.com>
aland authored
57 $(INSTALL) -d -m 755 $(R)$(mandir)/man$$i; \
a7b43a2 install each man page explicitely, due to bugs in the install-sh
aland authored
58 for p in man/man$$i/*.$$i; do \
59 $(INSTALL) -m 644 $$p $(R)$(mandir)/man$$i; \
60 done \
560065d added installation rules for the man pages
aland authored
61 done
92f91b2 Make common *after* creating man directories
aland authored
62 @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common
4a74954 Move the 'install' target for raddb from the top-level Makefile
aland authored
63 @echo "Installing dictionary files in $(R)$(dictdir)"; \
5d8c3ab Updated the install, config file, and config reader to look for
aland authored
64 cd share; \
eac19e6 added installation rules for files in the ./raddb directory,
aland authored
65 for i in dictionary*; do \
4a74954 Move the 'install' target for raddb from the top-level Makefile
aland authored
66 $(INSTALL) -m 644 $$i $(R)$(dictdir); \
15b7f83 Added libtool --finish, which is apparently needed...
aland authored
67 done
68 $(LIBTOOL) --finish $(R)$(libdir)
e9afde3 Initial revision
aland authored
69
ec5ba7e If RADMIN and RGROUP are defined, create new target,
aland authored
70 ifneq ($(RADMIN),)
71 ifneq ($(RGROUP),)
72 .PHONY: install-chown
73 install-chown:
74 chown -R $(RADMIN) $(R)$(raddbdir)
75 chgrp -R $(RGROUP) $(R)$(raddbdir)
76 chmod u=rwx,g=rx,o= `find $(R)$(raddbdir) -type d -print`
77 chmod u=rw,g=r,o= `find $(R)$(raddbdir) -type f -print`
78 chown -R $(RADMIN) $(R)$(logdir)
79 chgrp -R $(RGROUP) $(R)$(logdir)
a06a6ad chmod/chown RUNDIR, too
aland authored
80 find $(R)$(logdir) -type d -exec chmod u=rwx,g=rwx,o= {} \;
81 find $(R)$(logdir) -type d -exec chmod g+s {} \;
82 find $(R)$(logdir) -type f -exec chmod u=rw,g=rw,o= {} \;
3acebd1 $(RUNDIR) is owned by admin/radius, too
aland authored
83 chown -R $(RADMIN) $(R)$(RUNDIR)
84 chgrp -R $(RGROUP) $(R)$(RUNDIR)
a06a6ad chmod/chown RUNDIR, too
aland authored
85 find $(R)$(RUNDIR) -type d -exec chmod u=rwx,g=rwx,o= {} \;
86 find $(R)$(RUNDIR) -type d -exec chmod g+s {} \;
87 find $(R)$(RUNDIR) -type f -exec chmod u=rw,g=rw,o= {} \;
ec5ba7e If RADMIN and RGROUP are defined, create new target,
aland authored
88 endif
89 endif
90
0347cac @alandekok Move to using phony targets for subdirectories.
alandekok authored
91 .PHONY: common $(SUBDIRS)
92
93 common: $(SUBDIRS)
94
95 $(SUBDIRS):
219c85f @alandekok Made 'reconfig' target use PHONY subdirectories, too
alandekok authored
96 @echo "Making $(WHAT_TO_MAKE) in $@..."
97 @$(MAKE) $(MFLAGS) -C $@ $(WHAT_TO_MAKE)
e9afde3 Initial revision
aland authored
98
99 distclean: clean
9f73ce3 Patches from "Alan Curry" <pacman-radius@cqc.com>
aland authored
100 rm -f config.cache config.log config.status libtool \
101 src/include/radpaths.h src/include/stamp-h \
19617e2 updated 'distclean' for new location of libltdl
aland authored
102 libltdl/config.log libltdl/config.status \
103 libltdl/libtool
e9afde3 Initial revision
aland authored
104 -find . ! -name configure.in -name \*.in -print | \
105 sed 's/\.in$$//' | \
106 while read file; do rm -f $$file; done
eac19e6 added installation rules for files in the ./raddb directory,
aland authored
107 -find src/modules -name config.mak | \
108 while read file; do rm -f $$file; done
109 -find src/modules -name config.h | \
110 while read file; do rm -f $$file; done
e9afde3 Initial revision
aland authored
111
112 ######################################################################
113 #
114 # Automatic remaking rules suggested by info:autoconf#Automatic_Remaking
115 #
116 ######################################################################
fb9bc84 @alandekok Re-build more on reconfig
alandekok authored
117 .PHONY: reconfig
118 reconfig:
219c85f @alandekok Made 'reconfig' target use PHONY subdirectories, too
alandekok authored
119 @$(MAKE) $(MFLAGS) -C src reconfig
fb9bc84 @alandekok Re-build more on reconfig
alandekok authored
120 @$(MAKE) configure
d523554 @alandekok Fix typo in last commit
alandekok authored
121 @$(MAKE) src/include/autoconf.h.in
0bd515b we now type 'make reconfig' from the top directory
aland authored
122
dc56ffb make sure that 'configure' depends on the new 'aclocal.m4' file
aland authored
123 configure: configure.in aclocal.m4
aee4754 add checks for missing autoconf, autoheader, and aclocal.
aland authored
124 $(AUTOCONF)
e9afde3 Initial revision
aland authored
125
a72bb5c @alandekok Fix generation of autoheader, and re-build it
alandekok authored
126 .PHONY: src/include/autoconf.h.in
127 src/include/autoconf.h.in:
aee4754 add checks for missing autoconf, autoheader, and aclocal.
aland authored
128 $(AUTOHEADER)
e9afde3 Initial revision
aland authored
129
130 config.status: configure
131 ./config.status --recheck
1cd99e0 lots more changes to dynamic library stuff. This time, I've
aland authored
132
133 configure.in:
1ff80cc added "TAGS" target.
mcr authored
134
81df9c6 Perl script (hokey as heck) to minimize the number of includes
aland authored
135 .PHONY: check-includes
136 check-includes:
137 scripts/min-includes.pl `find . -name "*.c" -print`
138
1ff80cc added "TAGS" target.
mcr authored
139 TAGS:
140 etags `find src -type f -name '*.[ch]' -print`
74ef9b6 Added targets:
aland authored
141
3441f36 Add target to make test certificates
aland authored
142 #
143 # Make test certificates.
144 #
145 .PHONY: certs
146 certs:
147 @cd raddb/certs && $(MAKE)
148
74ef9b6 Added targets:
aland authored
149 ######################################################################
150 #
151 # Make a release.
152 #
153 # Note that "Make.inc" has to be updated with the release number
154 # BEFORE running this command!
155 #
156 ######################################################################
b4045dd @alandekok Build process uses git now, not CVS
alandekok authored
157 freeradius-server-$(RADIUSD_VERSION).tar.gz: .git
e68ab01 @alandekok Build from v2.1.x branch instead of stable
alandekok authored
158 git archive --format=tar --prefix=freeradius-server-$(RADIUSD_VERSION)/ v2.1.x | gzip > $@
74ef9b6 Added targets:
aland authored
159
160 freeradius-server-$(RADIUSD_VERSION).tar.gz.sig: freeradius-server-$(RADIUSD_VERSION).tar.gz
161 gpg --default-key aland@freeradius.org -b $<
162
b4045dd @alandekok Build process uses git now, not CVS
alandekok authored
163 freeradius-server-$(RADIUSD_VERSION).tar.bz2: .git
e68ab01 @alandekok Build from v2.1.x branch instead of stable
alandekok authored
164 git archive --format=tar --prefix=freeradius-server-$(RADIUSD_VERSION)/ v2.1.x | bzip2 > $@
74ef9b6 Added targets:
aland authored
165
166 freeradius-server-$(RADIUSD_VERSION).tar.bz2.sig: freeradius-server-$(RADIUSD_VERSION).tar.bz2
167 gpg --default-key aland@freeradius.org -b $<
168
169 # high-level targets
fb9afaf Update for 2.0.1-pre
aland authored
170 .PHONY: dist-check
171 dist-check: redhat/freeradius.spec suse/freeradius.spec debian/changelog
172 @if [ `grep ^Version: redhat/freeradius.spec | sed 's/.*://;s/ //'` != "$(RADIUSD_VERSION)" ]; then \
c00a276 @alandekok Automate more work
alandekok authored
173 cat redhat/freeradius.spec | sed 's/^Version: .*/Version: $(RADIUSD_VERSION)/' > redhat/.foo; \
174 mv redhat/.foo redhat/freeradius.spec; \
fb9afaf Update for 2.0.1-pre
aland authored
175 echo redhat/freeradius.spec 'Version' needs to be updated; \
176 exit 1; \
177 fi
178 @if [ `grep ^Version: suse/freeradius.spec | sed 's/.*://;s/ //'` != "$(RADIUSD_VERSION)" ]; then \
c00a276 @alandekok Automate more work
alandekok authored
179 cat suse/freeradius.spec | sed 's/^Version: .*/Version: $(RADIUSD_VERSION)/' > suse/.foo; \
180 mv suse/.foo suse/freeradius.spec; \
fb9afaf Update for 2.0.1-pre
aland authored
181 echo suse/freeradius.spec 'Version' needs to be updated; \
182 exit 1; \
183 fi
c939fc3 @alandekok Update checks for debian
alandekok authored
184 @if [ `head -n 1 debian/changelog | sed 's/.*(//;s/\+.*).*//;s/-1).*//;'` != "$(RADIUSD_VERSION)" ]; then \
fb9afaf Update for 2.0.1-pre
aland authored
185 echo debian/changelog needs to be updated; \
186 exit 1; \
187 fi
188
189 dist: dist-check freeradius-server-$(RADIUSD_VERSION).tar.gz freeradius-server-$(RADIUSD_VERSION).tar.bz2
74ef9b6 Added targets:
aland authored
190
191 dist-sign: freeradius-server-$(RADIUSD_VERSION).tar.gz.sig freeradius-server-$(RADIUSD_VERSION).tar.bz2.sig
192
fb9afaf Update for 2.0.1-pre
aland authored
193 dist-publish: freeradius-server-$(RADIUSD_VERSION).tar.gz.sig freeradius-server-$(RADIUSD_VERSION).tar.gz freeradius-server-$(RADIUSD_VERSION).tar.gz.sig freeradius-server-$(RADIUSD_VERSION).tar.bz2 freeradius-server-$(RADIUSD_VERSION).tar.gz.sig freeradius-server-$(RADIUSD_VERSION).tar.bz2.sig
2eab3c0 @alandekok tr.freeradius.org seems to be dead
alandekok authored
194 scp $^ freeradius.org@ftp.freeradius.org:public_ftp
195 # scp $^ freeradius.org@www.tr.freeradius.org:public_ftp
74ef9b6 Added targets:
aland authored
196
197 #
198 # Note that we do NOT do the tagging here! We just print out what
199 # to do!
200 #
201 dist-tag: freeradius-server-$(RADIUSD_VERSION).tar.gz freeradius-server-$(RADIUSD_VERSION).tar.bz2
b4045dd @alandekok Build process uses git now, not CVS
alandekok authored
202 @echo "git tag release_`echo $(RADIUSD_VERSION) | tr .- __`"
171b05d Added 'deb' target
aland authored
203
204 #
205 # Build a debian package
206 #
207 .PHONY: deb
208 deb:
209 fakeroot dpkg-buildpackage -b -uc
Something went wrong with that request. Please try again.