diff options
Diffstat (limited to 'src/lib/libcrypto/sha/Makefile.uni')
-rw-r--r-- | src/lib/libcrypto/sha/Makefile.uni | 122 |
1 files changed, 122 insertions, 0 deletions
diff --git a/src/lib/libcrypto/sha/Makefile.uni b/src/lib/libcrypto/sha/Makefile.uni new file mode 100644 index 0000000000..f3236755b2 --- /dev/null +++ b/src/lib/libcrypto/sha/Makefile.uni | |||
@@ -0,0 +1,122 @@ | |||
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= sha | ||
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 | SHA_ASM_OBJ= | ||
24 | |||
25 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
26 | |||
27 | GENERAL=Makefile | ||
28 | |||
29 | TEST1=shatest | ||
30 | TEST2=sha1test | ||
31 | APP1=sha | ||
32 | APP2=sha1 | ||
33 | |||
34 | TEST=$(TEST1) $(TEST2) | ||
35 | APPS=$(APP1) $(APP2) | ||
36 | |||
37 | LIB=libsha.a | ||
38 | LIBSRC=sha_dgst.c sha1dgst.c sha_one.c sha1_one.c | ||
39 | LIBOBJ=sha_dgst.o sha1dgst.o sha_one.o sha1_one.o $(SHA_ASM_OBJ) | ||
40 | |||
41 | SRC= $(LIBSRC) | ||
42 | |||
43 | EXHEADER= sha.h | ||
44 | HEADER= sha_locl.h $(EXHEADER) | ||
45 | |||
46 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
47 | |||
48 | all: $(LIB) $(TEST) $(APPS) | ||
49 | |||
50 | $(LIB): $(LIBOBJ) | ||
51 | $(AR) $(LIB) $(LIBOBJ) | ||
52 | sh $(TOP)/ranlib.sh $(LIB) | ||
53 | |||
54 | # elf | ||
55 | asm/sx86-elf.o: asm/sx86unix.cpp | ||
56 | $(CPP) -DELF asm/sx86unix.cpp | as -o asm/sx86-elf.o | ||
57 | |||
58 | # solaris | ||
59 | asm/sx86-sol.o: asm/sx86unix.cpp | ||
60 | $(CC) -E -DSOL asm/sx86unix.cpp | sed 's/^#.*//' > asm/sx86-sol.s | ||
61 | as -o asm/sx86-sol.o asm/sx86-sol.s | ||
62 | rm -f asm/sx86-sol.s | ||
63 | |||
64 | # a.out | ||
65 | asm/sx86-out.o: asm/sx86unix.cpp | ||
66 | $(CPP) -DOUT asm/sx86unix.cpp | as -o asm/sx86-out.o | ||
67 | |||
68 | # bsdi | ||
69 | asm/sx86bsdi.o: asm/sx86unix.cpp | ||
70 | $(CPP) -DBSDI asm/sx86unix.cpp | as -o asm/sx86bsdi.o | ||
71 | |||
72 | asm/sx86unix.cpp: | ||
73 | (cd asm; perl sha1-586.pl cpp >sx86unix.cpp) | ||
74 | |||
75 | test: $(TEST) | ||
76 | ./$(TEST1) | ||
77 | ./$(TEST2) | ||
78 | |||
79 | $(TEST1): $(TEST1).c $(LIB) | ||
80 | $(CC) -o $(TEST1) $(CFLAGS) $(TEST1).c $(LIB) | ||
81 | |||
82 | $(TEST2): $(TEST2).c $(LIB) | ||
83 | $(CC) -o $(TEST2) $(CFLAGS) $(TEST2).c $(LIB) | ||
84 | |||
85 | $(APP1): $(APP1).c $(LIB) | ||
86 | $(CC) -o $(APP1) $(CFLAGS) $(APP1).c $(LIB) | ||
87 | |||
88 | $(APP2): $(APP2).c $(LIB) | ||
89 | $(CC) -o $(APP2) $(CFLAGS) $(APP2).c $(LIB) | ||
90 | |||
91 | lint: | ||
92 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
93 | |||
94 | depend: | ||
95 | $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC) | ||
96 | |||
97 | dclean: | ||
98 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
99 | mv -f Makefile.new $(MAKEFILE) | ||
100 | |||
101 | clean: | ||
102 | /bin/rm -f $(LIB) $(TEST) $(APPS) *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
103 | |||
104 | cc: | ||
105 | $(MAKE) SHA_ASM_OBJ="" CC="cc" CFLAG="-O" all | ||
106 | |||
107 | gcc: | ||
108 | $(MAKE) SHA_ASM_OBJ="" CC="gcc" CFLAGS="-O3 -fomit-frame-pointer" all | ||
109 | |||
110 | x86-elf: | ||
111 | $(MAKE) SHA_ASM_OBJ="asm/sx86-elf.o" CFLAG="-DELF -DSHA1_ASM -DL_ENDIAN $(CFLAGS)" all | ||
112 | |||
113 | x86-out: | ||
114 | $(MAKE) SHA_ASM_OBJ="asm/sx86-out.o" CFLAG="-DOUT -DSHA1_ASM -DL_ENDIAN $(CFLAGS)" all | ||
115 | |||
116 | x86-solaris: | ||
117 | $(MAKE) SHA_ASM_OBJ="asm/sx86-sol.o" CFLAG="-DSOL -DSHA1_ASM -DL_ENDIAN $(CFLAGS)" all | ||
118 | |||
119 | x86-bdsi: | ||
120 | $(MAKE) SHA_ASM_OBJ="asm/sx86-bdsi.o" CFLAG="-DBDSI -DSHA1_ASM -DL_ENDIAN $(CFLAGS)" all | ||
121 | |||
122 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||