Skip to content

Commit

Permalink
Print out CFLAGS, etc. in version.c
Browse files Browse the repository at this point in the history
Since version.c is built in 3 places, just add the SRC_CFLAGS
definitions in 3 places.  It's easier than trying to hack the
build system to set the flags for version.c only once.
  • Loading branch information
alandekok committed Nov 3, 2015
1 parent 2cdc644 commit ea0b6a7
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/libfreeradius-server.mk
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@ SOURCES := conffile.c \
TGT_LDLIBS := $(OPENSSL_LIBS) $(GPERFTOOLS_FLAGS) $(GPERFTOOLS_LIBS)

TGT_PREREQS := libfreeradius-radius.la

ifneq ($(MAKECMDGOALS),scan)
SRC_CFLAGS += -DBUILT_WITH_CPPFLAGS=\"$(CPPFLAGS)\" -DBUILT_WITH_CFLAGS=\"$(CFLAGS)\" -DBUILT_WITH_LDFLAGS=\"$(LDFLAGS)\" -DBUILT_WITH_LIBS=\"$(LIBS)\"
endif
4 changes: 4 additions & 0 deletions src/main/unittest.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,7 @@ TGT_PREREQS := libfreeradius-server.a libfreeradius-radius.a
ifneq "$(filter rlm_eap_%,${ALL_TGTS})" ""
TGT_PREREQS += libfreeradius-eap.a
endif

ifneq ($(MAKECMDGOALS),scan)
SRC_CFLAGS += -DBUILT_WITH_CPPFLAGS=\"$(CPPFLAGS)\" -DBUILT_WITH_CFLAGS=\"$(CFLAGS)\" -DBUILT_WITH_LDFLAGS=\"$(LDFLAGS)\" -DBUILT_WITH_LIBS=\"$(LIBS)\"
endif
1 change: 1 addition & 0 deletions src/main/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,7 @@ void version_print(void)
#ifdef BUILT_WITH_LIBS
DEBUG2(" libs : " BUILT_WITH_LIBS);
#endif
DEBUG2(" ");
}
INFO("Copyright (C) 1999-2015 The FreeRADIUS server project and contributors");
INFO("There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A");
Expand Down
5 changes: 5 additions & 0 deletions src/modules/rlm_eap/radeapclient.mk
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,9 @@ endif

SRC_CFLAGS += -DWITH_EAPCLIENT
SRC_INCDIRS := ${top_srcdir}/src/modules/rlm_eap/libeap

ifneq ($(MAKECMDGOALS),scan)
SRC_CFLAGS += -DBUILT_WITH_CPPFLAGS=\"$(CPPFLAGS)\" -DBUILT_WITH_CFLAGS=\"$(CFLAGS)\" -DBUILT_WITH_LDFLAGS=\"$(LDFLAGS)\" -DBUILT_WITH_LIBS=\"$(LIBS)\"
endif

endif

0 comments on commit ea0b6a7

Please sign in to comment.