]> pd.if.org Git - uuid/blob - Makefile
Initial commit
[uuid] / Makefile
1 # Makefile for uuid library
2 # written by nathan wagner and placed in the public domain
3
4 OBJ     = md5.o sha1.o rng.o internal.o
5 CC=gcc
6
7 # set the following for windows
8 #LDFLAGS += -liphlpapi
9
10 all:    uuidgen
11
12 windows:        libpduuid.a uuidgen.o
13         gcc $(CFLAGS) -Wall -L. -o $@ uuidgen.o -lpduuid $(LDFLAGS) -liphlpapi
14
15 libpduuid.a:    $(OBJ)
16         ar rcuv $@ $+
17         ranlib $@
18
19 md5.o:  md5.c
20         gcc $(CFLAGS) -Wall -fPIC -DLTC_SMALL_CODE -c -o $@ $+
21
22 sha1.o: sha1.c
23         gcc $(CFLAGS) -Wall -fPIC -DLTC_SMALL_CODE -c -o $@ $+
24
25 rng.o:  rng.c
26         gcc $(CFLAGS) -Wall -fPIC -c -o $@ $+
27
28 internal.o:     internal.c
29         gcc $(CFLAGS) -Wall -fPIC -c -o $@ $+
30
31 uuidgen:        libpduuid.a uuidgen.o
32         gcc $(CFLAGS) -Wall -L. -o $@ uuidgen.o -lpduuid $(LDFLAGS)
33
34 clean:
35         rm -f *.o *.a uuidgen postgres/*.o postgres/*.so