3 include Makefile.release
5 # Smash together user's values with our extra values
6 FINAL_CFLAGS = -DFIPS_VERSION=$(VERSION) $(CFLAGS) $(WARN_CFLAGS) $(CONFIGURE_CFLAGS) $(extra_cflags)
7 FINAL_FIPS_LDFLAGS = $(LDFLAGS) $(AS_NEEDED_LDFLAGS) $(TALLOC_LDFLAGS)
9 ifneq ($(LINKER_RESOLVES_LIBRARY_DEPENDENCIES),1)
10 FINAL_FIPS_LDFLAGS += $(CONFIGURE_LDFLAGS)
12 ifeq ($(LIBDIR_IN_LDCONFIG),0)
13 FINAL_FIPS_LDFLAGS += $(RPATH_LDFLAGS)
18 ifeq ($(MAKECMDGOALS),)
19 ifeq ($(shell cat .first-build-message 2>/dev/null),)
20 @FIPS_FIRST_BUILD=1 $(MAKE) --no-print-directory all
22 @echo "Compilation of fips is now complete. You can install fips with:"
26 @echo "Note that depending on the prefix to which you are installing"
27 @echo "you may need root permission (such as \"sudo make install\")."
28 @echo "See \"./configure --help\" for help on setting an alternate prefix."
29 @echo Printed > .first-build-message
35 @echo "FIXME: Should consider adding a test suite here."
37 # The user has not set any verbosity, default to quiet mode and inform the
38 # user how to enable verbose compiles.
40 quiet_DOC := "Use \"$(MAKE) V=1\" to see the verbose compile lines.\n"
41 quiet = @printf $(quiet_DOC)$(eval quiet_DOC:=)"$1 $@\n"; $($(shell echo $1 | sed -e s'/ .*//'))
43 # The user has explicitly enabled quiet compilation.
45 quiet = @printf "$1 $@\n"; $($(shell echo $1 | sed -e s'/ .*//'))
47 # Otherwise, print the full command line.
48 quiet ?= $($(shell echo $1 | sed -e s'/ .*//'))
50 %.o: %.c $(global_deps)
52 $(call quiet,CC $(CFLAGS)) -c $(FINAL_CFLAGS) $< -o $@ -MD -MP -MF .deps/$*.d
56 rm -rf $(CLEAN); rm -rf .deps
65 fips_modules = $(fips_srcs:.c=.o)
68 $(call quiet,$(FINAL_FIPS_LINKER) $(CFLAGS)) $^ $(FINAL_FIPS_LDFLAGS) -o $@
72 mkdir -p $(DESTDIR)$(prefix)/bin/
73 install fips $(DESTDIR)$(prefix)/bin/fips
74 ifeq ($(MAKECMDGOALS), install)
76 @echo "Fips is now installed to $(DESTDIR)$(prefix)"
80 SRCS := $(SRCS) $(fips_srcs)
81 CLEAN := $(CLEAN) fips $(fips_modules)
83 DISTCLEAN := $(DISTCLEAN) .first-build-message Makefile.config
85 DEPS := $(SRCS:%.c=.deps/%.d)
86 DEPS := $(DEPS:%.cc=.deps/%.d)