- rm -f $(PREFIX)/bin/mdocterm
- rm -f $(PREFIX)/bin/mdoctree
- rm -f $(PREFIX)/bin/mdoclint
- rm -f $(PREFIX)/man/man1/mdocterm.1
- rm -f $(PREFIX)/man/man1/mdoctree.1
- rm -f $(PREFIX)/man/man1/mdoclint.1
- rm -f $(PREFIX)/man/man3/mdoc.3
- rm -f $(PREFIX)/lib/libmdoc.a
- rm -f $(PREFIX)/include/mdoc.h
+ rm -f $(BINDIR)/mdocterm
+ rm -f $(BINDIR)/mdoctree
+ rm -f $(BINDIR)/mdoclint
+ rm -f $(MANDIR)/man1/mdocterm.1
+ rm -f $(MANDIR)/man1/mdoctree.1
+ rm -f $(MANDIR)/man1/mdoclint.1
+ rm -f $(MANDIR)/man3/mdoc.3
+ rm -f $(LIBDIR)/libmdoc.a
+ rm -f $(INCLUDEDIR)/mdoc.h
+
+lib.ln: lib.c private.h
+lib.o: lib.c private.h
+
+att.ln: att.c private.h
+att.o: att.c private.h
+
+arch.ln: arch.c private.h
+arch.o: arch.c private.h
+
+vol.ln: vol.c private.h
+vol.o: vol.c private.h
+
+msec.ln: msec.c private.h
+msec.o: msec.c private.h
+
+st.ln: st.c private.h
+st.o: st.c private.h
+
+lib.c: lib.in strings.sh
+ sh strings.sh -o $@ lib lib.in
+
+st.c: st.in strings.sh
+ sh strings.sh -o $@ st st.in
+
+msec.c: msec.in strings.sh
+ sh strings.sh -o $@ msec msec.in
+
+att.c: att.in strings.sh
+ sh strings.sh -o $@ att att.in
+
+arch.c: arch.in strings.sh
+ sh strings.sh -o $@ arch arch.in
+
+vol.c: vol.in strings.sh
+ sh strings.sh -o $@ vol vol.in