Commit 4d8eaf1d authored by Alessandro Rubini's avatar Alessandro Rubini

mprintf: make it a config item, always selected

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent f2145e24
mainmenu "WR PTP Core software configuration"
config MPRINTF
boolean
default y
config ETHERBONE
boolean "Compile Etherbone support in wrpc-sw"
help
......
......@@ -20,6 +20,8 @@ obj-y += wrc_main.o wrc_ptp.o monitor/monitor.o
cflags-y = -include $(CURDIR)/include/generated/autoconf.h \
-Iinclude -I.
cflags-$(CONFIG_PP_PRINTF) += -I $(CURDIR)/pp_printf
cflags-$(CONFIG_PTP_NOPOSIX) += \
-ffreestanding \
-DPTPD_FREESTANDING \
......
......@@ -7,8 +7,15 @@
* one function and doesn't deserve an header of its own.
* Also, this brings in very common and needed headers
*/
#ifdef CONFIG_MPRINTF
int mprintf(char const *format, ...)
__attribute__((format(printf,1,2)));
#else
#include <pp-printf.h>
#define mprintf pp_printf
#define vprintf pp_vprintf
#define sprintf pp_sprintf
#endif
void wrc_mon_gui(void);
void shell_init(void);
......
obj-y += lib/mprintf.o lib/util.o
obj-$(CONFIG_MPRINTF) += lib/mprintf.o
obj-y += lib/util.o
obj-$(CONFIG_ETHERBONE) += lib/arp.o lib/icmp.o lib/ipv4.o lib/bootp.o
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment