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
10 # There are 3 possible performance options, experiment :-)
18 CFLAG= -O3 -fomit-frame-pointer
22 INSTALLTOP=/usr/local/lib
24 MAKEDEPEND= makedepend
25 MAKEFILE= Makefile.uni
30 #CAST_ENC=asm/cx86-elf.o
31 #CAST_ENC=asm/cx86-out.o
32 #CAST_ENC=asm/cx86-sol.o
33 #CAST_ENC=asm/cx86bdsi.o
35 CFLAGS= $(OPTS) $(INCLUDES) $(CFLAG) -DFULL_TEST
44 LIBSRC=c_skey.c c_ecb.c c_enc.c c_cfb64.c c_ofb64.c
45 LIBOBJ=c_skey.o c_ecb.o $(CAST_ENC) c_cfb64.o c_ofb64.o
50 HEADER= cast_lcl.h $(EXHEADER)
52 ALL= $(GENERAL) $(SRC) $(HEADER)
54 all: $(LIB) $(TEST) $(APPS)
57 $(AR) $(LIB) $(LIBOBJ)
58 sh $(TOP)/ranlib.sh $(LIB)
60 asm/cx86-elf.o: asm/cx86unix.cpp
61 $(CPP) -DELF asm/cx86unix.cpp | as -o asm/cx86-elf.o
64 asm/cx86-sol.o: asm/cx86unix.cpp
65 $(CC) -E -DSOL asm/cx86unix.cpp | sed 's/^#.*//' > asm/cx86-sol.s
66 as -o asm/cx86-sol.o asm/cx86-sol.s
70 asm/cx86-out.o: asm/cx86unix.cpp
71 $(CPP) -DOUT asm/cx86unix.cpp | as -o asm/cx86-out.o
74 asm/cx86bsdi.o: asm/cx86unix.cpp
75 $(CPP) -DBSDI asm/cx86unix.cpp | as -o asm/cx86bsdi.o
78 (cd asm; perl cast-586.pl cpp >cx86unix.cpp)
83 $(TEST): $(TEST).c $(LIB)
84 $(CC) -o $(TEST) $(CFLAGS) $(TEST).c $(LIB)
86 $(APP1): $(APP1).c $(LIB)
87 $(CC) -o $(APP1) $(CFLAGS) $(APP1).c $(LIB)
89 $(APP2): $(APP2).c $(LIB)
90 $(CC) -o $(APP2) $(CFLAGS) $(APP2).c $(LIB)
93 lint -DLINT $(INCLUDES) $(SRC)>fluff
96 $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC)
99 perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
100 mv -f Makefile.new $(MAKEFILE)
103 /bin/rm -f $(LIB) $(TEST) $(APPS) *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
106 $(MAKE) CC="cc" CFLAG="-O" all
109 $(MAKE) CC="gcc" CFLAGS="-O3 -fomit-frame-pointer" all
112 $(MAKE) CAST_ENC="asm/cx86-elf.o" CFLAG="-DELF $(CFLAGS)" all
115 $(MAKE) CAST_ENC="asm/cx86-out.o" CFLAG="-DOUT $(CFLAGS)" all
118 $(MAKE) CAST_ENC="asm/cx86-sol.o" CFLAG="-DSOL $(CFLAGS)" all
121 $(MAKE) CAST_ENC="asm/cx86-bdsi.o" CFLAG="-DBDSI $(CFLAGS)" all
123 # DO NOT DELETE THIS LINE -- make depend depends on it.