X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=Makefile;h=348c3aa9903b248702df0b85443f6efa61de4517;hb=6c2a66816de51f195e4cae40406834f519768099;hp=1b1c6bba02af5600f2e215779056ffb76be6294e;hpb=c7e13d717c38e528ae241bf5facb51bca63f323c;p=uuid diff --git a/Makefile b/Makefile index 1b1c6bb..348c3aa 100644 --- a/Makefile +++ b/Makefile @@ -3,33 +3,40 @@ 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 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/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 $@ $+ 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