X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=Makefile;h=52d7b7d2826b1310b0663f5281403fcb4267a105;hb=2cf15043eba6ed7b16526145dcf6a2b563b9712d;hp=1b1c6bba02af5600f2e215779056ffb76be6294e;hpb=c7e13d717c38e528ae241bf5facb51bca63f323c;p=uuid diff --git a/Makefile b/Makefile index 1b1c6bb..52d7b7d 100644 --- a/Makefile +++ b/Makefile @@ -3,33 +3,43 @@ OBJ = md5.o sha1.o rng.o internal.o CC=gcc +CFLAGS=-Wall -I. -L. # set the following for windows #LDFLAGS += -liphlpapi -all: uuidgen +all: libpduuid.a uuidgen windows: libpduuid.a uuidgen.o - gcc $(CFLAGS) -Wall -L. -o $@ uuidgen.o -lpduuid $(LDFLAGS) -liphlpapi + $(CC) $(CFLAGS) -Wall -L. -o $@ uuidgen.o -lpduuid $(LDFLAGS) -liphlpapi libpduuid.a: $(OBJ) ar rcuv $@ $+ ranlib $@ +t/%.t: t/%.o t/ctap.o libpduuid.a + $(CC) $(CFLAGS) -Wall -I. -o $@ $< t/ctap.o -lpduuid + +test: t/md5.t t/sha1.t t/uuidgen.t libpduuid.a + prove t/*.t + md5.o: md5.c - gcc $(CFLAGS) -Wall -fPIC -DLTC_SMALL_CODE -c -o $@ $+ + $(CC) $(CFLAGS) -Wall -fPIC -DLTC_SMALL_CODE -c -o $@ $+ sha1.o: sha1.c - gcc $(CFLAGS) -Wall -fPIC -DLTC_SMALL_CODE -c -o $@ $+ + $(CC) $(CFLAGS) -Wall -fPIC -DLTC_SMALL_CODE -c -o $@ $+ rng.o: rng.c - gcc $(CFLAGS) -Wall -fPIC -c -o $@ $+ + $(CC) $(CFLAGS) -Wall -fPIC -c -o $@ $+ internal.o: internal.c - gcc $(CFLAGS) -Wall -fPIC -c -o $@ $+ + $(CC) $(CFLAGS) -Wall -fPIC -c -o $@ $+ + +uuidgen2: libpduuid.a uuidgen2.o + $(CC) $(CFLAGS) -Wall -L. -o $@ uuidgen2.o -lpduuid $(LDFLAGS) uuidgen: libpduuid.a uuidgen.o - gcc $(CFLAGS) -Wall -L. -o $@ uuidgen.o -lpduuid $(LDFLAGS) + $(CC) $(CFLAGS) -Wall -L. -o $@ uuidgen.o -lpduuid $(LDFLAGS) clean: rm -f *.o *.a uuidgen postgres/*.o postgres/*.so