Skip to content
Snippets Groups Projects
Commit 0a0a61f3 authored by Niels Möller's avatar Niels Möller
Browse files

Fixed assembler rules, and shared libraries.

Rev: src/nettle/Makefile.am:1.43
parent 7f3dec63
No related branches found
No related tags found
No related merge requests found
SUBDIRS = . testsuite examples SUBDIRS = . testsuite examples
SHLIBFORLINK = @SHLIBFORLINK@
SHLIBSONAME = @SHLIBSONAME@
SHLIBFILE = @SHLIBFILE@
SHLIBCFLAGS = @SHLIBCFLAGS@
SHLIBLINK = @SHLIBLINK@
SHLIBTARGET = @SHLIBTARGET@
SHLIBINSTALL = @SHLIBINSTALL@
noinst_PROGRAMS = aesdata desdata shadata noinst_PROGRAMS = aesdata desdata shadata
libnettleincludedir = $(includedir)/nettle libnettleincludedir = $(includedir)/nettle
...@@ -76,29 +67,36 @@ SUFFIXES = .asm ...@@ -76,29 +67,36 @@ SUFFIXES = .asm
RM_TMP = rm -f RM_TMP = rm -f
# FIXME: How to write this without using GNU make features? # FIXME: How to write this without using GNU make features?
%.s: %.asm asm.m4 machine.m4 config.m4
$(M4) $(srcdir)/asm.m4 machine.m4 config.m4 \ # NOTE: We have to use an explicit rule .asm -> .o, to override the .c
`test -f $< || echo '$(srcdir)/'`$< >$@ # -> .o rule. Using rules involving .s doesn't seem to work.
# %.s: %.asm asm.m4 machine.m4 config.m4
# $(M4) $(srcdir)/asm.m4 machine.m4 config.m4 \
# `test -f $< || echo '$(srcdir)/'`$< >$@
# NOTE: We create an empty .deps-file, to make the make/automake # NOTE: We create an empty .deps-file, to make the make/automake
# dependency tracking happier. # dependency tracking happier.
%.$(OBJEXT): %.s %.$(OBJEXT): %.asm asm.m4 machine.m4 config.m4
$(COMPILE) -c $< -o $@ $(M4) $(srcdir)/asm.m4 machine.m4 config.m4 \
`test -f $< || echo '$(srcdir)/'`$< >$*.s
$(COMPILE) -c $*.s -o $@
echo >.deps/$*.Po echo >.deps/$*.Po
# Shared library rules # Shared library rules
all-local: $(SHLIBTARGET) all-local: $(SHLIBTARGET)
install-data-local: $(SHLIBINSTALL) install-data-local: $(SHLIBINSTALL)
%_p.$(OBJEXT): %.asm asm.m4 machine.m4 config.m4
$(M4) $(srcdir)/asm.m4 machine.m4 config.m4 \
`test -f $< || echo '$(srcdir)/'`$< >$*.s
$(COMPILE) -c $*.s -o $@
echo >.deps/$*.Po
# Assembler files must contain only PIC-clean code. # Assembler files must contain only PIC-clean code.
%_p.$(OBJEXT): %.c %_p.$(OBJEXT): %.c
$(COMPILE) $(SHLIBCFLAGS) -c $< -o $@ $(COMPILE) $(SHLIBCFLAGS) -c $< -o $@
%_p.$(OBJEXT): %.s SHLIBOBJECTS = $(patsubst %.$(OBJEXT),%_p.$(OBJEXT),$(am_libnettle_a_OBJECTS) $(LIBOBJS))
$(COMPILE) $(SHLIBCFLAGS) -c $< -o $@
echo >.deps/$*.Po
SHLIBOBJECTS = (patsubst %.$(OBJEXT),%_p.$(OBJEXT),$(am_libnettle_a_OBJECTS) $(LIBOBJS))
$(SHLIBFORLINK): $(SHLIBOBJECTS) $(SHLIBFORLINK): $(SHLIBOBJECTS)
$(SHLIBLINK) $^ -o $@ $(SHLIBLINK) $^ -o $@
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment