Makefile 2.0 KB
Newer Older
1 2 3 4 5 6 7 8 9 10
#
# SSLeay/crypto/ripemd/Makefile
#

DIR=    ripemd
TOP=    ../..
CC=     cc
CPP=    $(CC) -E
INCLUDES=
CFLAG=-g
11 12
MAKEDEPPROG=	makedepend
MAKEDEPEND=	$(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
B
Ben Laurie 已提交
13
MAKEFILE=       Makefile
14 15 16 17 18
AR=             ar r

RIP_ASM_OBJ=

CFLAGS= $(INCLUDES) $(CFLAG)
19
ASFLAGS= $(INCLUDES) $(ASFLAG)
20
AFLAGS= $(ASFLAGS)
21 22 23

GENERAL=Makefile
TEST=rmdtest.c
24
APPS=
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43

LIB=$(TOP)/libcrypto.a
LIBSRC=rmd_dgst.c rmd_one.c
LIBOBJ=rmd_dgst.o rmd_one.o $(RMD160_ASM_OBJ)

SRC= $(LIBSRC)

EXHEADER= ripemd.h
HEADER= rmd_locl.h rmdconst.h $(EXHEADER)

ALL=    $(GENERAL) $(SRC) $(HEADER)

top:
	(cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)

all:    lib

lib:    $(LIBOBJ)
	$(AR) $(LIB) $(LIBOBJ)
44
	$(RANLIB) $(LIB) || echo Never mind.
45 46
	@touch lib

47
# ELF
48
rm86-elf.s: asm/rmd-586.pl ../perlasm/x86asm.pl
49 50
	(cd asm; $(PERL) rmd-586.pl elf $(CFLAGS) > ../$@)
# COFF
51
rm86-cof.s: asm/rmd-586.pl ../perlasm/x86asm.pl
52
	(cd asm; $(PERL) rmd-586.pl coff $(CFLAGS) > ../$@)
53
# a.out
54 55
rm86-out.s: asm/rmd-586.pl ../perlasm/x86asm.pl
	(cd asm; $(PERL) rmd-586.pl a.out $(CFLAGS) > ../$@)
56 57

files:
B
Ben Laurie 已提交
58
	$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
59 60

links:
61 62 63
	@$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
	@$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
	@$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
64 65

install:
A
Andy Polyakov 已提交
66
	@[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
67
	@headerlist="$(EXHEADER)"; for i in $$headerlist ; \
68
	do  \
69 70
	(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
	chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
71 72 73 74 75 76 77 78 79 80 81
	done;

tags:
	ctags $(SRC)

tests:

lint:
	lint -DLINT $(INCLUDES) $(SRC)>fluff

depend:
82
	$(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
83 84

dclean:
85
	$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
86 87 88
	mv -f Makefile.new $(MAKEFILE)

clean:
89
	rm -f *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
90 91

# DO NOT DELETE THIS LINE -- make depend depends on it.
B
Ben Laurie 已提交
92

B
Bodo Möller 已提交
93
rmd_one.o: rmd_one.c