-default: libpvector.a
+default: libpvector.a
+
+all: default example-hashvector example-pvector
#.INTERMEDIATE: pvector.o
pvector.o: CFLAGS = -Wall -g
pvector.o: pvector.c | pvector.h
+CLEANRM += pvector.o
+
+#.INTERMEDIATE: qvector.o
+qvector.o: CFLAGS = -Wall -g
+qvector.o: qvector.c | qvector.h
+CLEANRM += qvector.o
-libpvector.a: pvector.o
+#.INTERMEDIATE: hashvector.o
+hashvector.o: CFLAGS = -Wall -g
+hashvector.o: hashvector.c | pvector.h hashvector.h
+
+libpvector.a: pvector.o qvector.o hashvector.o
$(AR) r $@ $^
CLEANRM += libpvector.a
example-pvector: CFLAGS = -Wall -g
example-pvector: LDLIBS = libpvector.a
example-pvector: example-pvector.o libpvector.a
-CLEANRM += example-pvector
+CLEANRM += example-pvector example-pvector.o
+
+#.INTERMEDIATE: example-hashvector.o
+example-hashvector: CFLAGS = -Wall -g ${TEST}
+example-hashvector: LDLIBS = libpvector.a
+example-hashvector: example-hashvector.o libpvector.a
+CLEANRM += example-hashvector example-hashvector.o
clean:
rm -f $(CLEANRM)