mandir := $(PREFIX)/man/man1
objects := osl.o util.o rbtree.o sha1.o
-fsck_objects := fsck.fsck.o osl.fsck.o util.fsck.o rbtree.fsck.o sha1.fsck.o fsck.cmdline.o
+fsck_objects := fsck.o osl.o util.o rbtree.o sha1.o fsck.cmdline.o
headers := osl.h
executables := oslfsck
man_pages := oslfsck.1
# The way x, y and z are interpreted depends on the OS.
x := 0
y := 1
-z := 2
+z := 3
VERSION := $(x).$(y).$(z)
# common flags
+CPPFLAGS += -DVERSION='"$(VERSION)"'
+
CFLAGS += -Wno-sign-compare -g -Wunused -Wundef -W
CFLAGS += -Wredundant-decls
CFLAGS += -Os
-include Makefile.deps
fsck.cmdline.o: fsck.cmdline.c fsck.cmdline.h
- $(CC) -c -DVERSION='"$(VERSION)"' $<
-
-%.fsck.o: %.c Makefile fsck.cmdline.c fsck.cmdline.h osl.h errtab.h
- $(CC) -c -DVERSION='"$(VERSION)"' $(CPPFLAGS) $(CFLAGS) $< -o $@
+ $(CC) $(CPPFLAGS) -c $<
%.o: %.c Makefile errtab.h
$(CC) -c $(CPPFLAGS) $(CFLAGS) $(LIBCFLAGS) $<
web/index.html: oslfsck.1 web/index.html.in INSTALL README
sed -e '/@README@/,$$d' web/index.html.in > $@
- grutatxt -nb < README >> $@
+ markdown < README >> $@
sed -e '1,/@README@/d' -e '/@INSTALL@/,$$d' web/index.html.in >> $@
- grutatxt -nb < INSTALL >> $@
+ markdown < INSTALL >> $@
sed -e '1,/@INSTALL@/d' -e '/@MAN_PAGE@/,$$d' web/index.html.in >> $@
groff -m man -Thtml -P -l oslfsck.1 | sed -e '1,/^<body>/d; /^<\/body>/,$$d' >> $@
sed -e '1,/@MAN_PAGE@/d' web/index.html.in >> $@