diff options
Diffstat (limited to 'src/lib/libcrypto/md5/Makefile.uni')
-rw-r--r-- | src/lib/libcrypto/md5/Makefile.uni | 109 |
1 files changed, 109 insertions, 0 deletions
diff --git a/src/lib/libcrypto/md5/Makefile.uni b/src/lib/libcrypto/md5/Makefile.uni new file mode 100644 index 0000000000..54685712db --- /dev/null +++ b/src/lib/libcrypto/md5/Makefile.uni | |||
@@ -0,0 +1,109 @@ | |||
1 | # Targets | ||
2 | # make - twidle the options yourself :-) | ||
3 | # make cc - standard cc options | ||
4 | # make gcc - standard gcc options | ||
5 | # make x86-elf - linux-elf etc | ||
6 | # make x86-out - linux-a.out, FreeBSD etc | ||
7 | # make x86-solaris | ||
8 | # make x86-bdsi | ||
9 | |||
10 | DIR= md5 | ||
11 | TOP= . | ||
12 | CC= gcc | ||
13 | CFLAG= -O3 -fomit-frame-pointer | ||
14 | |||
15 | CPP= $(CC) -E | ||
16 | INCLUDES= | ||
17 | INSTALLTOP=/usr/local/lib | ||
18 | MAKE= make | ||
19 | MAKEDEPEND= makedepend | ||
20 | MAKEFILE= Makefile.uni | ||
21 | AR= ar r | ||
22 | |||
23 | MD5_ASM_OBJ= | ||
24 | |||
25 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
26 | |||
27 | GENERAL=Makefile | ||
28 | TEST=md5test | ||
29 | APPS=md5 | ||
30 | |||
31 | LIB=libmd5.a | ||
32 | LIBSRC=md5_dgst.c md5_one.c | ||
33 | LIBOBJ=md5_dgst.o md5_one.o $(MD5_ASM_OBJ) | ||
34 | |||
35 | SRC= $(LIBSRC) | ||
36 | |||
37 | EXHEADER= md5.h | ||
38 | HEADER= md5_locl.h $(EXHEADER) | ||
39 | |||
40 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
41 | |||
42 | all: $(LIB) $(TEST) $(APPS) | ||
43 | |||
44 | $(LIB): $(LIBOBJ) | ||
45 | $(AR) $(LIB) $(LIBOBJ) | ||
46 | sh $(TOP)/ranlib.sh $(LIB) | ||
47 | |||
48 | # elf | ||
49 | asm/mx86-elf.o: asm/mx86unix.cpp | ||
50 | $(CPP) -DELF asm/mx86unix.cpp | as -o asm/mx86-elf.o | ||
51 | |||
52 | # solaris | ||
53 | asm/mx86-sol.o: asm/mx86unix.cpp | ||
54 | $(CC) -E -DSOL asm/mx86unix.cpp | sed 's/^#.*//' > asm/mx86-sol.s | ||
55 | as -o asm/mx86-sol.o asm/mx86-sol.s | ||
56 | rm -f asm/mx86-sol.s | ||
57 | |||
58 | # a.out | ||
59 | asm/mx86-out.o: asm/mx86unix.cpp | ||
60 | $(CPP) -DOUT asm/mx86unix.cpp | as -o asm/mx86-out.o | ||
61 | |||
62 | # bsdi | ||
63 | asm/mx86bsdi.o: asm/mx86unix.cpp | ||
64 | $(CPP) -DBSDI asm/mx86unix.cpp | as -o asm/mx86bsdi.o | ||
65 | |||
66 | asm/mx86unix.cpp: | ||
67 | (cd asm; perl md5-586.pl cpp >mx86unix.cpp) | ||
68 | |||
69 | test: $(TEST) | ||
70 | ./$(TEST) | ||
71 | |||
72 | $(TEST): $(TEST).c $(LIB) | ||
73 | $(CC) -o $(TEST) $(CFLAGS) $(TEST).c $(LIB) | ||
74 | |||
75 | $(APPS): $(APPS).c $(LIB) | ||
76 | $(CC) -o $(APPS) $(CFLAGS) $(APPS).c $(LIB) | ||
77 | |||
78 | lint: | ||
79 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
80 | |||
81 | depend: | ||
82 | $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC) | ||
83 | |||
84 | dclean: | ||
85 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
86 | mv -f Makefile.new $(MAKEFILE) | ||
87 | |||
88 | clean: | ||
89 | /bin/rm -f $(LIB) $(TEST) $(APPS) *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
90 | |||
91 | cc: | ||
92 | $(MAKE) MD5_ASM_OBJ="" CC="cc" CFLAG="-O" all | ||
93 | |||
94 | gcc: | ||
95 | $(MAKE) MD5_ASM_OBJ="" CC="gcc" CFLAGS="-O3 -fomit-frame-pointer" all | ||
96 | |||
97 | x86-elf: | ||
98 | $(MAKE) MD5_ASM_OBJ="asm/mx86-elf.o" CFLAG="-DELF -DMD5_ASM -DL_ENDIAN $(CFLAGS)" all | ||
99 | |||
100 | x86-out: | ||
101 | $(MAKE) MD5_ASM_OBJ="asm/mx86-out.o" CFLAG="-DOUT -DMD5_ASM -DL_ENDIAN $(CFLAGS)" all | ||
102 | |||
103 | x86-solaris: | ||
104 | $(MAKE) MD5_ASM_OBJ="asm/mx86-sol.o" CFLAG="-DSOL -DMD5_ASM -DL_ENDIAN $(CFLAGS)" all | ||
105 | |||
106 | x86-bdsi: | ||
107 | $(MAKE) MD5_ASM_OBJ="asm/mx86-bdsi.o" CFLAG="-DBDSI -DMD5_ASM -DL_ENDIAN $(CFLAGS)" all | ||
108 | |||
109 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||