snprintf_2.2/Makefile.unused

Tue, 17 Oct 2006 00:32:05 +0200

author
Tuomo Valkonen <tuomov@iki.fi>
date
Tue, 17 Oct 2006 00:32:05 +0200
changeset 103
76174c5f04b5
parent 35
5a71d53d0228
permissions
-rw-r--r--

Path fix

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

mercurial