summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/sha/Makefile.uni
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/sha/Makefile.uni')
-rw-r--r--src/lib/libcrypto/sha/Makefile.uni122
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
10DIR= sha
11TOP= .
12CC= gcc
13CFLAG= -O3 -fomit-frame-pointer
14
15CPP= $(CC) -E
16INCLUDES=
17INSTALLTOP=/usr/local/lib
18MAKE= make
19MAKEDEPEND= makedepend
20MAKEFILE= Makefile.uni
21AR= ar r
22
23SHA_ASM_OBJ=
24
25CFLAGS= $(INCLUDES) $(CFLAG)
26
27GENERAL=Makefile
28
29TEST1=shatest
30TEST2=sha1test
31APP1=sha
32APP2=sha1
33
34TEST=$(TEST1) $(TEST2)
35APPS=$(APP1) $(APP2)
36
37LIB=libsha.a
38LIBSRC=sha_dgst.c sha1dgst.c sha_one.c sha1_one.c
39LIBOBJ=sha_dgst.o sha1dgst.o sha_one.o sha1_one.o $(SHA_ASM_OBJ)
40
41SRC= $(LIBSRC)
42
43EXHEADER= sha.h
44HEADER= sha_locl.h $(EXHEADER)
45
46ALL= $(GENERAL) $(SRC) $(HEADER)
47
48all: $(LIB) $(TEST) $(APPS)
49
50$(LIB): $(LIBOBJ)
51 $(AR) $(LIB) $(LIBOBJ)
52 sh $(TOP)/ranlib.sh $(LIB)
53
54# elf
55asm/sx86-elf.o: asm/sx86unix.cpp
56 $(CPP) -DELF asm/sx86unix.cpp | as -o asm/sx86-elf.o
57
58# solaris
59asm/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
65asm/sx86-out.o: asm/sx86unix.cpp
66 $(CPP) -DOUT asm/sx86unix.cpp | as -o asm/sx86-out.o
67
68# bsdi
69asm/sx86bsdi.o: asm/sx86unix.cpp
70 $(CPP) -DBSDI asm/sx86unix.cpp | as -o asm/sx86bsdi.o
71
72asm/sx86unix.cpp:
73 (cd asm; perl sha1-586.pl cpp >sx86unix.cpp)
74
75test: $(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
91lint:
92 lint -DLINT $(INCLUDES) $(SRC)>fluff
93
94depend:
95 $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC)
96
97dclean:
98 perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
99 mv -f Makefile.new $(MAKEFILE)
100
101clean:
102 /bin/rm -f $(LIB) $(TEST) $(APPS) *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
103
104cc:
105 $(MAKE) SHA_ASM_OBJ="" CC="cc" CFLAG="-O" all
106
107gcc:
108 $(MAKE) SHA_ASM_OBJ="" CC="gcc" CFLAGS="-O3 -fomit-frame-pointer" all
109
110x86-elf:
111 $(MAKE) SHA_ASM_OBJ="asm/sx86-elf.o" CFLAG="-DELF -DSHA1_ASM -DL_ENDIAN $(CFLAGS)" all
112
113x86-out:
114 $(MAKE) SHA_ASM_OBJ="asm/sx86-out.o" CFLAG="-DOUT -DSHA1_ASM -DL_ENDIAN $(CFLAGS)" all
115
116x86-solaris:
117 $(MAKE) SHA_ASM_OBJ="asm/sx86-sol.o" CFLAG="-DSOL -DSHA1_ASM -DL_ENDIAN $(CFLAGS)" all
118
119x86-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.