# 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
- $(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: all
- $(MKDIR) $(libdir) $(includedir) $(mandir) $(bindir)
+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)
+ $(MKDIR) $(libdir) $(includedir)
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 >> $@