summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/rc4/Makefile.uni
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/rc4/Makefile.uni')
-rw-r--r--src/lib/libcrypto/rc4/Makefile.uni102
1 files changed, 102 insertions, 0 deletions
diff --git a/src/lib/libcrypto/rc4/Makefile.uni b/src/lib/libcrypto/rc4/Makefile.uni
new file mode 100644
index 0000000000..79dc17b8d1
--- /dev/null
+++ b/src/lib/libcrypto/rc4/Makefile.uni
@@ -0,0 +1,102 @@
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= rc4
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
23RC4_ENC=rc4_enc.o
24# or use
25#RC4_ENC=asm/rx86-elf.o
26#RC4_ENC=asm/rx86-out.o
27#RC4_ENC=asm/rx86-sol.o
28#RC4_ENC=asm/rx86bdsi.o
29
30CFLAGS= $(INCLUDES) $(CFLAG)
31
32GENERAL=Makefile
33TEST=rc4test
34APPS=rc4speed
35
36LIB=librc4.a
37LIBSRC=rc4_skey.c rc4_enc.c
38LIBOBJ=rc4_skey.o $(RC4_ENC)
39
40SRC= $(LIBSRC)
41
42EXHEADER= rc4.h
43HEADER= $(EXHEADER) rc4_locl.h
44
45ALL= $(GENERAL) $(SRC) $(HEADER)
46
47all: $(LIB) $(TEST) $(APPS)
48
49$(LIB): $(LIBOBJ)
50 $(AR) $(LIB) $(LIBOBJ)
51 sh $(TOP)/ranlib.sh $(LIB)
52
53# elf
54asm/rx86-elf.o: asm/rx86unix.cpp
55 $(CPP) -DELF asm/rx86unix.cpp | as -o asm/rx86-elf.o
56
57# solaris
58asm/rx86-sol.o: asm/rx86unix.cpp
59 $(CC) -E -DSOL asm/rx86unix.cpp | sed 's/^#.*//' > asm/rx86-sol.s
60 as -o asm/rx86-sol.o asm/rx86-sol.s
61 rm -f asm/rx86-sol.s
62
63# a.out
64asm/rx86-out.o: asm/rx86unix.cpp
65 $(CPP) -DOUT asm/rx86unix.cpp | as -o asm/rx86-out.o
66
67# bsdi
68asm/rx86bsdi.o: asm/rx86unix.cpp
69 $(CPP) -DBSDI asm/rx86unix.cpp | as -o asm/rx86bsdi.o
70
71asm/rx86unix.cpp:
72 (cd asm; perl rc4-586.pl cpp >rx86unix.cpp)
73
74test: $(TEST)
75 ./$(TEST)
76
77$(TEST): $(TEST).c $(LIB)
78 $(CC) -o $(TEST) $(CFLAGS) $(TEST).c $(LIB)
79
80$(APPS): $(APPS).c $(LIB)
81 $(CC) -o $(APPS) $(CFLAGS) $(APPS).c $(LIB)
82
83lint:
84 lint -DLINT $(INCLUDES) $(SRC)>fluff
85
86depend:
87 $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC)
88
89dclean:
90 perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
91 mv -f Makefile.new $(MAKEFILE)
92
93clean:
94 /bin/rm -f $(LIB) $(TEST) $(APPS) *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
95
96cc:
97 $(MAKE) CC="cc" CFLAG="-O" all
98
99gcc:
100 $(MAKE) CC="gcc" CFLAGS="-O3 -fomit-frame-pointer" all
101
102# DO NOT DELETE THIS LINE -- make depend depends on it.