X-Git-Url: https://pd.if.org/git/?p=uuid;a=blobdiff_plain;f=Makefile;h=4814ee0dad4183bcc7a070683eeec34924ec0653;hp=1b1c6bba02af5600f2e215779056ffb76be6294e;hb=HEAD;hpb=c7e13d717c38e528ae241bf5facb51bca63f323c diff --git a/Makefile b/Makefile index 1b1c6bb..4814ee0 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) +uuidgen: libpduuid.a uuidgen.o warn.o + $(CC) $(CFLAGS) -Wall -L. -o $@ uuidgen.o warn.o -lpduuid $(LDFLAGS) clean: rm -f *.o *.a uuidgen postgres/*.o postgres/*.so