#
ifeq "${CPP_MAKEDEPEND}" "yes"
define ADD_OBJECT_RULE
-$${BUILD_DIR}/objs/%.${OBJ_EXT} $${BUILD_DIR}/objs/%.d: ${1} ${JLIBTOOL}
+$${BUILD_DIR}/objs/%.${OBJ_EXT} $${BUILD_DIR}/objs/%.d: ${1} | ${BOOTSTRAP_BUILD}
${2}
$${CPP} $${CPPFLAGS} $$(addprefix -I,$${SRC_INCDIRS}) $${SRC_DEFS} $$< | sed \
-n 's,^\# *[0-9][0-9]* *"\([^"]*\)".*,$$@: \1,p' > $${BUILD_DIR}/objs/$$*.d
else
define ADD_OBJECT_RULE
-$${BUILD_DIR}/objs/%.${OBJ_EXT} $${BUILD_DIR}/objs/%.d: ${1} ${JLIBTOOL}
+$${BUILD_DIR}/objs/%.${OBJ_EXT} $${BUILD_DIR}/objs/%.d: ${1} | ${BOOTSTRAP_BUILD}
${2}
${FILTER_DEPENDS}
endef
endif
define ADD_ANALYZE_RULE
-$${BUILD_DIR}/plist/%.plist: ${1} ${JLIBTOOL}
+$${BUILD_DIR}/plist/%.plist: ${1}
${2}
endef
# Define compilers and linkers
#
+BOOTSTRAP_BUILD =
COMPILE.c = ${CC}
COMPILE.cxx = ${CXX}
CPP = cc -E
# Version: $Id$
#
+#
+# Build dynamic headers by substituting various values from autoconf.h, these
+# get installed with the library files, so external programs can tell what
+# the server library was built with.
+#
+# The RFC headers are dynamic, too.
+#
+# The rest of the headers are static.
+#
+
+HEADERS_DY = attributes.h features.h radpaths.h tls.h
+
HEADERS = \
- attributes.h \
build.h \
conf.h \
conffile.h \
detail.h \
event.h \
- features.h \
hash.h \
heap.h \
libradius.h \
md4.h \
md5.h \
- missing.h \
modcall.h \
modules.h \
packet.h \
rad_assert.h \
radius.h \
radiusd.h \
- radpaths.h \
radutmp.h \
realms.h \
sha1.h \
token.h \
udpfromto.h \
base64.h \
- map.h
-
-#
-# Build dynamic headers by substituting various values from autoconf.h, these
-# get installed with the library files, so external programs can tell what
-# the server library was built with.
-#
-
-HEADERS_DY = src/include/features.h src/include/missing.h src/include/tls.h \
- src/include/radpaths.h src/include/attributes.h
+ map.h \
+ $(HEADERS_DY)
#
# Solaris awk doesn't recognise [[:blank:]] hence [\t ]
RFC_DICTS := $(filter-out %~,$(wildcard share/dictionary.rfc*))
RFC_HEADERS := $(patsubst share/dictionary.%,src/include/%.h,$(RFC_DICTS))
+HEADERS += $(notdir ${RFC_HEADERS})
src/include/attributes.h: share/dictionary.freeradius.internal
@$(ECHO) HEADER $@
@$(ECHO) HEADER $@
@grep ^ATTRIBUTE $< | awk '{print "PW_"$$2 " " $$3 " //!< AUTOGENERATED ATTRIBUTE DEFINITION"}' | tr '[:lower:]' '[:upper:]' | tr -- - _ | sed 's/^/#define /' > $@
-src/include/radius.h: | src/include/attributes.h $(RFC_HEADERS) src/include/vqp.h
-
-#
-# So the headers are created before we compile anything
-#
-$(JLIBTOOL): src/include/radius.h
-
-src/freeradius-devel/features.h: src/include/features.h src/freeradius-devel
-
#
# Build features.h by copying over WITH_* and RADIUSD_VERSION_*
# preprocessor macros from autoconf.h
@grep "^#define[ ]*WITH_" src/include/autoconf.h >> $@
@grep "^#define[ ]*RADIUSD_VERSION" src/include/autoconf.h >> $@
-src/freeradius-devel/missing.h: src/include/missing.h src/freeradius-devel
-
#
# Use the SED script we built earlier to make permanent substitutions
# of definitions in missing-h to build missing.h
@$(ECHO) HEADER $@
@sed -f src/include/autoconf.sed < $< > $@
-src/freeradius-devel/tls.h: src/include/tls.h src/freeradius-devel
-
src/include/tls.h: src/include/tls-h src/include/autoconf.sed
@$(ECHO) HEADER $@
@sed -f src/include/autoconf.sed < $< > $@
-src/freeradius-devel/radpaths.h: src/include/radpaths.h src/freeradius-devel
-
src/include/radpaths.h: src/include/build-radpaths-h
@$(ECHO) HEADER $@
@cd src/include && /bin/sh build-radpaths-h
-${BUILD_DIR}/make/jlibtool: $(HEADERS_DY)
+#
+# Create the soft link for the fake include file path.
+#
+src/freeradius-devel:
+ @[ -e $@ ] || ln -s include $@
+
+#
+# Ensure we set up the build environment
+#
+BOOTSTRAP_BUILD += src/freeradius-devel $(addprefix src/include/,$(HEADERS_DY))
######################################################################
#
#
.PHONY: clean.src.include distclean.src.include
clean.src.include:
- @rm -f $(HEADERS_DY)
+ @rm -f $(addprefix src/include/,$(HEADERS_DY))
clean: clean.src.include