1 # Make sure you include -DHAVE_SNPRINTF in CFLAGS if your system
4 # If you need (long long int) support and you sprintf supports it,
5 # define -DSNPRINTF_LONGLONG_SUPPORT
9 CFLAGS = -DPREFER_PORTABLE_SNPRINTF -O3 \
10 -Wall -Wpointer-arith -Wwrite-strings \
11 -Wcast-qual -Wcast-align -Waggregate-return \
12 -Wmissing-prototypes -Wmissing-declarations \
13 -Wshadow -Wstrict-prototypes
15 # -DNEED_ASPRINTF -DNEED_ASNPRINTF -DNEED_VASPRINTF -DNEED_VASNPRINTF
16 # -DNEED_SNPRINTF_ONLY
18 # Digital Unix: native compiler usually produces better code than gcc
20 #CFLAGS = -DPREFER_PORTABLE_SNPRINTF -O4 -std1 -arch host
22 # Recommend to leave COMPATIBILITY empty for normal use.
23 # Should be set for bug compatibility when running tests
24 # too keep them less chatty.
27 #COMPATIBILITY = -DSOLARIS_BUG_COMPATIBLE
28 #COMPATIBILITY = -DHPUX_BUG_COMPATIBLE
29 #COMPATIBILITY = -DDIGITAL_UNIX_BUG_COMPATIBLE
30 #COMPATIBILITY = -DPERL_BUG_COMPATIBLE
31 #COMPATIBILITY = -DLINUX_COMPATIBLE
35 $(CC) $(CFLAGS) $(COMPATIBILITY) -c $*.c
37 all:snprintf.o Makefile
39 test::snprintf.o test.c Makefile
40 $(CC) $(CFLAGS) $(COMPATIBILITY) snprintf.o -o $@ test.c
43 /usr/bin/rm -f *.o test core