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
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
# libosl's versioning consists of three numbers. Let's call them x, y and z.
# The way x, y and z are interpreted depends on the OS.
x := 0
y := 1
# libosl's versioning consists of three numbers. Let's call them x, y and z.
# The way x, y and z are interpreted depends on the OS.
x := 0
y := 1
# The minor version number is an incremental number using the format
# X[.Y[.Z]]. To set the minor version number of a dynamic library, use
# the gcc -current_version option.
# The minor version number is an incremental number using the format
# X[.Y[.Z]]. To set the minor version number of a dynamic library, use
# the gcc -current_version option.
- $(CC) $(LDFLAGS) -o $@ $(objects) -lcrypto
+ $(CC) $(LDFLAGS) -o $@ $(objects)
+
+$(libname).sym: osl.h.in
+ sed -Ene '/^int|^const/{s/.*(osl_.*)\(.*/\1/; p;}' $< > $@
+$(libname).ga: $(objects)
+ $(LD) -r -o $@ $(objects)
+lib$(libname).a: $(libname).ga $(libname).sym
+ $(OBJCOPY) --keep-global-symbols $(libname).sym $(libname).ga $@
+install-bin: $(executables)
+ $(MKDIR) $(bindir)
+ $(INSTALL) -m 755 $(executables) $(bindir)
+
+install-man: $(man_pages)
+ $(MKDIR) $(mandir)
+ $(INSTALL) -m 644 $(man_pages) $(mandir)
+
+install-lib: $(realname) $(headers)
sed -e '/@README@/,$$d' web/index.html.in > $@
grutatxt -nb < README >> $@
sed -e '1,/@README@/d' -e '/@INSTALL@/,$$d' web/index.html.in >> $@
grutatxt -nb < INSTALL >> $@
sed -e '1,/@INSTALL@/d' -e '/@MAN_PAGE@/,$$d' web/index.html.in >> $@
sed -e '/@README@/,$$d' web/index.html.in > $@
grutatxt -nb < README >> $@
sed -e '1,/@README@/d' -e '/@INSTALL@/,$$d' web/index.html.in >> $@
grutatxt -nb < INSTALL >> $@
sed -e '1,/@INSTALL@/d' -e '/@MAN_PAGE@/,$$d' web/index.html.in >> $@